summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2014-10-23 18:38:15 (GMT)
committerDanesh M <daneshm90@gmail.com>2015-09-28 01:55:56 (GMT)
commit6cc6efbf2352a591755d6993c381b08502b0a634 (patch)
tree9526c11c32560ef953114e2cce4562fce03856be
parente95e8184f30a749167aa415bfabe706509159467 (diff)
downloadandroid_packages_apps_Trebuchet-6cc6efbf2352a591755d6993c381b08502b0a634.zip
android_packages_apps_Trebuchet-6cc6efbf2352a591755d6993c381b08502b0a634.tar.gz
android_packages_apps_Trebuchet-6cc6efbf2352a591755d6993c381b08502b0a634.tar.bz2
Some resource fixes for drop target
> Making it singleline with ellipsis everywhere > Decreasing the text size on smaller devices > Decreasing char limit for various labels Bug: 17563793 Bug: 17938450 Change-Id: I8ad1a156de0601d07419b2cc6418389bc2e24a4e
-rw-r--r--res/layout/drop_target_bar.xml39
-rw-r--r--res/layout/search_drop_target_bar.xml45
-rw-r--r--res/values-land/styles.xml20
-rw-r--r--res/values-sw340dp/dimens.xml8
-rw-r--r--res/values-sw720dp/styles.xml20
-rw-r--r--res/values/dimens.xml1
-rw-r--r--res/values/strings.xml6
-rw-r--r--res/values/styles.xml24
8 files changed, 76 insertions, 87 deletions
diff --git a/res/layout/drop_target_bar.xml b/res/layout/drop_target_bar.xml
deleted file mode 100644
index f38a500..0000000
--- 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 2d51b93..af2d0163 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 ac210d7..8a255c9 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 69d6e58..c9f2981 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 4ec04d9..cbc1e29 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 97a12ab..e324f63 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -70,6 +70,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>
<dimen name="infomation_count_height">14dp</dimen>
<dimen name="infomation_count_min_width">14dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 42feb09..581e9aa 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 b0e1cb3..2ffb0b9 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>
@@ -90,6 +90,8 @@
<item name="android:maxLines">2</item>
</style>
+ <style name="DropTargetButton" parent="DropTargetButton.Base"></style>
+
<style name="PreloadIcon">
<item name="background">@drawable/virtual_preload</item>
<item name="indicatorSize">4dp</item>
@@ -106,7 +108,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>