From 0b2253b5323c33b622fb8e3986b3e0e6be3b64e8 Mon Sep 17 00:00:00 2001 From: fbaron Date: Tue, 5 Mar 2024 10:51:57 -0800 Subject: [PATCH] Fix folder name touch target size With this update, the touch target height for the folder name is now to match the footer height Flag: NONE Test: Verified on device with talkback turned on Fix: 318463992 Change-Id: I77f07280eb54b442efadf7e7373952ea160fc5d2 --- src/com/android/launcher3/folder/Folder.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java index f013126409..a79746d40c 100644 --- a/src/com/android/launcher3/folder/Folder.java +++ b/src/com/android/launcher3/folder/Folder.java @@ -283,6 +283,8 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo mContent.setFolder(this); mPageIndicator = findViewById(R.id.folder_page_indicator); + mFooter = findViewById(R.id.folder_footer); + mFooterHeight = dp.folderFooterHeightPx; mFolderName = findViewById(R.id.folder_name); mFolderName.setTextSize(TypedValue.COMPLEX_UNIT_PX, dp.folderLabelTextSizePx); mFolderName.setOnBackKeyListener(this); @@ -293,9 +295,10 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_TEXT_FLAG_CAP_WORDS); mFolderName.forceDisableSuggestions(true); - - mFooter = findViewById(R.id.folder_footer); - mFooterHeight = dp.folderFooterHeightPx; + mFolderName.setPadding(mFolderName.getPaddingLeft(), + (mFooterHeight - mFolderName.getLineHeight()) / 2, + mFolderName.getPaddingRight(), + (mFooterHeight - mFolderName.getLineHeight()) / 2); mKeyboardInsetAnimationCallback = new KeyboardInsetAnimationCallback(this); setWindowInsetsAnimationCallback(mKeyboardInsetAnimationCallback);