diff options
author | Winson Chung <winsonc@google.com> | 2011-05-31 16:50:48 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2011-06-01 17:28:23 -0700 |
commit | 4c98d9235d164680186180974719f551cf935d08 (patch) | |
tree | 43a64765edf35404256f7f52809ae114054e9436 /res | |
parent | 85b439c964a23f262f57c7333bfd2b3b838836f7 (diff) | |
download | android_packages_apps_Trebuchet-4c98d9235d164680186180974719f551cf935d08.tar.gz android_packages_apps_Trebuchet-4c98d9235d164680186180974719f551cf935d08.tar.bz2 android_packages_apps_Trebuchet-4c98d9235d164680186180974719f551cf935d08.zip |
Adding drag target bar.
Change-Id: Ia00ed30264ea5f1d3c919111d15588ef441bfe20
Diffstat (limited to 'res')
-rw-r--r-- | res/layout-land/launcher.xml | 14 | ||||
-rw-r--r-- | res/layout-large/button_bar.xml | 5 | ||||
-rw-r--r-- | res/layout-port/launcher.xml | 13 | ||||
-rw-r--r-- | res/layout/qsb_bar.xml | 34 | ||||
-rw-r--r-- | res/values-land/strings.xml | 30 | ||||
-rw-r--r-- | res/values-land/styles.xml | 16 | ||||
-rw-r--r-- | res/values/colors.xml | 7 | ||||
-rw-r--r-- | res/values/strings.xml | 7 | ||||
-rw-r--r-- | res/values/styles.xml | 16 |
9 files changed, 103 insertions, 39 deletions
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml index c8a82e69d..707366116 100644 --- a/res/layout-land/launcher.xml +++ b/res/layout-land/launcher.xml @@ -87,20 +87,6 @@ android:focusable="true" android:clickable="true" /> - <com.android.launcher2.DeleteZone - android:id="@+id/delete_zone" - android:layout_width="@dimen/delete_zone_size" - android:layout_height="@dimen/delete_zone_size" - android:paddingLeft="@dimen/delete_zone_padding" - android:layout_marginBottom="@dimen/half_status_bar_height" - android:layout_gravity="right|center_vertical" - - android:scaleType="center" - android:drawableLeft="@drawable/delete_zone_selector" - android:visibility="invisible" - launcher:direction="vertical" - /> - <RelativeLayout android:id="@+id/all_apps_button_cluster" android:layout_height="fill_parent" diff --git a/res/layout-large/button_bar.xml b/res/layout-large/button_bar.xml index 62115f786..a06076162 100644 --- a/res/layout-large/button_bar.xml +++ b/res/layout-large/button_bar.xml @@ -71,6 +71,7 @@ <!-- AllApps icon --> <com.android.launcher2.StrokedTextView android:id="@+id/all_apps_button" + android:onClick="onClickAllAppsButton" android:text="@string/all_apps_button_label" android:drawablePadding="@dimen/all_apps_button_drawable_padding" android:drawableLeft="@drawable/ic_home_all_apps_holo_dark" @@ -103,6 +104,7 @@ <ImageView android:id="@+id/all_apps_divider" android:src="@drawable/divider_launcher_holo" + android:onClick="onClickAllAppsButton" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_toLeftOf="@+id/configure_button" @@ -116,6 +118,7 @@ <ImageView android:id="@+id/configure_button" android:src="@drawable/ic_home_add_holo_dark" + android:onClick="onClickConfigureButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" @@ -141,7 +144,7 @@ android:paddingRight="@dimen/toolbar_button_horizontal_padding" android:paddingTop="@dimen/toolbar_button_vertical_padding" android:paddingBottom="@dimen/toolbar_button_vertical_padding" - android:background="@drawable/button_bg" + android:background="@drawable/button_bg" android:gravity="center_horizontal|center_vertical" android:textColor="@color/workspace_all_apps_and_delete_zone_text_color" diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml index f05f9b68e..2d5a34fa6 100644 --- a/res/layout-port/launcher.xml +++ b/res/layout-port/launcher.xml @@ -80,19 +80,6 @@ android:focusable="true" android:clickable="true" /> - <com.android.launcher2.DeleteZone - android:id="@+id/delete_zone" - android:layout_width="@dimen/delete_zone_size" - android:layout_height="@dimen/delete_zone_size" - android:paddingTop="@dimen/delete_zone_padding" - android:layout_gravity="bottom|center_horizontal" - - android:scaleType="center" - android:drawableLeft="@drawable/delete_zone_selector" - android:visibility="invisible" - launcher:direction="horizontal" - /> - <RelativeLayout android:id="@+id/all_apps_button_cluster" android:layout_width="fill_parent" diff --git a/res/layout/qsb_bar.xml b/res/layout/qsb_bar.xml index 54692249a..820fae69d 100644 --- a/res/layout/qsb_bar.xml +++ b/res/layout/qsb_bar.xml @@ -13,17 +13,17 @@ See the License for the specific language governing permissions and limitations under the License. --> -<FrameLayout +<com.android.launcher2.SearchDropTargetBar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher" android:focusable="false"> <!-- Search buttons container --> <LinearLayout + style="@style/SearchDropTargetBar" android:id="@+id/qsb_search_bar" android:layout_width="match_parent" - android:layout_height="match_parent" - style="@style/SearchBar"> + android:layout_height="match_parent"> <!-- Global search icon --> <ImageView style="@style/SearchButton" @@ -61,10 +61,32 @@ <!-- Drag specific targets container --> <LinearLayout + style="@style/SearchDropTargetBar" android:id="@+id/drag_target_bar" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="#FF00FF00" - android:visibility="gone"> + android:alpha="0"> + + <FrameLayout + style="@style/DropTargetButtonContainer" + android:layout_weight="1"> + <!-- Delete target --> + <com.android.launcher2.DeleteDropTarget + style="@style/DropTargetButton" + android:id="@+id/delete_target" + android:text="@string/delete_zone_label_workspace" + android:drawableLeft="@drawable/delete_zone_selector" /> + </FrameLayout> + + <FrameLayout + style="@style/DropTargetButtonContainer" + android:layout_weight="1"> + <!-- Info target --> + <com.android.launcher2.InfoDropTarget + style="@style/DropTargetButton" + android:id="@+id/info_target" + android:text="@string/info_target_label" + android:drawableLeft="@drawable/ic_home_info_holo_dark" /> + </FrameLayout> </LinearLayout> -</FrameLayout> +</com.android.launcher2.SearchDropTargetBar> diff --git a/res/values-land/strings.xml b/res/values-land/strings.xml new file mode 100644 index 000000000..bbe8ff21f --- /dev/null +++ b/res/values-land/strings.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +* Copyright (C) 2011 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Manifest configuration. --> + <skip /> + + <!-- Label for delete drop target. [CHAR_LIMIT=30] --> + <string name="delete_target_label"></string> + <!-- Label for uninstall drop target. [CHAR_LIMIT=30]--> + <string name="delete_target_uninstall_label"></string> + <!-- Label for the info icon. [CHAR_LIMIT=30] --> + <string name="info_target_label"></string> +</resources> diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml index 50aba0949..4daaeccac 100644 --- a/res/values-land/styles.xml +++ b/res/values-land/styles.xml @@ -19,7 +19,7 @@ <resources> <!-- Search Bar --> - <style name="SearchBar"> + <style name="SearchDropTargetBar"> <item name="android:orientation">vertical</item> </style> <style name="SearchButton"> @@ -34,6 +34,20 @@ <item name="android:layout_height">wrap_content</item> <item name="android:layout_gravity">center_horizontal</item> </style> + <style name="DropTargetButtonContainer"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">0dp</item> + </style> + <style name="DropTargetButton"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_gravity">center_vertical</item> + <item name="android:gravity">center_horizontal</item> + <item name="android:paddingTop">@dimen/toolbar_button_vertical_padding</item> + <item name="android:paddingBottom">@dimen/toolbar_button_vertical_padding</item> + <item name="android:paddingLeft">@dimen/toolbar_button_horizontal_padding</item> + <item name="android:paddingRight">@dimen/toolbar_button_horizontal_padding</item> + </style> <style name="HotseatButton"> <item name="android:paddingTop">12dip</item> diff --git a/res/values/colors.xml b/res/values/colors.xml index 6c372e356..e14fbfe37 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -18,10 +18,14 @@ */ --> <resources> + <!-- The color tints to apply to the text and drag view when hovering + over the delete target or the info target --> + <color name="delete_target_hover_tint">#A5FF0000</color> + <color name="info_target_hover_tint">#A50000FE</color> + <color name="window_background">#FF191919</color> <color name="grid_dark_background">#EB191919</color> <color name="bubble_dark_background">#20000000</color> - <color name="delete_color_filter">#A5FF0000</color> <color name="appwidget_error_color">#FCCC</color> <color name="snag_callout_color">#F444</color> @@ -29,7 +33,6 @@ <color name="gesture_color">#ff0563c1</color> <color name="uncertain_gesture_color">#ff848484</color> - <color name="app_info_filter">#A50000FE</color> <color name="dimmed_view_color">#FF7F7F7F</color> <color name="drag_outline_color">#6595f9</color> diff --git a/res/values/strings.xml b/res/values/strings.xml index 32e649d25..e59fd6ed6 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -162,6 +162,13 @@ device. [CHAR_LIMIT=30]--> <string name="delete_zone_label_all_apps">Uninstall</string> + <!-- Label for delete drop target. [CHAR_LIMIT=30] --> + <string name="delete_target_label">Remove</string> + <!-- Label for uninstall drop target. [CHAR_LIMIT=30]--> + <string name="delete_target_uninstall_label">Uninstall</string> + <!-- Label for the info icon. [CHAR_LIMIT=30] --> + <string name="info_target_label">Manage</string> + <!-- Accessibility: Search button --> <string name="accessibility_search_button">Search</string> <!-- Accessibility: Voice Search button --> diff --git a/res/values/styles.xml b/res/values/styles.xml index c3e6ce97a..36a4be02c 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -68,7 +68,7 @@ <item name="android:layout_marginRight">10dip</item> </style> - <style name="SearchBar"> + <style name="SearchDropTargetBar"> <item name="android:orientation">horizontal</item> </style> <style name="SearchButton"> @@ -83,7 +83,19 @@ <item name="android:layout_height">match_parent</item> <item name="android:layout_gravity">center_vertical</item> </style> - + <style name="DropTargetButtonContainer"> + <item name="android:layout_width">0dp</item> + <item name="android:layout_height">match_parent</item> + </style> + <style name="DropTargetButton"> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_height">match_parent</item> + <item name="android:layout_gravity">center_horizontal</item> + <item name="android:gravity">center_vertical</item> + <item name="android:drawablePadding">7.5dp</item> + <item name="android:paddingTop">@dimen/toolbar_button_vertical_padding</item> + <item name="android:paddingBottom">@dimen/toolbar_button_vertical_padding</item> + </style> <style name="TabIndicator"> <item name="android:layout_width">wrap_content</item> |