Remove DashboardStatusFragment and hide sliding tab layout.

Bug: 28090184
Change-Id: I34ff46d0f5ba87c824d1484f1018fad154696e15
This commit is contained in:
Fan Zhang
2016-04-11 09:17:57 -07:00
parent 872c61249b
commit 3645373b6f
5 changed files with 2 additions and 76 deletions

View File

@@ -33,15 +33,13 @@ import com.android.settings.InstrumentedFragment;
import com.android.settings.R;
import com.android.settings.widget.SlidingTabLayout;
import com.android.settingslib.HelpUtils;
import com.android.settingslib.drawer.SettingsDrawerActivity;
/**
* Container for Dashboard fragments.
*/
public final class DashboardContainerFragment extends InstrumentedFragment {
private static final int INDEX_BRIEF_FRAGMENT = 0;
private static final int INDEX_SUMMARY_FRAGMENT = 1;
private static final int INDEX_SUMMARY_FRAGMENT = 0;
private ViewPager mViewPager;
private View mHeaderView;
@@ -73,9 +71,6 @@ public final class DashboardContainerFragment extends InstrumentedFragment {
public void onResume() {
super.onResume();
final Activity activity = getActivity();
if (activity instanceof SettingsDrawerActivity) {
((SettingsDrawerActivity) getActivity()).setContentHeaderView(mHeaderView);
}
}
@Override
@@ -98,8 +93,6 @@ public final class DashboardContainerFragment extends InstrumentedFragment {
@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case INDEX_BRIEF_FRAGMENT:
return mContext.getString(R.string.page_tab_title_status);
case INDEX_SUMMARY_FRAGMENT:
return mContext.getString(R.string.page_tab_title_summary);
}
@@ -109,8 +102,6 @@ public final class DashboardContainerFragment extends InstrumentedFragment {
@Override
public Fragment getItem(int position) {
switch (position) {
case INDEX_BRIEF_FRAGMENT:
return new DashboardStatusFragment();
case INDEX_SUMMARY_FRAGMENT:
return new DashboardSummary();
default:
@@ -123,7 +114,7 @@ public final class DashboardContainerFragment extends InstrumentedFragment {
@Override
public int getCount() {
return 2;
return 1;
}
}
}

View File

@@ -1,41 +0,0 @@
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings.dashboard;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.android.settings.InstrumentedFragment;
import com.android.settings.R;
/**
* Dashboard fragment for showing status and suggestions.
*/
public final class DashboardStatusFragment extends InstrumentedFragment {
@Override
protected int getMetricsCategory() {
return DASHBOARD_STATUS;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
return inflater.inflate(R.layout.dashboard_status, parent, false);
}
}