Left align preferences and graphs to leave space for icon.

Bug: 33559277
Test: Visual inspection
Change-Id: Iacf9556826174a03b1cbf8a6f179b63d8686c5f5
This commit is contained in:
Fan Zhang
2016-12-19 11:14:59 -08:00
parent 1aba712008
commit ec407ff78c
22 changed files with 113 additions and 208 deletions

View File

@@ -18,7 +18,7 @@
xmlns:settings="http://schemas.android.com/apk/res-auto" xmlns:settings="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingStart="@dimen/preference_no_icon_padding_start"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:orientation="vertical"> android:orientation="vertical">

View File

@@ -21,7 +21,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingTop="1dp" android:paddingTop="1dp"
android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingStart="@dimen/preference_no_icon_padding_start"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"> android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
<TextView <TextView

View File

@@ -1,75 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:gravity="center_vertical"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:background="?android:attr/selectableItemBackground">
<ImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dip"
android:layout_marginEnd="6dip"
android:layout_gravity="center"
android:contentDescription="@null" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="15dip"
android:paddingTop="16dip"
android:paddingBottom="16dip">
<TextView
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
android:textColor="?android:attr/textColorPrimary"
android:ellipsize="marquee"
android:fadingEdge="horizontal" />
<TextView
android:id="@android:id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@android:id/title"
android:layout_alignStart="@android:id/title"
android:visibility="gone"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.Material.Body1"
android:textColor="?android:attr/textColorSecondary"
android:maxLines="10" />
</RelativeLayout>
<LinearLayout
android:id="@android:id/widget_frame"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:minWidth="58dip"
android:gravity="end|center_vertical"
android:orientation="vertical" />
</LinearLayout>

View File

@@ -35,6 +35,7 @@
android:id="@android:id/icon" android:id="@android:id/icon"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:tint="?android:attr/textColorPrimary"
android:maxWidth="18dp" android:maxWidth="18dp"
android:maxHeight="18dp"/> android:maxHeight="18dp"/>
</LinearLayout> </LinearLayout>

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->
<!-- Layout used for PreferenceCategory in a PreferenceActivity. -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
android:textAppearance="@android:style/TextAppearance.Material.Body2"
android:textColor="?android:attr/colorAccent"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingTop="16dip" />

View File

@@ -16,37 +16,46 @@
<!-- Layout used for ProgressCategory in bluetooth settings. --> <!-- Layout used for ProgressCategory in bluetooth settings. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="?android:attr/listSeparatorTextViewStyle" android:layout_width="match_parent"
android:background="@null" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_height="wrap_content" android:layout_marginBottom="16dp"
android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingTop="16dp"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"> android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
<LinearLayout
android:id="@+id/icon_container"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:gravity="start|center_vertical"
android:orientation="horizontal">
<com.android.internal.widget.PreferenceImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tint="?android:attr/textColorPrimary"
android:maxWidth="18dp"
android:maxHeight="18dp"/>
</LinearLayout>
<!-- This text view has the style of the list separator text view without the background and padding. --> <!-- This text view has the style of the list separator text view without the background and padding. -->
<TextView <TextView
android:textAppearance="@android:style/TextAppearance.Material.Body2"
android:textColor="?android:attr/colorAccent"
android:background="@null"
android:id="@android:id/title" android:id="@android:id/title"
android:paddingStart="0dp"
android:paddingTop="6dp"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:layout_gravity="start|center" android:layout_gravity="start|center"
/> android:textAppearance="@android:style/TextAppearance.Material.Body2"/>
<ProgressBar <ProgressBar
android:id="@+id/scanning_progress" android:id="@+id/scanning_progress"
android:text="@string/progress_scanning" style="?android:attr/progressBarStyleSmallTitle"
android:paddingTop="6dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="16dip" android:layout_marginStart="16dip"
style="?android:attr/progressBarStyleSmallTitle" android:text="@string/progress_scanning"/>
/>
</LinearLayout> </LinearLayout>

View File

