Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78b5f6a9 authored by Lyn Han's avatar Lyn Han Committed by Automerger Merge Worker
Browse files

Merge "Fix a11y count for overflow bubbles" into rvc-dev am: 5538b27d am: a4a603fc

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11758237

Change-Id: I11ef674792410b06bd5b0650484066680a0b8136
parents a7da76a5 a4a603fc
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -75,6 +75,20 @@ public class BubbleOverflowActivity extends Activity {
            }
            return false;
        }

        @Override
        public int getColumnCountForAccessibility(RecyclerView.Recycler recycler,
                RecyclerView.State state) {
            int bubbleCount = state.getItemCount();
            int columnCount = super.getColumnCountForAccessibility(recycler, state);
            if (bubbleCount < columnCount) {
                // If there are 4 columns and bubbles <= 3,
                // TalkBack says "AppName 1 of 4 in list 4 items"
                // This is a workaround until TalkBack bug is fixed for GridLayoutManager
                return bubbleCount;
            }
            return columnCount;
        }
    }

    @Inject