Descrease bubble bottom text scaling factor.
Also set TextView width according to the scaling factor so texts don't go off screen when scaling.
Test: manual
PiperOrigin-RevId: 182452685
Change-Id: If438f1b7e0432c2856bd2cb937adfc4131e57410
diff --git a/java/com/android/newbubble/BottomActionViewController.java b/java/com/android/newbubble/BottomActionViewController.java
index a34d3a2..485d041 100644
--- a/java/com/android/newbubble/BottomActionViewController.java
+++ b/java/com/android/newbubble/BottomActionViewController.java
@@ -34,7 +34,7 @@
private static final int SHOW_TARGET_DELAY = 100;
private static final int SHOW_HIDE_TARGET_DURATION = 175;
private static final int HIGHLIGHT_TARGET_DURATION = 150;
- private static final float HIGHLIGHT_TARGET_SCALE = 1.5f;
+ private static final float HIGHLIGHT_TARGET_SCALE = 1.3f;
private static final float UNHIGHLIGHT_TARGET_ALPHA = 0.38f;
private final Context context;
diff --git a/java/com/android/newbubble/res/layout/bottom_action_base.xml b/java/com/android/newbubble/res/layout/bottom_action_base.xml
index af7f798..8f7ba75 100644
--- a/java/com/android/newbubble/res/layout/bottom_action_base.xml
+++ b/java/com/android/newbubble/res/layout/bottom_action_base.xml
@@ -17,20 +17,29 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/bubble_bottom_action_view_height"
+ android:weightSum="2"
android:orientation="horizontal"
android:gravity="center"
android:background="@drawable/bottom_action_scrim">
+ <!-- Add space to make sure text is not off screen when scaled. (1 - 1/1.3) / 2 ~= 0.11 -->
+ <View
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="0.11"/>
+
<LinearLayout
android:id="@+id/bottom_action_dismiss_layout"
android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_weight="1"
+ android:layout_weight="0.78"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/bubble_bottom_action_text_offset"
+ android:maxLines="2"
+ android:ellipsize="end"
android:textColor="@color/bubble_button_color_white"
android:textSize="16sp"
android:fontFamily="roboto-medium"
@@ -41,16 +50,23 @@
android:elevation="2dp"/>
</LinearLayout>
+ <View
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="0.22"/>
+
<LinearLayout
android:id="@+id/bottom_action_end_call_layout"
android:layout_width="0dp"
android:layout_height="match_parent"
- android:layout_weight="1"
+ android:layout_weight="0.78"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/bubble_bottom_action_text_offset"
+ android:maxLines="2"
+ android:ellipsize="end"
android:textColor="@color/bubble_button_color_white"
android:textSize="16sp"
android:fontFamily="roboto-medium"
@@ -61,4 +77,9 @@
android:elevation="2dp"/>
</LinearLayout>
+ <View
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="0.11"/>
+
</LinearLayout>
\ No newline at end of file
diff --git a/java/com/android/newbubble/res/values/strings.xml b/java/com/android/newbubble/res/values/strings.xml
index ce7d456..08c685e 100644
--- a/java/com/android/newbubble/res/values/strings.xml
+++ b/java/com/android/newbubble/res/values/strings.xml
@@ -25,8 +25,8 @@
double tap to collapse call action menu". -->
<string name="a11y_bubble_primary_button_collapse_action">Collapse call action menu</string>
- <!-- The label of drag-and-drop target for dismissing bubble. [CHAR LIMIT=10]-->
+ <!-- The label of drag-and-drop target for dismissing bubble. [CHAR LIMIT=20]-->
<string name="bubble_bottom_action_hide">Hide</string>
- <!-- The label of drag-and-drop target for ending call. [CHAR LIMIT=10]-->
+ <!-- The label of drag-and-drop target for ending call. [CHAR LIMIT=20]-->
<string name="bubble_bottom_action_end_call">End call</string>
-</resources>
\ No newline at end of file
+</resources>