@@ -20,18 +20,18 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingStart="@dimen/preference_no_icon_padding_start"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="48sp" android:layout_height="48dp"
android:singleLine="true" android:singleLine="true"
android:ellipsize="marquee" android:ellipsize="marquee"
android:textAppearance="@android:style/TextAppearance.Material.Body2" android:textAppearance="@android:style/TextAppearance.Material.Body2"
android:textColor="?android:attr/colorAccent" android:textColor="?android:attr/textColorPrimary"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:gravity="left|center_vertical" android:gravity="left|center_vertical"
android:text="@string/running_processes_header_title" /> android:text="@string/running_processes_header_title" />
@@ -44,12 +44,12 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="32sp" android:layout_height="32dp"
android:layout_marginTop="8sp" android:layout_marginTop="8dp"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:layout_width="16sp" android:layout_width="16dp"
android:layout_height="16sp" android:layout_height="16dp"
android:layout_gravity="center" android:layout_gravity="center"
android:scaleType="centerInside" android:scaleType="centerInside"
android:src="@color/running_processes_system_ram" android:src="@color/running_processes_system_ram"
@@ -90,11 +90,11 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="32sp" android:layout_height="32dp"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:layout_width="16sp" android:layout_width="16dp"
android:layout_height="16sp" android:layout_height="16dp"
android:layout_gravity="center" android:layout_gravity="center"
android:scaleType="centerInside" android:scaleType="centerInside"
android:src="?android:attr/colorAccent" android:src="?android:attr/colorAccent"
@@ -135,11 +135,11 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="32sp" android:layout_height="32dp"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:layout_width="16sp" android:layout_width="16dp"
android:layout_height="16sp" android:layout_height="16dp"
android:layout_gravity="center" android:layout_gravity="center"
android:scaleType="centerInside" android:scaleType="centerInside"
android:src="@color/running_processes_free_ram" android:src="@color/running_processes_free_ram"
@@ -182,11 +182,11 @@
android:id="@+id/listHeader" android:id="@+id/listHeader"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="48dp" android:layout_height="48dp"
android:layout_marginTop="8sp" android:layout_marginTop="8dp"
android:singleLine="true" android:singleLine="true"
android:ellipsize="marquee" android:ellipsize="marquee"
android:textAppearance="@android:style/TextAppearance.Material.Body2" android:textAppearance="@android:style/TextAppearance.Material.Body2"
android:textColor="?android:attr/colorAccent" android:textColor="?android:attr/textColorPrimary"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:gravity="left|center_vertical" android:gravity="left|center_vertical"
android:text="@string/running_processes_header_footer" /> android:text="@string/running_processes_header_footer" />

View File

@@ -18,7 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingStart="@dimen/preference_no_icon_padding_start"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:orientation="vertical"> android:orientation="vertical">

View File

@@ -18,6 +18,9 @@
<!-- This file only contains custom attribute and style definition for preferences --> <!-- This file only contains custom attribute and style definition for preferences -->
<!-- Things unrelated to preference framework UI customization should go to other styles files --> <!-- Things unrelated to preference framework UI customization should go to other styles files -->
<resources> <resources>
<dimen name="preference_no_icon_padding_start">72dp</dimen>
<style name="ApnPreference"> <style name="ApnPreference">
<item name="android:layout">@layout/apn_preference_layout</item> <item name="android:layout">@layout/apn_preference_layout</item>
</style> </style>

View File

@@ -18,8 +18,7 @@
android:title="@string/memory_usage"> android:title="@string/memory_usage">
<PreferenceCategory <PreferenceCategory
android:title="@string/average_memory_use" android:title="@string/average_memory_use"/>
android:layout="@layout/preference_category_short" />
<com.android.settings.SummaryPreference <com.android.settings.SummaryPreference
android:key="status_header" android:key="status_header"

View File

@@ -19,8 +19,7 @@
android:title="@string/data_usage_summary_title"> android:title="@string/data_usage_summary_title">
<PreferenceCategory <PreferenceCategory
android:title="@string/usage" android:title="@string/usage">
android:layout="@layout/preference_category_short">
<com.android.settings.SummaryPreference <com.android.settings.SummaryPreference
android:key="status_header" android:key="status_header"

View File

@@ -18,8 +18,7 @@
android:title="@string/data_usage_summary_title"> android:title="@string/data_usage_summary_title">
<PreferenceCategory <PreferenceCategory
android:key="usage_amount" android:key="usage_amount">
android:layout="@layout/preference_category_short">
<com.android.settings.datausage.ChartDataUsagePreference <com.android.settings.datausage.ChartDataUsagePreference
android:key="chart_data" /> android:key="chart_data" />

View File

@@ -29,18 +29,18 @@
android:title="@string/battery_level_title" android:title="@string/battery_level_title"
android:summary="@string/device_info_not_available" android:summary="@string/device_info_not_available"
android:persistent="false" /> android:persistent="false" />
<PreferenceScreen android:key="sim_status" <Preference android:key="sim_status"
android:title="@string/sim_status_title" android:title="@string/sim_status_title"
android:persistent="false"> android:persistent="false">
<intent android:targetPackage="com.android.settings" <intent android:targetPackage="com.android.settings"
android:targetClass="com.android.settings.Settings$SimStatusActivity" /> android:targetClass="com.android.settings.Settings$SimStatusActivity" />
</PreferenceScreen> </Preference>
<PreferenceScreen android:key="imei_info" <Preference android:key="imei_info"
android:title="@string/imei_information_title" android:title="@string/imei_information_title"
android:persistent="false"> android:persistent="false">
<intent android:targetPackage="com.android.settings" <intent android:targetPackage="com.android.settings"
android:targetClass="com.android.settings.Settings$ImeiInformationActivity" /> android:targetClass="com.android.settings.Settings$ImeiInformationActivity" />
</PreferenceScreen> </Preference>
<com.android.settings.CopyablePreference android:key="wifi_ip_address" <com.android.settings.CopyablePreference android:key="wifi_ip_address"
android:enabled="false" android:enabled="false"
android:shouldDisableView="false" android:shouldDisableView="false"

