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
This commit is contained in:
Mill Chen
2021-12-23 18:37:52 +08:00
parent 779488b1ca
commit 28195f52a6

View File

@@ -17,6 +17,7 @@
package com.android.settings.localepicker; package com.android.settings.localepicker;
import android.app.FragmentTransaction; import android.app.FragmentTransaction;
import android.app.ListFragment;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.MenuItem; import android.view.MenuItem;
@@ -47,6 +48,14 @@ public class LocalePickerWithRegionActivity extends SettingsBaseActivity
.commit(); .commit();
} }
@Override
protected void onStart() {
super.onStart();
final ListFragment listFragment =
(ListFragment) getFragmentManager().findFragmentById(R.id.content_frame);
listFragment.getListView().setNestedScrollingEnabled(true);
}
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) { if (item.getItemId() == android.R.id.home) {