diff options
author | Winson Chung <winsonc@google.com> | 2010-06-11 17:34:16 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2010-06-30 16:24:40 -0700 |
commit | aafa03cbb925c74be1c13f8bb99d928be429e62f (patch) | |
tree | 7d63432c1439f2249b506eeb7109d40e947a037f /res | |
parent | 6404116682ff30f9e2170c68a1b56dfa7c6836cc (diff) | |
download | android_packages_apps_Trebuchet-aafa03cbb925c74be1c13f8bb99d928be429e62f.tar.gz android_packages_apps_Trebuchet-aafa03cbb925c74be1c13f8bb99d928be429e62f.tar.bz2 android_packages_apps_Trebuchet-aafa03cbb925c74be1c13f8bb99d928be429e62f.zip |
Allow for NxM layout and in-place rotation of items on homescreen.
Currently, rotation is disabled as designs are still in flux, but the NxM grid is enabled (8x4).
Change-Id: I0026f88c674719e3d67de6d6d481d2d4cd606362
Diffstat (limited to 'res')
-rw-r--r-- | res/layout-xlarge/launcher.xml | 4 | ||||
-rw-r--r-- | res/layout-xlarge/workspace_screen.xml | 32 | ||||
-rw-r--r-- | res/values-xlarge/dimens.xml | 20 | ||||
-rw-r--r-- | res/values-xlarge/styles.xml | 30 | ||||
-rw-r--r-- | res/values/attrs.xml | 4 |
5 files changed, 88 insertions, 2 deletions
diff --git a/res/layout-xlarge/launcher.xml b/res/layout-xlarge/launcher.xml index 092e018ea..17a5b8459 100644 --- a/res/layout-xlarge/launcher.xml +++ b/res/layout-xlarge/launcher.xml @@ -29,14 +29,14 @@ android:id="@+id/workspace" android:layout_width="match_parent" android:layout_height="match_parent" - launcher:defaultScreen="2"> + launcher:canonicalDeviceWidth="8" + launcher:canonicalDeviceHeight="4"> <include android:id="@+id/cell1" layout="@layout/workspace_screen" /> <include android:id="@+id/cell2" layout="@layout/workspace_screen" /> <include android:id="@+id/cell3" layout="@layout/workspace_screen" /> <include android:id="@+id/cell4" layout="@layout/workspace_screen" /> <include android:id="@+id/cell5" layout="@layout/workspace_screen" /> - </com.android.launcher2.Workspace> <com.android.launcher2.DeleteZone diff --git a/res/layout-xlarge/workspace_screen.xml b/res/layout-xlarge/workspace_screen.xml new file mode 100644 index 000000000..aa892b97d --- /dev/null +++ b/res/layout-xlarge/workspace_screen.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<com.android.launcher2.CellLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher" + + android:layout_width="match_parent" + android:layout_height="match_parent" + android:hapticFeedbackEnabled="false" + + launcher:cellWidth="@dimen/workspace_cell_width" + launcher:cellHeight="@dimen/workspace_cell_height" + launcher:longAxisStartPadding="8dip" + launcher:longAxisEndPadding="8dip" + launcher:shortAxisStartPadding="8dip" + launcher:shortAxisEndPadding="8dip" + launcher:shortAxisCells="4" + launcher:longAxisCells="8" /> diff --git a/res/values-xlarge/dimens.xml b/res/values-xlarge/dimens.xml new file mode 100644 index 000000000..827949274 --- /dev/null +++ b/res/values-xlarge/dimens.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources> + <dimen name="workspace_cell_width">76dip</dimen> + <dimen name="workspace_cell_height">76dip</dimen> +</resources> diff --git a/res/values-xlarge/styles.xml b/res/values-xlarge/styles.xml new file mode 100644 index 000000000..e4c047f99 --- /dev/null +++ b/res/values-xlarge/styles.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +* Copyright (C) 2008 The Android Open Source Project +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +--> + +<resources> + <style name="WorkspaceIcon.Portrait"> + <item name="android:drawablePadding">4dip</item> + <item name="android:paddingTop">1dip</item> + </style> + + <style name="WorkspaceIcon.Landscape"> + <item name="android:drawablePadding">4dip</item> + <item name="android:paddingTop">1dip</item> + </style> +</resources> diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 78391206e..c977f97d4 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -32,6 +32,10 @@ <declare-styleable name="Workspace"> <!-- The first screen the workspace should display. --> <attr name="defaultScreen" format="integer" /> + <!-- The number of horizontal cells for the device in its natural orientation --> + <attr name="canonicalDeviceWidth" format="integer" /> + <!-- The number of vertical cells for the device in its natural orientation --> + <attr name="canonicalDeviceHeight" format="integer" /> </declare-styleable> <!-- CellLayout specific attributes. These attributes are used to customize |