diff options
author | Michael Jurka <mikejurka@google.com> | 2010-06-30 17:07:39 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2010-07-09 11:56:45 -0700 |
commit | 0e26059548e429e5d1c973bebe4c561bead2926f (patch) | |
tree | 8bc1651ad477ff860082fffd383e971b724ba649 /res | |
parent | 1bdb9d346779ff5fa7cb6b9bff512f3caa06a896 (diff) | |
download | android_packages_apps_Trebuchet-0e26059548e429e5d1c973bebe4c561bead2926f.tar.gz android_packages_apps_Trebuchet-0e26059548e429e5d1c973bebe4c561bead2926f.tar.bz2 android_packages_apps_Trebuchet-0e26059548e429e5d1c973bebe4c561bead2926f.zip |
Improving home screen customization
- Created a drawer with tabs for widgets, folders, shortcuts, wallpapers
(wallpapers are currently not implemented)
- Tapping outside the drawer dismisses it
- Moved the all apps icon to the upper right of the screen
- Adding a toast that says "No more space on screen" when dragging a widget to a full screen
- Fixed bug where you could stack two equal-sized widgets on top of each other on the homescreen (exposed by the new ability to drag widgets onto the home screen)
Change-Id: I03b65ce54a85d24328c94e0c06e249571de449ee
Diffstat (limited to 'res')
-rw-r--r-- | res/anim/home_customization_drawer_slide_down.xml | 22 | ||||
-rw-r--r-- | res/anim/home_customization_drawer_slide_up.xml (renamed from res/anim/widget_chooser_slide_up.xml) | 3 | ||||
-rw-r--r-- | res/layout-xlarge/launcher.xml | 113 | ||||
-rw-r--r-- | res/layout/home_customization_drawer_item.xml (renamed from res/layout/widget_item.xml) | 12 | ||||
-rw-r--r-- | res/values/strings.xml | 5 |
5 files changed, 106 insertions, 49 deletions
diff --git a/res/anim/home_customization_drawer_slide_down.xml b/res/anim/home_customization_drawer_slide_down.xml new file mode 100644 index 000000000..b3041c79d --- /dev/null +++ b/res/anim/home_customization_drawer_slide_down.xml @@ -0,0 +1,22 @@ +<?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="0%p" + android:toYDelta="100%p" + + android:duration="500" /> diff --git a/res/anim/widget_chooser_slide_up.xml b/res/anim/home_customization_drawer_slide_up.xml index b43ec367e..3df23209e 100644 --- a/res/anim/widget_chooser_slide_up.xml +++ b/res/anim/home_customization_drawer_slide_up.xml @@ -19,5 +19,4 @@ android:fromYDelta="100%p" android:toYDelta="0%p" - android:duration="500" - android:fillAfter="true" /> + android:duration="500" /> diff --git a/res/layout-xlarge/launcher.xml b/res/layout-xlarge/launcher.xml index 17a5b8459..ce864c285 100644 --- a/res/layout-xlarge/launcher.xml +++ b/res/layout-xlarge/launcher.xml @@ -39,54 +39,83 @@ <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" + + + <RelativeLayout + android:id="@+id/all_apps_button_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingTop="@dimen/delete_zone_padding" - android:layout_gravity="top|right" + android:layout_gravity="top|right"> + <com.android.launcher2.HandleView + style="@style/HotseatButton" + android:id="@+id/all_apps_button" + android:layout_width="@dimen/button_bar_height" - android:scaleType="center" - android:src="@drawable/add_button" + android:src="@drawable/all_apps_button" + launcher:direction="horizontal" /> + <ImageView + android:id="@+id/add_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toRightOf="@id/all_apps_button" - android:onClick="onClickAddButton" - android:focusable="true" - android:clickable="true" /> + android:layout_centerVertical="true" + android:scaleType="center" + android:src="@drawable/add_button" - <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" - /> + android:onClick="onClickAddButton" + android:focusable="true" + android:clickable="true" /> + <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_toRightOf="@id/all_apps_button" + + android:scaleType="center" + android:src="@drawable/delete_zone_selector" + android:visibility="gone" + launcher:direction="horizontal" /> </RelativeLayout> - <com.android.launcher2.WidgetChooser - android:id="@+id/widget_chooser" + + <TabHost + android:id="@android:id/tabhost" android:layout_width="match_parent" - android:layout_height="100dip" + android:layout_height="200dip" android:layout_gravity="bottom" - android:visibility="gone" - /> + android:visibility="gone"> + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <TabWidget + android:id="@android:id/tabs" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + <FrameLayout + android:id="@android:id/tabcontent" + android:background="#ff000000" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <com.android.launcher2.WidgetChooser + android:id="@+id/widget_chooser" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + <com.android.launcher2.FolderChooser + android:id="@+id/folder_chooser" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + <com.android.launcher2.ShortcutChooser + android:id="@+id/shortcut_chooser" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + <TextView + android:id="@+id/wallpaperstab" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:text="@string/wallpapers_temp_tab_text" /> + </FrameLayout> + </LinearLayout> + </TabHost> </com.android.launcher2.DragLayer> diff --git a/res/layout/widget_item.xml b/res/layout/home_customization_drawer_item.xml index c79bd31a9..e3d20a1ea 100644 --- a/res/layout/widget_item.xml +++ b/res/layout/home_customization_drawer_item.xml @@ -14,9 +14,11 @@ limitations under the License. --> -<ImageView xmlns:android="http://schemas.android.com/apk/res/android" +<TextView 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" /> + android:layout_width="200dip" + android:layout_height="match_parent" + android:padding="20dip" + android:orientation="vertical" + android:gravity="center_horizontal|center_vertical|clip_vertical" + android:textAppearance="?android:attr/textAppearanceMedium" />
\ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 86c1b3c1f..f61871d5e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -43,6 +43,11 @@ <string name="activity_not_found">Application is not installed on your phone.</string> <!-- List item for configuring the current wallpaper --> <string name="configure_wallpaper">Configure...</string> + <string name="widgets_tab_label">Widgets</string> + <string name="folders_tab_label">Folders</string> + <string name="shortcuts_tab_label">Shortcuts</string> + <string name="wallpapers_tab_label">Wallpapers</string> + <string name="wallpapers_temp_tab_text">This will be the wallpapers tab</string> <!-- Folders --> <skip /> |