From 060b364718fb5d56a5f6deda096aa8df186b04fb Mon Sep 17 00:00:00 2001 From: Stefan Andonian Date: Tue, 15 Apr 2025 11:31:50 -0700 Subject: [PATCH] When only folder page indicator is visible, set gravity to End. Bug: 394355070 Test: Verified locally that indicator dots are not cut off with 6 pages. Flag: com.android.launcher3.enable_launcher_visual_refresh Change-Id: I1804cc7b8de032415cb8fe557a0e98a8f4acb5cd --- src/com/android/launcher3/folder/Folder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java index af44391b7b..7debb6b017 100644 --- a/src/com/android/launcher3/folder/Folder.java +++ b/src/com/android/launcher3/folder/Folder.java @@ -52,6 +52,7 @@ import android.util.Log; import android.util.Pair; import android.util.TypedValue; import android.view.FocusFinder; +import android.view.Gravity; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; @@ -61,6 +62,7 @@ import android.view.WindowInsets; import android.view.accessibility.AccessibilityEvent; import android.view.animation.AnimationUtils; import android.view.inputmethod.EditorInfo; +import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.IntDef; @@ -205,7 +207,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo private FolderNameEditText mFolderName; private PageIndicatorDots mPageIndicator; - protected View mFooter; + protected LinearLayout mFooter; private int mFooterHeight; // Cell ranks used for drag and drop @@ -1290,6 +1292,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo ((MarginLayoutParams) mFolderName.getLayoutParams()).setMarginStart(0); // The post is necessary for margins to be recalculated. RTL UI is shifted otherwise. mFolderName.post(() -> mFolderName.setVisibility(View.GONE)); + mFooter.setGravity(Gravity.END); } }