diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2014-10-23 20:29:06 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-10-23 20:29:06 +0000 |
commit | 4a080dcadd532dd259de596729a1cd6e949bdae4 (patch) | |
tree | d4a63c063d76ad9d994145ebbb26b1fafba3e072 /res | |
parent | ef728d42927f127fe8d1fc075aef312892388901 (diff) | |
parent | 0e375f947b698ac6d5bd294968d0cda3003a6f28 (diff) | |
download | android_packages_apps_Trebuchet-4a080dcadd532dd259de596729a1cd6e949bdae4.tar.gz android_packages_apps_Trebuchet-4a080dcadd532dd259de596729a1cd6e949bdae4.tar.bz2 android_packages_apps_Trebuchet-4a080dcadd532dd259de596729a1cd6e949bdae4.zip |
Merge "Some resource fixes for drop target" into ub-now-queens
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/drop_target_bar.xml | 39 | ||||
-rw-r--r-- | res/layout/search_drop_target_bar.xml | 45 | ||||
-rw-r--r-- | res/values-land/styles.xml | 20 | ||||
-rw-r--r-- | res/values-sw340dp/dimens.xml | 8 | ||||
-rw-r--r-- | res/values-sw720dp/styles.xml | 20 | ||||
-rw-r--r-- | res/values/dimens.xml | 1 | ||||
-rw-r--r-- | res/values/strings.xml | 6 | ||||
-rw-r--r-- | res/values/styles.xml | 26 |
8 files changed, 77 insertions, 88 deletions
diff --git a/res/layout/drop_target_bar.xml b/res/layout/drop_target_bar.xml deleted file mode 100644 index f38a50014..000000000 --- a/res/layout/drop_target_bar.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?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. ---> -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - <FrameLayout - xmlns:android="http://schemas.android.com/apk/res/android" - style="@style/DropTargetButtonContainer" - android:layout_weight="1"> - <!-- Delete target --> - <com.android.launcher3.DeleteDropTarget - style="@style/DropTargetButton" - android:id="@+id/delete_target_text" - android:text="@string/delete_zone_label_workspace" - android:drawableStart="@drawable/remove_target_selector" /> - </FrameLayout> - <FrameLayout - xmlns:android="http://schemas.android.com/apk/res/android" - style="@style/DropTargetButtonContainer" - android:layout_weight="1"> - <!-- Info target --> - <com.android.launcher3.InfoDropTarget - style="@style/DropTargetButton" - android:id="@+id/info_target_text" - android:text="@string/info_target_label" - android:drawableStart="@drawable/info_target_selector" /> - </FrameLayout> -</merge> diff --git a/res/layout/search_drop_target_bar.xml b/res/layout/search_drop_target_bar.xml index 2d51b93ab..af2d01634 100644 --- a/res/layout/search_drop_target_bar.xml +++ b/res/layout/search_drop_target_bar.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 The Android Open Source Project +<!-- + 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. @@ -13,21 +14,45 @@ See the License for the specific language governing permissions and limitations under the License. --> -<com.android.launcher3.SearchDropTargetBar - xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="horizontal" - android:focusable="false" +<com.android.launcher3.SearchDropTargetBar xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:focusable="false" + android:orientation="horizontal" > <!-- Drag specific targets container --> + <LinearLayout android:id="@+id/drag_target_bar" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_gravity="center"> + android:layout_gravity="center" > + + <FrameLayout + style="@style/DropTargetButtonContainer" + android:layout_weight="1" > + + <!-- Delete target --> - <include - layout="@layout/drop_target_bar" /> + <com.android.launcher3.DeleteDropTarget + android:id="@+id/delete_target_text" + style="@style/DropTargetButton" + android:drawableStart="@drawable/remove_target_selector" + android:text="@string/delete_zone_label_workspace" /> + </FrameLayout> + + <FrameLayout + style="@style/DropTargetButtonContainer" + android:layout_weight="1" > + + <!-- Info target --> + + <com.android.launcher3.InfoDropTarget + android:id="@+id/info_target_text" + style="@style/DropTargetButton" + android:drawableStart="@drawable/info_target_selector" + android:text="@string/info_target_label" /> + </FrameLayout> </LinearLayout> -</com.android.launcher3.SearchDropTargetBar> + +</com.android.launcher3.SearchDropTargetBar>
\ No newline at end of file diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml index ac210d7de..8a255c91b 100644 --- a/res/values-land/styles.xml +++ b/res/values-land/styles.xml @@ -18,27 +18,25 @@ --> <resources> -<!-- Search Bar --> - <style name="SearchButton"> - </style> + + <!-- Search Bar --> + <style name="SearchButton"></style> + <style name="DropTargetButtonContainer"> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">wrap_content</item> </style> - <style name="DropTargetButton"> - <item name="android:layout_width">wrap_content</item> + + <!-- This style applies to the drop target when it is shown in the sidebar --> + <style name="DropTargetButton" parent="DropTargetButton.Base"> <item name="android:layout_height">wrap_content</item> - <item name="android:layout_gravity">center</item> <item name="android:gravity">center</item> + <item name="android:drawablePadding">0dp</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> <item name="android:shadowColor">#DD000000</item> - <item name="android:shadowDx">0.0</item> - <item name="android:shadowDy">1.0</item> - <item name="android:shadowRadius">4.0</item> </style> -</resources> - +</resources>
\ No newline at end of file diff --git a/res/values-sw340dp/dimens.xml b/res/values-sw340dp/dimens.xml index 69d6e58a3..c9f2981f7 100644 --- a/res/values-sw340dp/dimens.xml +++ b/res/values-sw340dp/dimens.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 The Android Open Source Project +<!-- + 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. @@ -15,6 +16,9 @@ --> <resources> + <!-- Drag padding to add to the bottom of drop targets --> <dimen name="drop_target_drag_padding">20dp</dimen> -</resources> + <dimen name="drop_target_text_size">16sp</dimen> + +</resources>
\ No newline at end of file diff --git a/res/values-sw720dp/styles.xml b/res/values-sw720dp/styles.xml index 4ec04d9b7..cbc1e29b3 100644 --- a/res/values-sw720dp/styles.xml +++ b/res/values-sw720dp/styles.xml @@ -18,26 +18,22 @@ --> <resources> -<!-- Workspace --> - <style name="SearchButton"> - </style> + + <!-- Workspace --> + <style name="SearchButton"></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</item> - <item name="android:gravity">center_vertical</item> - <item name="android:drawablePadding">7.5dp</item> + + <style name="DropTargetButton" parent="DropTargetButton.Base"> <item name="android:paddingLeft">60dp</item> <item name="android:paddingRight">60dp</item> - <item name="android:textColor">#FFFFFFFF</item> - <item name="android:textSize">16sp</item> <item name="android:shadowColor">#393939</item> <item name="android:shadowDx">0.0</item> <item name="android:shadowDy">0.0</item> <item name="android:shadowRadius">2.0</item> </style> -</resources> + +</resources>
\ No newline at end of file diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 2c9e689c6..20bc7ccf9 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -62,6 +62,7 @@ <!-- Drag padding to add to the bottom of drop targets --> <dimen name="drop_target_drag_padding">14dp</dimen> + <dimen name="drop_target_text_size">14sp</dimen> <!-- Dragging --> <!-- the area at the edge of the screen that makes the workspace go left diff --git a/res/values/strings.xml b/res/values/strings.xml index a6397e3ec..b3abe8fac 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -125,11 +125,11 @@ s --> device. [CHAR_LIMIT=30]--> <string name="delete_zone_label_all_apps">Uninstall</string> - <!-- Label for delete drop target. [CHAR_LIMIT=30] --> + <!-- Label for delete drop target. [CHAR_LIMIT=20] --> <string name="delete_target_label">Remove</string> - <!-- Label for uninstall drop target. [CHAR_LIMIT=30]--> + <!-- Label for uninstall drop target. [CHAR_LIMIT=20]--> <string name="delete_target_uninstall_label">Uninstall</string> - <!-- Label for the info icon. [CHAR_LIMIT=30] --> + <!-- Label for the info icon. [CHAR_LIMIT=20] --> <string name="info_target_label">App info</string> <!-- Accessibility: Search button --> diff --git a/res/values/styles.xml b/res/values/styles.xml index 873b74c9f..dae2c0212 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -32,10 +32,9 @@ <item name="android:fontFamily">sans-serif-condensed</item> </style> - <style name="WorkspaceIcon.Portrait"> - </style> - <style name="WorkspaceIcon.Landscape"> - </style> + <style name="WorkspaceIcon.Portrait"></style> + + <style name="WorkspaceIcon.Landscape"></style> <style name="WorkspaceIcon.AppsCustomize"> <item name="android:background">@null</item> @@ -52,15 +51,16 @@ <item name="customShadows">false</item> </style> - <style name="SearchDropTargetBar"> - </style> - <style name="SearchButton"> - </style> + <style name="SearchDropTargetBar"></style> + + <style name="SearchButton"></style> + <style name="DropTargetButtonContainer"> <item name="android:layout_width">0dp</item> <item name="android:layout_height">match_parent</item> </style> - <style name="DropTargetButton"> + + <style name="DropTargetButton.Base"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">match_parent</item> <item name="android:layout_gravity">center</item> @@ -69,7 +69,7 @@ <item name="android:paddingLeft">25dp</item> <item name="android:paddingRight">25dp</item> <item name="android:textColor">#FFFFFFFF</item> - <item name="android:textSize">16sp</item> + <item name="android:textSize">@dimen/drop_target_text_size</item> <item name="android:singleLine">true</item> <item name="android:ellipsize">end</item> <item name="android:shadowColor">#FF000000</item> @@ -78,6 +78,8 @@ <item name="android:shadowRadius">4.0</item> </style> + <style name="DropTargetButton" parent="DropTargetButton.Base"></style> + <style name="PreloadIcon"> <item name="background">@drawable/virtual_preload</item> <item name="indicatorSize">4dp</item> @@ -94,7 +96,9 @@ <style name="PagedViewWidgetImageView"> <item name="android:paddingLeft">@dimen/app_widget_preview_padding_left</item> </style> + <style name="SearchButton.WithPaddingStart"> <item name="android:paddingLeft">8dp</item> </style> -</resources> + +</resources>
\ No newline at end of file |