Display setting and support in a tab layout - DO NOT MERGE
Bug: 28269035 Bug: 28139604
This commit is contained in:
@@ -49,6 +49,7 @@ import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.SearchView;
|
||||
|
||||
import com.android.internal.util.ArrayUtils;
|
||||
import com.android.settings.Settings.WifiSettingsActivity;
|
||||
import com.android.settings.accessibility.AccessibilitySettings;
|
||||
@@ -68,7 +69,7 @@ import com.android.settings.applications.UsageAccessDetails;
|
||||
import com.android.settings.applications.WriteSettingsDetails;
|
||||
import com.android.settings.applications.VrListenerSettings;
|
||||
import com.android.settings.bluetooth.BluetoothSettings;
|
||||
import com.android.settings.dashboard.DashboardSummary;
|
||||
import com.android.settings.dashboard.DashboardContainerFragment;
|
||||
import com.android.settings.dashboard.SearchResultsSummary;
|
||||
import com.android.settings.datausage.DataUsageSummary;
|
||||
import com.android.settings.deviceinfo.PrivateVolumeForget;
|
||||
@@ -613,7 +614,7 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
// Show Search affordance
|
||||
mDisplaySearch = true;
|
||||
mInitialTitleResId = R.string.dashboard_title;
|
||||
switchToFragment(DashboardSummary.class.getName(), null, false, false,
|
||||
switchToFragment(DashboardContainerFragment.class.getName(), null, false, false,
|
||||
mInitialTitleResId, mInitialTitle, false);
|
||||
}
|
||||
}
|
||||
@@ -687,7 +688,7 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the id of the view continaing the main content. Should be called before calling super's
|
||||
* Sets the id of the view containing the main content. Should be called before calling super's
|
||||
* onCreate.
|
||||
*/
|
||||
protected void setMainContentId(int contentId) {
|
||||
@@ -729,7 +730,7 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
setTitleFromBackStack();
|
||||
}
|
||||
|
||||
private int setTitleFromBackStack() {
|
||||
private void setTitleFromBackStack() {
|
||||
final int count = getFragmentManager().getBackStackEntryCount();
|
||||
|
||||
if (count == 0) {
|
||||
@@ -738,13 +739,11 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
} else {
|
||||
setTitle(mInitialTitle);
|
||||
}
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
FragmentManager.BackStackEntry bse = getFragmentManager().getBackStackEntryAt(count - 1);
|
||||
setTitleFromBackStackEntry(bse);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
private void setTitleFromBackStackEntry(FragmentManager.BackStackEntry bse) {
|
||||
@@ -1196,6 +1195,7 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
if (current != null && current instanceof SearchResultsSummary) {
|
||||
mSearchResultsFragment = (SearchResultsSummary) current;
|
||||
} else {
|
||||
setContentHeaderView(null);
|
||||
mSearchResultsFragment = (SearchResultsSummary) switchToFragment(
|
||||
SearchResultsSummary.class.getName(), null, false, true,
|
||||
R.string.search_results_title, null, true);
|
||||
|
Reference in New Issue
Block a user