Fix Sharesheet grid items not aligned issue

The "layout_width" field was set to fixed dp for the top level
linearlayout of grid item. Changing it to "match_parent" can fix the
issue. The location of inner layouts are centered now.

Bug: 148515684
Test: build and flashed to crosshatch device. Grid items in sharesheet
are aligned.

Change-Id: Id4ab6c44bfadf7caa00b856d3dba6dbb791200b5
This commit is contained in:
Zhen Zhang
2020-02-25 16:56:53 -08:00
parent 6f01c62d29
commit 16479fd3b2
3 changed files with 1 additions and 3 deletions

View File

@@ -18,7 +18,7 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="@dimen/chooser_target_width"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="100dp"
android:gravity="center"

View File

@@ -764,7 +764,6 @@
<dimen name="chooser_preview_image_border">1dp</dimen>
<dimen name="chooser_preview_image_max_dimen">200dp</dimen>
<dimen name="chooser_preview_width">-1px</dimen>
<dimen name="chooser_target_width">90dp</dimen>
<dimen name="chooser_header_scroll_elevation">4dp</dimen>
<dimen name="chooser_max_collapsed_height">288dp</dimen>
<dimen name="chooser_direct_share_label_placeholder_max_width">72dp</dimen>

View File

@@ -2734,7 +2734,6 @@
<java-symbol type="string" name="chooser_no_direct_share_targets" />
<java-symbol type="drawable" name="chooser_row_layer_list" />
<java-symbol type="dimen" name="chooser_view_spacing" />
<java-symbol type="dimen" name="chooser_target_width" />
<java-symbol type="dimen" name="chooser_edge_margin_thin" />
<java-symbol type="dimen" name="chooser_edge_margin_normal" />
<java-symbol type="dimen" name="chooser_preview_image_font_size"/>