Add maxWidth to pause work app button and ellipsize at the end
Width of text given by UX is 214dp so we can set the maxWidth and ellipsize at the end.
Bug: 298447370
Test: Manual photo: https://screenshot.googleplex.com/98Jnuh3TmLCtd24
Flag: n/a
Change-Id: I750a1669f94f22f60f4fb22db7d6b0ed7678c506
diff --git a/res/layout/work_mode_fab.xml b/res/layout/work_mode_fab.xml
index 32e3b77..276d73e 100644
--- a/res/layout/work_mode_fab.xml
+++ b/res/layout/work_mode_fab.xml
@@ -37,11 +37,14 @@
android:id="@+id/pause_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:maxWidth="@dimen/work_fab_width"
android:textColor="@color/work_fab_icon_color"
android:textSize="14sp"
android:includeFontPadding="false"
android:textDirection="locale"
android:text="@string/work_apps_pause_btn_text"
android:layout_marginStart="@dimen/work_fab_text_start_margin"
+ android:ellipsize="end"
+ android:maxLines="1"
style="@style/TextHeadline"/>
</com.android.launcher3.allapps.WorkModeSwitch>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index c6fce28..10f47cb 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -141,6 +141,7 @@
<dimen name="work_fab_icon_size">24dp</dimen>
<dimen name="work_fab_text_start_margin">8dp</dimen>
<dimen name="work_card_padding_horizontal">10dp</dimen>
+ <dimen name="work_fab_width">214dp</dimen>
<dimen name="work_card_button_height">52dp</dimen>
<dimen name="work_fab_margin">16dp</dimen>
<dimen name="work_fab_margin_bottom">20dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 1b46b4d..a2f4a61 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -433,7 +433,7 @@
<!-- button string shown to dismiss work tab education -->
<string name="work_apps_paused_edu_accept">Got it</string>
- <!-- button string shown pause work profile -->
+ <!-- button string shown pause work profile [CHAR LIMIT=28] -->
<string name="work_apps_pause_btn_text">Pause work apps</string>
<!-- button string shown enable work profile -->
<string name="work_apps_enable_btn_text">Unpause</string>