summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2015-05-11 14:55:07 -0700
committerHyunyoung Song <hyunyoungs@google.com>2015-05-11 14:55:07 -0700
commit4b69f2ca91d63a59dfa921ba965b92de7f604f5a (patch)
tree4a7a4dbf92dd9ea33909b4803a6be97c7d9043d5 /res/layout
parent5b3707352bc2300cafaa350c0b71a04065bafcd2 (diff)
downloadandroid_packages_apps_Trebuchet-4b69f2ca91d63a59dfa921ba965b92de7f604f5a.tar.gz
android_packages_apps_Trebuchet-4b69f2ca91d63a59dfa921ba965b92de7f604f5a.tar.bz2
android_packages_apps_Trebuchet-4b69f2ca91d63a59dfa921ba965b92de7f604f5a.zip
Ensure that clipping widget size is 20~40% of its width on every devices
b/20338324 b/20763871 Change-Id: I69114cb6dfec95c473313a440a6db76a052e5601
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/widget_cell.xml6
-rw-r--r--res/layout/widgets_list_row_view.xml11
2 files changed, 9 insertions, 8 deletions
diff --git a/res/layout/widget_cell.xml b/res/layout/widget_cell.xml
index ab23b842e..196dfca66 100644
--- a/res/layout/widget_cell.xml
+++ b/res/layout/widget_cell.xml
@@ -19,10 +19,11 @@
android:layout_width="@dimen/widget_preview_container_width"
android:layout_height="@dimen/widget_cell_height"
android:layout_weight="1"
- android:layout_marginRight="@dimen/widget_row_divider"
+ android:layout_marginEnd="@dimen/widget_row_divider"
android:orientation="vertical"
android:background="@color/widgets_cell_color"
- android:focusable="true">
+ android:focusable="true"
+ android:gravity="center_horizontal">
<LinearLayout
android:layout_width="wrap_content"
@@ -43,7 +44,6 @@
android:singleLine="true"
android:ellipsize="end"
android:fadingEdge="horizontal"
-
android:textColor="@color/widgets_view_item_text_color"
android:textSize="16sp"
android:textAlignment="viewStart"
diff --git a/res/layout/widgets_list_row_view.xml b/res/layout/widgets_list_row_view.xml
index 12f6401e4..ea95d2407 100644
--- a/res/layout/widgets_list_row_view.xml
+++ b/res/layout/widgets_list_row_view.xml
@@ -55,17 +55,18 @@
</LinearLayout>
<!-- Widget list -->
- <RelativeLayout
+ <com.android.launcher3.widget.WidgetRowView
+ android:id="@+id/widget_row"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="@dimen/widget_cell_height"
android:layout_gravity="end"
+ android:layout_marginLeft="@dimen/widget_row_padding"
android:background="@color/widgets_cell_color"
>
<HorizontalScrollView
android:id="@+id/widgets_scroll_container"
android:layout_width="match_parent"
- android:layout_height="@dimen/widget_cell_height"
- android:layout_marginLeft="@dimen/widget_row_padding"
+ android:layout_height="match_parent"
android:scrollbars="none" >
<LinearLayout
android:id="@+id/widgets_cell_list"
@@ -74,5 +75,5 @@
android:orientation="horizontal"
android:background="@color/widget_text_panel"/>
</HorizontalScrollView>
- </RelativeLayout>
+ </com.android.launcher3.widget.WidgetRowView>
</LinearLayout>