Switch to use small icon for most app related pages

- Renamed AppProgressPreference to AppPreference to handle most app
  related prefs
- Add ed AppSwitchPreference - the same layout as AppPreference except
  it's a SwitchPreference
- Use above 2 prefs in most app related pages.
  - Everything under special access pages
  - Recent app list in App & notifications
  - App data usage detail page
  - Default app picker pages

Bug: 65182905
Test: robotests
Change-Id: I96c980ba1db49e36dabe25b5eade1197215aad11
This commit is contained in:
Fan Zhang
2017-10-28 15:11:49 -07:00
parent 974d2fe080
commit 1c3a4de93d
25 changed files with 350 additions and 121 deletions

View File

@@ -21,8 +21,8 @@ import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.UserHandle;
import android.os.UserManager;
import android.support.annotation.LayoutRes;
import android.support.annotation.VisibleForTesting;
import android.support.annotation.XmlRes;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceScreen;
import android.text.TextUtils;
@@ -135,7 +135,7 @@ public abstract class RadioButtonPickerFragment extends InstrumentedPreferenceFr
final PreferenceScreen screen = getPreferenceScreen();
screen.removeAll();
final int customLayoutResId = getRadioButtomPreferenceCustomLayoutResId();
final int customLayoutResId = getRadioButtonPreferenceCustomLayoutResId();
if (shouldShowItemNone()) {
final RadioButtonPreference nonePref = new RadioButtonPreference(getPrefContext());
if (customLayoutResId > 0) {
@@ -218,8 +218,8 @@ public abstract class RadioButtonPickerFragment extends InstrumentedPreferenceFr
/**
* Provides a custom layout for each candidate row.
*/
@XmlRes
protected int getRadioButtomPreferenceCustomLayoutResId() {
@LayoutRes
protected int getRadioButtonPreferenceCustomLayoutResId() {
return 0;
}