Fine tune the homepage scrolling behavior

Scroll to the highlight position before showing homepage.

Bug: 199017944
Bug: 204946469
Test: visual
Change-Id: I11708f42180a3af22855ac7b5f53460f737ed208
This commit is contained in:
Jason Chiu
2021-11-04 17:09:53 +08:00
parent 774c2181ea
commit ae5327d4bb
5 changed files with 58 additions and 18 deletions

View File

@@ -201,7 +201,8 @@ public class TopLevelSettings extends DashboardFragment implements
@Override
protected RecyclerView.Adapter onCreateAdapter(PreferenceScreen preferenceScreen) {
if (!ActivityEmbeddingUtils.isEmbeddingActivityEnabled(getContext())) {
if (!ActivityEmbeddingUtils.isEmbeddingActivityEnabled(getContext())
|| !(getActivity() instanceof SettingsHomepageActivity)) {
return super.onCreateAdapter(preferenceScreen);
}