diff options
author | 2025-03-14 06:18:23 +0000 | |
---|---|---|
committer | 2025-03-14 06:18:57 +0000 | |
commit | ff7dd896e30199ff0b380dade26d46108036ee8b (patch) | |
tree | 26481e65e7333d6d4fe67aa392556c1155a896fe /src/com | |
parent | e1604abe849bae1601dd879ce2fb494702dac184 (diff) |
[DocsUI] Click search chip should reset scroll view
When we have too many search chips which can't be display
in one screen (e.g. on compact size screen), clicking the
chip should reset the horizontal scroll view so the checked
chip can be seen.
Check the attached bug for the before/after comparison.
Bug: 403433043
Test: m DocumentsUIGoogle && manual inspection
Test: atest DocumentsUIGoogleTests:com.android.documentsui.queries.SearchChipViewManagerTest#testChipChecked_resetScroll
Flag: com.android.documentsui.flags.use_material3
Change-Id: Ib0bcd7295953940215c967e021f8ca96e465d6f1
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/documentsui/queries/SearchChipViewManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/documentsui/queries/SearchChipViewManager.java b/src/com/android/documentsui/queries/SearchChipViewManager.java index f673b7408..12e418969 100644 --- a/src/com/android/documentsui/queries/SearchChipViewManager.java +++ b/src/com/android/documentsui/queries/SearchChipViewManager.java @@ -518,7 +518,7 @@ public class SearchChipViewManager { } // Let the first checked chip can be shown. - View parent = (View) mChipGroup.getParent(); + View parent = (View) mChipGroup.getParent().getParent(); if (parent instanceof HorizontalScrollView) { final int scrollToX = isRtl ? parent.getWidth() : 0; ((HorizontalScrollView) parent).smoothScrollTo(scrollToX, 0); |