Adding support for customize highlight region in preference

> Also fixing notification dots setting not getting highlighted

Bug: 184747760
Test: Manual
Change-Id: Ic9c2bfbb9750bed60afc14e824181f650c8cff33
This commit is contained in:
Sunny Goyal
2021-04-07 10:16:18 -07:00
parent fc3bc6098f
commit 76e8fdc2bc
4 changed files with 37 additions and 15 deletions

View File

@@ -237,7 +237,9 @@ public class SettingsActivity extends FragmentActivity
RecyclerView list = getListView();
PreferencePositionCallback callback = (PreferencePositionCallback) list.getAdapter();
int position = callback.getPreferenceAdapterPosition(mHighLightKey);
return position >= 0 ? new PreferenceHighlighter(list, position) : null;
return position >= 0 ? new PreferenceHighlighter(
list, position, screen.findPreference(mHighLightKey))
: null;
}
private void requestAccessibilityFocus(@NonNull final RecyclerView rv) {