summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@google.com>2010-03-04 15:10:54 -0500
committerDaniel Sandler <dsandler@google.com>2010-03-04 16:16:20 -0500
commit46e47d03b309f74a1de610410b04e085b874bbb3 (patch)
tree9bd4fd5a142d7ab91e835475432a84ed90634c15 /res
parentedcce099c98a6c40d10109ac092ab50f9d2668f3 (diff)
downloadandroid_packages_apps_Trebuchet-46e47d03b309f74a1de610410b04e085b874bbb3.tar.gz
android_packages_apps_Trebuchet-46e47d03b309f74a1de610410b04e085b874bbb3.tar.bz2
android_packages_apps_Trebuchet-46e47d03b309f74a1de610410b04e085b874bbb3.zip
Change the way 2D/3D AllApps are selected.
all_apps.xml is now a trampoline that loads the correct layout file. Also take this opportunity to make 2D the default. Change-Id: Iba2500da1bf4f505f1a5c2f6f32ed6e72ec34c5f
Diffstat (limited to 'res')
-rw-r--r--res/layout/all_apps.xml21
-rw-r--r--res/layout/all_apps_2d.xml55
-rw-r--r--res/layout/all_apps_3d.xml33
3 files changed, 92 insertions, 17 deletions
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml
index 7975df40a..fadf736a6 100644
--- a/res/layout/all_apps.xml
+++ b/res/layout/all_apps.xml
@@ -14,20 +14,7 @@
limitations under the License.
-->
-<!-- Replace with AllAppsView to use 2D version -->
-<com.android.launcher2.AllApps3D
- xmlns:android="http://schemas.android.com/apk/res/android"
-
- android:id="@+id/all_apps_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
-
- android:scrollbarStyle="outsideInset"
- android:drawSelectorOnTop="false"
- android:listSelector="@drawable/grid_selector"
- android:verticalSpacing="10dip"
- android:numColumns="4"
- android:fadingEdgeLength="20dip"
- android:padding="2dip"
- android:cacheColorHint="#FF000000"
- />
+<!-- switch to all_apps_3d on devices that support RenderScript -->
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
+ <include layout="@layout/all_apps_2d" />
+</merge>
diff --git a/res/layout/all_apps_2d.xml b/res/layout/all_apps_2d.xml
new file mode 100644
index 000000000..f22b8ea50
--- /dev/null
+++ b/res/layout/all_apps_2d.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<!-- Sapphire gets 2D all apps view -->
+<com.android.launcher2.AllApps2D
+ xmlns:android="http://schemas.android.com/apk/res/android"
+
+ android:id="@+id/all_apps_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:padding="2dip"
+
+ >
+ <GridView android:id="@+id/all_apps_2d_grid"
+ android:tag="all_apps_2d_grid"
+ android:scrollbars="none"
+ android:drawSelectorOnTop="false"
+ android:listSelector="@drawable/grid_selector"
+ android:verticalSpacing="10dip"
+ android:numColumns="4"
+ android:fadingEdgeLength="48dip"
+ android:cacheColorHint="#FF000000"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignParentBottom="true"
+ android:layout_marginBottom="24dip"
+ android:layout_marginTop="8dip"
+ android:nextFocusDown="@+id/all_apps_2d_home"
+ />
+
+ <ImageButton android:id="@+id/all_apps_2d_home"
+ android:tag="all_apps_2d_home"
+ android:src="@drawable/home_button"
+ android:background="#00000000"
+ android:layout_centerHorizontal="true"
+ android:layout_alignParentBottom="true"
+ android:layout_width="wrap_content"
+ android:layout_height="64dip"
+ android:nextFocusUp="@+id/all_apps_2d_grid"
+ />
+
+</com.android.launcher2.AllApps2D>
diff --git a/res/layout/all_apps_3d.xml b/res/layout/all_apps_3d.xml
new file mode 100644
index 000000000..7975df40a
--- /dev/null
+++ b/res/layout/all_apps_3d.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<!-- Replace with AllAppsView to use 2D version -->
+<com.android.launcher2.AllApps3D
+ xmlns:android="http://schemas.android.com/apk/res/android"
+
+ android:id="@+id/all_apps_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+
+ android:scrollbarStyle="outsideInset"
+ android:drawSelectorOnTop="false"
+ android:listSelector="@drawable/grid_selector"
+ android:verticalSpacing="10dip"
+ android:numColumns="4"
+ android:fadingEdgeLength="20dip"
+ android:padding="2dip"
+ android:cacheColorHint="#FF000000"
+ />