summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-05-12 22:11:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-12 22:12:00 +0000
commit07b75b85c20530cf7c66a1f5b5cba5437ba127f6 (patch)
treea394270ba968d9d687439cd225e97eacd4bc8aa5 /res
parent19e4d9db28ee6487428879aacd053c319771b51c (diff)
parent0e08f166fafd5e2a0d32e27ea510516e3f762221 (diff)
downloadandroid_packages_apps_Trebuchet-07b75b85c20530cf7c66a1f5b5cba5437ba127f6.tar.gz
android_packages_apps_Trebuchet-07b75b85c20530cf7c66a1f5b5cba5437ba127f6.tar.bz2
android_packages_apps_Trebuchet-07b75b85c20530cf7c66a1f5b5cba5437ba127f6.zip
Merge "Using BubbleTextView for widget section headers" into ub-launcher3-burnaby
Diffstat (limited to 'res')
-rw-r--r--res/layout/widgets_list_row_view.xml50
-rw-r--r--res/values/attrs.xml1
-rw-r--r--res/values/dimens.xml6
3 files changed, 26 insertions, 31 deletions
diff --git a/res/layout/widgets_list_row_view.xml b/res/layout/widgets_list_row_view.xml
index ea95d2407..8bc8be44a 100644
--- a/res/layout/widgets_list_row_view.xml
+++ b/res/layout/widgets_list_row_view.xml
@@ -15,6 +15,7 @@
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:id="@+id/widgets_cell_list_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -23,36 +24,29 @@
android:descendantFocusability="afterDescendants">
<!-- Section info -->
- <LinearLayout
+
+ <com.android.launcher3.BubbleTextView
+ android:id="@+id/section"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
+ android:layout_height="@dimen/widget_section_height"
+ android:background="@color/widget_text_panel"
+ android:drawablePadding="@dimen/widget_section_horizontal_padding"
+ android:ellipsize="end"
android:focusable="true"
- android:descendantFocusability="afterDescendants">
- <ImageView
- android:id="@+id/section_image"
- android:layout_height="@dimen/widget_section_height"
- android:layout_width="@dimen/widget_section_icon_width"
- android:paddingLeft="@dimen/widget_section_icon_horizontal_padding"
- android:paddingRight="@dimen/widget_section_icon_horizontal_padding"
- android:paddingTop="@dimen/widget_section_icon_vertical_padding"
- android:paddingBottom="@dimen/widget_section_icon_vertical_padding"
- android:background="@color/widget_text_panel"
- />
- <TextView
- android:id="@+id/section"
- android:layout_width="match_parent"
- android:layout_height="@dimen/widget_section_height"
- android:paddingEnd="@dimen/widget_preview_label_horizontal_padding"
- android:paddingRight="@dimen/widget_preview_label_horizontal_padding"
- android:singleLine="true"
- android:ellipsize="end"
- android:gravity="start|center_vertical"
- android:textColor="@color/widgets_view_section_text_color"
- android:background="@color/widget_text_panel"
- android:textSize="20sp"
- android:focusable="false" />
- </LinearLayout>
+ android:gravity="start|center_vertical"
+ android:importantForAccessibility="no"
+ android:paddingBottom="@dimen/widget_section_vertical_padding"
+ android:paddingLeft="@dimen/widget_section_horizontal_padding"
+ android:paddingRight="@dimen/widget_section_horizontal_padding"
+ android:paddingTop="@dimen/widget_section_vertical_padding"
+ android:singleLine="true"
+ android:textColor="@color/widgets_view_section_text_color"
+ android:textSize="20sp"
+ launcher:customShadows="false"
+ launcher:deferShadowGeneration="true"
+ launcher:iconDisplay="widget_section"
+ launcher:iconSizeOverride="@dimen/widget_section_icon_size"
+ launcher:layoutHorizontal="true" />
<!-- Widget list -->
<com.android.launcher3.widget.WidgetRowView
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index fee3417b0..782d050b5 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -25,6 +25,7 @@
<attr name="iconDisplay" format="integer">
<enum name="workspace" value="0" />
<enum name="all_apps" value="1" />
+ <enum name="widget_section" value="2" />
</attr>
<attr name="deferShadowGeneration" format="boolean" />
<attr name="customShadows" format="boolean" />
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 5447371a4..6280e5247 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -95,9 +95,9 @@
<dimen name="widget_preview_horizontal_padding">8dp</dimen>
<dimen name="widget_section_height">56dp</dimen>
- <dimen name="widget_section_icon_width">72dp</dimen>
- <dimen name="widget_section_icon_vertical_padding">8dp</dimen>
- <dimen name="widget_section_icon_horizontal_padding">16dp</dimen>
+ <dimen name="widget_section_icon_size">40dp</dimen>
+ <dimen name="widget_section_vertical_padding">8dp</dimen>
+ <dimen name="widget_section_horizontal_padding">16dp</dimen>
<!-- Equation: widget_preview_size + 2 * widget_preview_padding_horizontal -->
<dimen name="widget_preview_container_width">146dp</dimen>