diff --git a/res/drawable/work_mode_fab_background.xml b/res/drawable/work_mode_fab_background.xml
index 478b8875d2..6be33e86ce 100644
--- a/res/drawable/work_mode_fab_background.xml
+++ b/res/drawable/work_mode_fab_background.xml
@@ -19,9 +19,6 @@
-
diff --git a/res/layout/work_mode_fab.xml b/res/layout/work_mode_fab.xml
index 276d73e8fe..b3484c9410 100644
--- a/res/layout/work_mode_fab.xml
+++ b/res/layout/work_mode_fab.xml
@@ -24,12 +24,15 @@
android:background="@drawable/work_mode_fab_background"
android:forceHasOverlappingRendering="false"
android:contentDescription="@string/work_apps_pause_btn_text"
+ android:paddingStart="@dimen/work_mode_fab_background_start_padding"
+ android:paddingEnd="@dimen/work_mode_fab_background_end_padding"
android:animateLayoutChanges="true">
@@ -43,7 +46,7 @@
android:includeFontPadding="false"
android:textDirection="locale"
android:text="@string/work_apps_pause_btn_text"
- android:layout_marginStart="@dimen/work_fab_text_start_margin"
+ android:layout_marginEnd="@dimen/work_fab_text_end_margin"
android:ellipsize="end"
android:maxLines="1"
style="@style/TextHeadline"/>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 9ed1b7229b..1e5a9574ce 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -147,13 +147,15 @@
56dp
16dp
24dp
- 8dp
+ 12dp
+ 16dp
10dp
214dp
52dp
16dp
20dp
- 16dp
+ 16dp
+ 4dp
20dp
16dp
16dp
diff --git a/src/com/android/launcher3/allapps/WorkModeSwitch.java b/src/com/android/launcher3/allapps/WorkModeSwitch.java
index 72b34c3dbe..60495742fb 100644
--- a/src/com/android/launcher3/allapps/WorkModeSwitch.java
+++ b/src/com/android/launcher3/allapps/WorkModeSwitch.java
@@ -19,7 +19,6 @@ import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.WindowInsets;
-import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -32,7 +31,6 @@ import com.android.launcher3.Insettable;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.KeyboardInsetAnimationCallback;
-import com.android.launcher3.logging.StatsLogManager;
import com.android.launcher3.model.StringCache;
import com.android.launcher3.views.ActivityContext;
/**
@@ -54,9 +52,7 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
// Threshold when user scrolls up/down to determine when should button extend/collapse
private final int mScrollThreshold;
- private ImageView mIcon;
private TextView mTextView;
- private final StatsLogManager mStatsLogManager;
public WorkModeSwitch(@NonNull Context context) {
@@ -72,14 +68,12 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
mContext = context;
mScrollThreshold = Utilities.dpToPx(SCROLL_THRESHOLD_DP);
mActivityContext = ActivityContext.lookupContext(getContext());
- mStatsLogManager = mActivityContext.getStatsLogManager();
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
- mIcon = findViewById(R.id.work_icon);
mTextView = findViewById(R.id.pause_text);
setSelected(true);
KeyboardInsetAnimationCallback keyboardInsetAnimationCallback =