summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-05-12 11:32:39 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-05-12 11:40:24 -0700
commit0e08f166fafd5e2a0d32e27ea510516e3f762221 (patch)
treeeb68c01e22903219000183b648efd10c8844692d /res
parent44d0aacd5f44623ba87f1c8b3693d74df69d50e5 (diff)
downloadandroid_packages_apps_Trebuchet-0e08f166fafd5e2a0d32e27ea510516e3f762221.tar.gz
android_packages_apps_Trebuchet-0e08f166fafd5e2a0d32e27ea510516e3f762221.tar.bz2
android_packages_apps_Trebuchet-0e08f166fafd5e2a0d32e27ea510516e3f762221.zip
Using BubbleTextView for widget section headers
> Loading highres icons on the worker thread. Change-Id: I5b68a86820aa4c132c156339e497354cf57f0fca
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>