From 28195f52a6965b1f071119a9bdd1683f958df441 Mon Sep 17 00:00:00 2001 From: Mill Chen Date: Thu, 23 Dec 2021 18:37:52 +0800 Subject: [PATCH] Fix overlapping issue for Add a language page As the Add a language page changed its parent class, the collapsing toolbar did not work smoothly. Also the nested scrolling feature of the locale list is disabled, that caused the overlapping problem. This change is to make the locale list enable the nested scrolling feature. Fixes: 207318265 Test: manual test Change-Id: I95929cd569c94d392c325e4e5b2a35e78185d0b8 --- .../localepicker/LocalePickerWithRegionActivity.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/com/android/settings/localepicker/LocalePickerWithRegionActivity.java b/src/com/android/settings/localepicker/LocalePickerWithRegionActivity.java index bcc55e3a2db..0d7d531814b 100644 --- a/src/com/android/settings/localepicker/LocalePickerWithRegionActivity.java +++ b/src/com/android/settings/localepicker/LocalePickerWithRegionActivity.java @@ -17,6 +17,7 @@ package com.android.settings.localepicker; import android.app.FragmentTransaction; +import android.app.ListFragment; import android.content.Intent; import android.os.Bundle; import android.view.MenuItem; @@ -47,6 +48,14 @@ public class LocalePickerWithRegionActivity extends SettingsBaseActivity .commit(); } + @Override + protected void onStart() { + super.onStart(); + final ListFragment listFragment = + (ListFragment) getFragmentManager().findFragmentById(R.id.content_frame); + listFragment.getListView().setNestedScrollingEnabled(true); + } + @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) {