diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2015-05-12 15:36:20 -0700 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2015-05-12 15:40:09 -0700 |
commit | 5cd1d92f6c40b47eff12859d4e13b6431aa778c0 (patch) | |
tree | 044fd811140620ef5c03b0b764f99d19c5ef4172 /res/layout | |
parent | fc9d3d8bcb70216de7709d3edaf9759ac8156b45 (diff) | |
download | android_packages_apps_Trebuchet-5cd1d92f6c40b47eff12859d4e13b6431aa778c0.tar.gz android_packages_apps_Trebuchet-5cd1d92f6c40b47eff12859d4e13b6431aa778c0.tar.bz2 android_packages_apps_Trebuchet-5cd1d92f6c40b47eff12859d4e13b6431aa778c0.zip |
Fixing several layout issues.
- N7/N9 indented area should not block scroll view
- separator at the end of the widget cell should not show up on the last item.
Not covered in this CL:
- Guarantee that last item is showing only 20~40%. Right now, the
hand picked constant works for N5,6,7,9
b/20338324
b/20763871
Change-Id: I274ab95c6c3e2fc8be8ceafb2e8172c0174a41a5
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/widget_cell.xml | 12 | ||||
-rw-r--r-- | res/layout/widgets_list_row_view.xml | 37 |
2 files changed, 20 insertions, 29 deletions
diff --git a/res/layout/widget_cell.xml b/res/layout/widget_cell.xml index 196dfca66..a85f0aa16 100644 --- a/res/layout/widget_cell.xml +++ b/res/layout/widget_cell.xml @@ -16,13 +16,12 @@ <com.android.launcher3.widget.WidgetCell xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res-auto" - android:layout_width="@dimen/widget_preview_container_width" - android:layout_height="@dimen/widget_cell_height" + android:layout_width="wrap_content" + android:layout_height="wrap_content" android:layout_weight="1" - android:layout_marginEnd="@dimen/widget_row_divider" android:orientation="vertical" - android:background="@color/widgets_cell_color" android:focusable="true" + android:background="@color/widgets_cell_color" android:gravity="center_horizontal"> <LinearLayout @@ -73,9 +72,8 @@ <com.android.launcher3.widget.WidgetImageView android:id="@+id/widget_preview" style="@style/WidgetImageView" - android:layout_width="match_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:scaleType="matrix" /> - -</com.android.launcher3.widget.WidgetCell> +</com.android.launcher3.widget.WidgetCell>
\ No newline at end of file diff --git a/res/layout/widgets_list_row_view.xml b/res/layout/widgets_list_row_view.xml index 8bc8be44a..2cbdb5cff 100644 --- a/res/layout/widgets_list_row_view.xml +++ b/res/layout/widgets_list_row_view.xml @@ -48,26 +48,19 @@ launcher:iconSizeOverride="@dimen/widget_section_icon_size" launcher:layoutHorizontal="true" /> - <!-- Widget list --> - <com.android.launcher3.widget.WidgetRowView - android:id="@+id/widget_row" - android:layout_width="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="match_parent" - android:scrollbars="none" > - <LinearLayout - android:id="@+id/widgets_cell_list" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:background="@color/widget_text_panel"/> - </HorizontalScrollView> - </com.android.launcher3.widget.WidgetRowView> + <HorizontalScrollView + android:id="@+id/widgets_scroll_container" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scrollbars="none" > + <LinearLayout + android:id="@+id/widgets_cell_list" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/widget_row_padding" + android:orientation="horizontal" + android:divider="@drawable/widgets_row_divider" + android:showDividers="middle" + android:background="@color/widgets_cell_color"/> + </HorizontalScrollView> </LinearLayout> |