diff options
author | 2024-12-17 00:38:56 +0000 | |
---|---|---|
committer | 2024-12-17 01:12:58 +0000 | |
commit | 8d39bdabbb9e70690638b4fdbfa7b916614de99f (patch) | |
tree | c3eff6f2a339452620dd346fdab3241966b93567 | |
parent | 07f9eded27ccfa5978d2c3e3ce4f5487a5d2d87e (diff) |
[DocsUI M3] Fixed the move issue for filter chips
After moving the filter chips padding from the container to the
chip group, we need to update the code to use padding start as
it's moving origin.
Check the fixed demo in the bug.
Bug: 384574562
Test: Manual inpsection, click/tap the filter chips
Flag: com.android.documentsui.flags.use_material3
Change-Id: I34151e53f5bd4ac10dfdec3d4567b50cb5167cf1
-rw-r--r-- | src/com/android/documentsui/queries/SearchChipViewManager.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/documentsui/queries/SearchChipViewManager.java b/src/com/android/documentsui/queries/SearchChipViewManager.java index 3dbc6ff74..193cccb3f 100644 --- a/src/com/android/documentsui/queries/SearchChipViewManager.java +++ b/src/com/android/documentsui/queries/SearchChipViewManager.java @@ -454,13 +454,13 @@ public class SearchChipViewManager { .getResources() .getDimensionPixelSize(R.dimen.search_chip_spacing); final boolean isRtl = mChipGroup.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL; - final float chipMarginStartEnd = + final float chipGroupPaddingStart = useMaterial3() - ? 0 + ? mChipGroup.getPaddingStart() : mChipGroup .getResources() .getDimensionPixelSize(R.dimen.search_chip_half_spacing); - float lastX = isRtl ? mChipGroup.getWidth() - chipMarginStartEnd : chipMarginStartEnd; + float lastX = isRtl ? mChipGroup.getWidth() - chipGroupPaddingStart : chipGroupPaddingStart; // remove all chips except current clicked chip to avoid losing // accessibility focus. |