summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
author Andrey Epin <ayepin@google.com> 2023-04-26 16:15:04 -0700
committer Andrey Epin <ayepin@google.com> 2023-04-26 19:43:20 -0700
commit5d260d54f6352615375a4f1097b7a612be805fb8 (patch)
tree8246d16e95170c1caaf93012f78f7f70d0d3e8fa /java
parent04a5424784c723ff5d59c3585b3308904f25afd4 (diff)
Change target labels' width specs
Set target labels' width to match parent as a workaround for the bug i.e. prevent views bounds change during a transition animation. Fix: 269395540 Test: instrument framework code and the app and check that the tarnsition animation does not change view sizes. Change-Id: I8c2ed012cdba2bebaed7c3f4bc9a8f205406673a
Diffstat (limited to 'java')
-rw-r--r--java/res/layout/resolve_grid_item.xml9
1 files changed, 7 insertions, 2 deletions
diff --git a/java/res/layout/resolve_grid_item.xml b/java/res/layout/resolve_grid_item.xml
index 312ecb7c..168397db 100644
--- a/java/res/layout/resolve_grid_item.xml
+++ b/java/res/layout/resolve_grid_item.xml
@@ -40,9 +40,14 @@
<Space android:layout_width="1dp"
android:layout_height="7dp"/>
+ <!-- NOTE: for id/text1 and id/text2 below set the width to match parent as a workaround for
+ b/269395540 i.e. prevent views bounds change during a transition animation. It does not
+ affect pinned views as we change their layout parameters programmatically (but that's even
+ more narrow possibility and it's not clear if the root cause or the bug would affect it).
+ -->
<!-- App name or Direct Share target name, DS set to 2 lines -->
<TextView android:id="@android:id/text1"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?androidprv:attr/materialColorOnSurface"
@@ -56,7 +61,7 @@
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="12sp"
android:textColor="?androidprv:attr/materialColorOnSurfaceVariant"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lines="1"
android:gravity="top|center_horizontal"