diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-05-15 17:01:14 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-05-19 11:51:23 -0700 |
commit | f52abd7758b8f245522936e941336e574debabf5 (patch) | |
tree | 04e44db278dd19e3059d2ccf888157dad0e0b294 /res/layout | |
parent | 436eeb6b971fa27bf7df85494d4da0e878803665 (diff) | |
download | packages_apps_Trebuchet-f52abd7758b8f245522936e941336e574debabf5.tar.gz packages_apps_Trebuchet-f52abd7758b8f245522936e941336e574debabf5.tar.bz2 packages_apps_Trebuchet-f52abd7758b8f245522936e941336e574debabf5.zip |
Widget cell improvement
> Using a custom view for preview, instead of extensing image view
> Preventing relayout when applying preview
> Removing unnecessary method calls
Bug: 21133230
Change-Id: Iab12fa1e5c871ee43a9fb0e6b6af897fecfb345f
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/widget_cell.xml | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/res/layout/widget_cell.xml b/res/layout/widget_cell.xml index 500cf107f..7fefebaec 100644 --- a/res/layout/widget_cell.xml +++ b/res/layout/widget_cell.xml @@ -39,16 +39,15 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" - android:gravity="start" - android:singleLine="true" android:ellipsize="end" android:fadingEdge="horizontal" - android:textColor="@color/widgets_view_item_text_color" - android:textSize="14sp" - android:textAlignment="viewStart" android:fontFamily="sans-serif-condensed" + android:gravity="start" + android:shadowColor="#B0000000" android:shadowRadius="2.0" - android:shadowColor="#B0000000" /> + android:singleLine="true" + android:textColor="@color/widgets_view_item_text_color" + android:textSize="14sp" /> <!-- The original dimensions of the widget (can't be the same text as above due to different style. --> @@ -58,22 +57,18 @@ android:layout_height="wrap_content" android:layout_marginStart="5dp" android:layout_marginLeft="5dp" - android:layout_weight="0" - android:gravity="start" android:textColor="@color/widgets_view_item_text_color" android:textSize="14sp" - android:textAlignment="viewStart" android:fontFamily="sans-serif-condensed" android:shadowRadius="2.0" android:shadowColor="#B0000000" /> </LinearLayout> - <!-- The image of the widget. --> + <!-- The image of the widget. This view does not support padding. Any placement adjustment + should be done using margins. --> <com.android.launcher3.widget.WidgetImageView android:id="@+id/widget_preview" - style="@style/WidgetImageView" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="1" - android:scaleType="matrix" /> + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" /> </com.android.launcher3.widget.WidgetCell>
\ No newline at end of file |