Recalculate view's height when tab is selected
Viewpager2 created view based on the first tab height, when tab is selected, viewpager2 should recalculate height. But this solution may not suitable for App list, so we only enable for Location Settings which have different items in personal & work profile. Bug: 224521665 Test: manual Change-Id: Ib19b30cb82b8b4f13f651795906289da53ded4ed
This commit is contained in:
@@ -22,12 +22,8 @@ import android.content.Context;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A page that configures the Location Services settings for work profile.
|
||||
*/
|
||||
@@ -50,32 +46,15 @@ public class LocationServicesForWork extends DashboardFragment {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||
return buildPreferenceControllers(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
use(LocationInjectedServicesForWorkPreferenceController.class).init(this);
|
||||
}
|
||||
|
||||
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context) {
|
||||
final List<AbstractPreferenceController> controllers = new ArrayList<>();
|
||||
return controllers;
|
||||
}
|
||||
|
||||
/**
|
||||
* For Search.
|
||||
*/
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.location_services_workprofile) {
|
||||
|
||||
@Override
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(Context
|
||||
context) {
|
||||
return buildPreferenceControllers(context);
|
||||
}
|
||||
};
|
||||
new BaseSearchIndexProvider(R.xml.location_services_workprofile);
|
||||
}
|
||||
|
Reference in New Issue
Block a user