diff options
author | Michael Jurka <mikejurka@google.com> | 2010-06-10 17:01:57 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2010-06-28 10:49:34 -0700 |
commit | af44209bfa60da3c7ab49b7f508f9effd316ee41 (patch) | |
tree | ffd1140463008a3effe2a501287c92ea7447161e /res | |
parent | ff68ed0595d73632cca5f95196aa625e60f8aa24 (diff) | |
download | android_packages_apps_Trebuchet-af44209bfa60da3c7ab49b7f508f9effd316ee41.tar.gz android_packages_apps_Trebuchet-af44209bfa60da3c7ab49b7f508f9effd316ee41.tar.bz2 android_packages_apps_Trebuchet-af44209bfa60da3c7ab49b7f508f9effd316ee41.zip |
First cut at new home screen customization for xlarge displays.
- Add new layout for xlarge, removing hotseat, next/prev page, etc.
- Add a "+" button in top right which switches to customization mode
- Add a widget chooser which slides up from bottom of screen
- Initial support for dragging widgets onto home screen
Change-Id: I14e2e013ccceff4066fcb7c4492b4f6bef6595e7
Diffstat (limited to 'res')
-rw-r--r-- | res/anim/widget_chooser_slide_up.xml | 23 | ||||
-rw-r--r-- | res/drawable/add_button.png | bin | 0 -> 2372 bytes | |||
-rw-r--r-- | res/layout-xlarge/launcher.xml | 92 | ||||
-rw-r--r-- | res/layout/widget_item.xml | 22 |
4 files changed, 137 insertions, 0 deletions
diff --git a/res/anim/widget_chooser_slide_up.xml b/res/anim/widget_chooser_slide_up.xml new file mode 100644 index 000000000..b43ec367e --- /dev/null +++ b/res/anim/widget_chooser_slide_up.xml @@ -0,0 +1,23 @@ +<?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. +--> +<translate xmlns:android="http://schemas.android.com/apk/res/android" + android:fromXDelta="0%p" + android:toXDelta="0%p" + android:fromYDelta="100%p" + android:toYDelta="0%p" + + android:duration="500" + android:fillAfter="true" /> diff --git a/res/drawable/add_button.png b/res/drawable/add_button.png Binary files differnew file mode 100644 index 000000000..0edcfa380 --- /dev/null +++ b/res/drawable/add_button.png diff --git a/res/layout-xlarge/launcher.xml b/res/layout-xlarge/launcher.xml new file mode 100644 index 000000000..092e018ea --- /dev/null +++ b/res/layout-xlarge/launcher.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2007 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.DragLayer + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher" + + android:id="@+id/drag_layer" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include layout="@layout/all_apps" /> + + <!-- The workspace contains 5 screens of cells --> + <com.android.launcher2.Workspace + android:id="@+id/workspace" + android:layout_width="match_parent" + android:layout_height="match_parent" + launcher:defaultScreen="2"> + + <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 + android:id="@+id/delete_zone" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingTop="@dimen/delete_zone_padding" + android:layout_gravity="top|right" + + android:scaleType="center" + android:src="@drawable/delete_zone_selector" + android:visibility="gone" + launcher:direction="horizontal" + /> + <ImageView + android:id="@+id/add_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingTop="@dimen/delete_zone_padding" + android:layout_gravity="top|right" + + android:scaleType="center" + android:src="@drawable/add_button" + + android:onClick="onClickAddButton" + android:focusable="true" + android:clickable="true" /> + + <RelativeLayout + android:id="@+id/all_apps_button_cluster" + android:layout_width="@dimen/button_bar_height" + android:layout_height="@dimen/button_bar_height" + android:layout_gravity="top|left" + android:paddingTop="2dip" + > + <com.android.launcher2.HandleView + style="@style/HotseatButton" + android:id="@+id/all_apps_button" + android:layout_centerHorizontal="true" + android:layout_alignParentBottom="true" + + android:src="@drawable/all_apps_button" + launcher:direction="horizontal" + /> + </RelativeLayout> + <com.android.launcher2.WidgetChooser + android:id="@+id/widget_chooser" + android:layout_width="match_parent" + android:layout_height="100dip" + android:layout_gravity="bottom" + android:visibility="gone" + /> +</com.android.launcher2.DragLayer> diff --git a/res/layout/widget_item.xml b/res/layout/widget_item.xml new file mode 100644 index 000000000..c79bd31a9 --- /dev/null +++ b/res/layout/widget_item.xml @@ -0,0 +1,22 @@ +<?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. +--> + +<ImageView xmlns:android="http://schemas.android.com/apk/res/android" + android:background="?android:attr/galleryItemBackground" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scaleType="fitXY" + android:focusable="true" /> |