View File

@@ -20,8 +20,7 @@
android:key="app_list"> android:key="app_list">
<PreferenceCategory <PreferenceCategory
android:title="@string/average_memory_use" android:title="@string/average_memory_use"/>
android:layout="@layout/preference_category_short" />
<com.android.settings.SummaryPreference <com.android.settings.SummaryPreference
android:key="status_header" android:key="status_header"

View File

@@ -33,16 +33,19 @@ public class ProgressCategory extends ProgressCategoryBase {
private boolean mNoDeviceFoundAdded; private boolean mNoDeviceFoundAdded;
public ProgressCategory(Context context) { public ProgressCategory(Context context) {
this(context, null); super(context);
setLayoutResource(R.layout.preference_progress_category);
} }
public ProgressCategory(Context context, AttributeSet attrs) { public ProgressCategory(Context context, AttributeSet attrs) {
super(context, attrs, 0); super(context, attrs);
setLayoutResource(R.layout.preference_progress_category);
} }
public ProgressCategory(Context context, AttributeSet attrs, public ProgressCategory(Context context, AttributeSet attrs,
int defStyleAttr) { int defStyleAttr) {
this(context, attrs, defStyleAttr, 0); super(context, attrs, defStyleAttr);
setLayoutResource(R.layout.preference_progress_category);
} }
public ProgressCategory(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { public ProgressCategory(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
@@ -71,7 +74,7 @@ public class ProgressCategory extends ProgressCategoryBase {
} else { } else {
if (!mNoDeviceFoundAdded) { if (!mNoDeviceFoundAdded) {
if (mNoDeviceFoundPreference == null) { if (mNoDeviceFoundPreference == null) {
mNoDeviceFoundPreference = new Preference(getPreferenceManager().getContext()); mNoDeviceFoundPreference = new Preference(getContext());
mNoDeviceFoundPreference.setLayoutResource(R.layout.preference_empty_list); mNoDeviceFoundPreference.setLayoutResource(R.layout.preference_empty_list);
mNoDeviceFoundPreference.setTitle(mEmptyTextRes); mNoDeviceFoundPreference.setTitle(mEmptyTextRes);
mNoDeviceFoundPreference.setSelectable(false); mNoDeviceFoundPreference.setSelectable(false);

View File

@@ -22,15 +22,15 @@ import android.util.AttributeSet;
public abstract class ProgressCategoryBase extends PreferenceCategory { public abstract class ProgressCategoryBase extends PreferenceCategory {
public ProgressCategoryBase(Context context) { public ProgressCategoryBase(Context context) {
this(context, null); super(context);
} }
public ProgressCategoryBase(Context context, AttributeSet attrs) { public ProgressCategoryBase(Context context, AttributeSet attrs) {
this(context, attrs, 0); super(context, attrs);
} }
public ProgressCategoryBase(Context context, AttributeSet attrs, int defStyleAttr) { public ProgressCategoryBase(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr, 0); super(context, attrs, defStyleAttr);
} }
public ProgressCategoryBase(Context context, AttributeSet attrs, int defStyleAttr, public ProgressCategoryBase(Context context, AttributeSet attrs, int defStyleAttr,
@@ -40,6 +40,7 @@ public abstract class ProgressCategoryBase extends PreferenceCategory {
/** /**
* Turn on/off the progress indicator and text on the right. * Turn on/off the progress indicator and text on the right.
*
* @param progressOn whether or not the progress should be displayed * @param progressOn whether or not the progress should be displayed
*/ */
public abstract void setProgress(boolean progressOn); public abstract void setProgress(boolean progressOn);

View File

@@ -203,12 +203,6 @@ public class RunningProcessesView extends FrameLayout
} }
} }
static class TimeTicker extends TextView {
public TimeTicker(Context context, AttributeSet attrs) {
super(context, attrs);
}
}
class ServiceListAdapter extends BaseAdapter { class ServiceListAdapter extends BaseAdapter {
final RunningState mState; final RunningState mState;
final LayoutInflater mInflater; final LayoutInflater mInflater;

View File

@@ -85,8 +85,6 @@ public final class BluetoothDevicePreference extends Preference implements
mCachedDevice = cachedDevice; mCachedDevice = cachedDevice;
setLayoutResource(R.layout.preference_bt_icon);
if (cachedDevice.getBondState() == BluetoothDevice.BOND_BONDED) { if (cachedDevice.getBondState() == BluetoothDevice.BOND_BONDED) {
UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE); UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE);
if (!um.hasUserRestriction(DISALLOW_CONFIG_BLUETOOTH)) { if (!um.hasUserRestriction(DISALLOW_CONFIG_BLUETOOTH)) {

View File

@@ -27,21 +27,28 @@ import com.android.settings.R;
*/ */
public class BluetoothProgressCategory extends ProgressCategory { public class BluetoothProgressCategory extends ProgressCategory {
public BluetoothProgressCategory(Context context) { public BluetoothProgressCategory(Context context) {
this(context, null); super(context);
init();
} }
public BluetoothProgressCategory(Context context, AttributeSet attrs) { public BluetoothProgressCategory(Context context, AttributeSet attrs) {
this(context, attrs, 0); super(context, attrs);
init();
} }
public BluetoothProgressCategory(Context context, AttributeSet attrs, int defStyleAttr) { public BluetoothProgressCategory(Context context, AttributeSet attrs, int defStyleAttr) {
this(context, attrs, defStyleAttr, 0); super(context, attrs, defStyleAttr);
init();
} }
public BluetoothProgressCategory(Context context, AttributeSet attrs, int defStyleAttr, public BluetoothProgressCategory(Context context, AttributeSet attrs, int defStyleAttr,
int defStyleRes) { int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes); super(context, attrs, defStyleAttr, defStyleRes);
init();
}
private void init() {
setIcon(R.drawable.ic_settings_bluetooth);
setEmptyTextRes(R.string.bluetooth_no_devices_found); setEmptyTextRes(R.string.bluetooth_no_devices_found);
} }
} }

View File

@@ -161,13 +161,13 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
@Override @Override
void addPreferencesForActivity() { void addPreferencesForActivity() {
addPreferencesFromResource(R.xml.bluetooth_settings); addPreferencesFromResource(R.xml.bluetooth_settings);
final Context prefContext = getPrefContext();
mPairedDevicesCategory = new PreferenceCategory(getPrefContext()); mPairedDevicesCategory = new PreferenceCategory(prefContext);
mPairedDevicesCategory.setKey(KEY_PAIRED_DEVICES); mPairedDevicesCategory.setKey(KEY_PAIRED_DEVICES);
mPairedDevicesCategory.setOrder(1); mPairedDevicesCategory.setOrder(1);
getPreferenceScreen().addPreference(mPairedDevicesCategory); getPreferenceScreen().addPreference(mPairedDevicesCategory);
mAvailableDevicesCategory = new BluetoothProgressCategory(getActivity()); mAvailableDevicesCategory = new BluetoothProgressCategory(prefContext);
mAvailableDevicesCategory.setSelectable(false); mAvailableDevicesCategory.setSelectable(false);
mAvailableDevicesCategory.setOrder(2); mAvailableDevicesCategory.setOrder(2);
getPreferenceScreen().addPreference(mAvailableDevicesCategory); getPreferenceScreen().addPreference(mAvailableDevicesCategory);

View File

@@ -25,6 +25,7 @@ import android.os.Looper;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.provider.Settings.Global; import android.provider.Settings.Global;
import android.support.v4.content.res.TypedArrayUtils;
import android.support.v7.preference.PreferenceViewHolder; import android.support.v7.preference.PreferenceViewHolder;
import android.telephony.SubscriptionInfo; import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager; import android.telephony.SubscriptionManager;
@@ -53,7 +54,9 @@ public class CellDataPreference extends CustomDialogPreference implements Templa
private SubscriptionManager mSubscriptionManager; private SubscriptionManager mSubscriptionManager;
public CellDataPreference(Context context, AttributeSet attrs) { public CellDataPreference(Context context, AttributeSet attrs) {
super(context, attrs, android.R.attr.switchPreferenceStyle); super(context, attrs, TypedArrayUtils.getAttr(context,
android.support.v7.preference.R.attr.switchPreferenceStyle,
android.R.attr.switchPreferenceStyle));
} }
@Override @Override

View File

@@ -46,14 +46,6 @@ import java.lang.ref.WeakReference;
import static android.content.Context.CONNECTIVITY_SERVICE; import static android.content.Context.CONNECTIVITY_SERVICE;
import static android.content.Context.WIFI_SERVICE; import static android.content.Context.WIFI_SERVICE;
/**
* Display the following information
* # Battery Strength : TODO
* # Uptime
* # Awake Time
* # XMPP/buzz/tickle status : TODO
*
*/
public class Status extends SettingsPreferenceFragment { public class Status extends SettingsPreferenceFragment {
private static final String KEY_BATTERY_STATUS = "battery_status"; private static final String KEY_BATTERY_STATUS = "battery_status";