Prevent the screen reader box from unexpected scrolling in dream setting

page.

Bug: 228355186
Test: manual
Change-Id: I66a70d6b12bd3a2766e6879cb27c68a851d1dd87
Merged-In: I66a70d6b12bd3a2766e6879cb27c68a851d1dd87
(cherry picked from commit edfd262be2)
This commit is contained in:
Weiyue Huang
2023-02-21 14:14:14 +08:00
parent 8547eb1921
commit 1b6ab7ec90

View File

@@ -195,6 +195,10 @@ public class DreamSettings extends DashboardFragment implements OnMainSwitchChan
mPreviewButton.setOnClickListener(v -> dreamBackend.preview(dreamBackend.getActiveDream()));
mRecyclerView = super.onCreateRecyclerView(inflater, parent, bundle);
// The enable/disable status change of the nested RecyclerView(Dream Picker) causes the
// focus moving. Make the RecyclerView unfocusable to prevent the unexpected scrolling when
// the focus changes in the TalkBack mode.
mRecyclerView.setFocusable(false);
updatePaddingForPreviewButton();
return mRecyclerView;
}