Always reserve space for preference icons.

This aligns text on preferences on the same screen when some of them
don't have icons.

- Use a custom layout for
  preference
  EditPreference
  switch preference
  VolumeSeekPreference
  DialogPreferencei
  Restricted*Preference
  DropdownPreference

- Moved related style defs into a new file styles_preference.xml,
  because current styles file is too large to read.
- Switch <PreferenceScreen ...> to <Preference ...> for a bunch of
  regular preferences.
- Also removed some dead style.

Bug: 33430928
Test: runtest --path packages/apps/Settings/tests/app/src/com/android/settings/dashboard/PreferenceThemeTest.java

Change-Id: Ic9b75d3f133f2a83cd999297b8596253d4b10161
This commit is contained in:
Fan Zhang
2016-12-09 13:04:24 -08:00
parent 1a71c05c7c
commit 1c118b5f2a
23 changed files with 465 additions and 173 deletions

View File

@@ -29,11 +29,10 @@
<PreferenceCategory
android:title="@string/default_apps_title">
<PreferenceScreen
<Preference
android:key="domain_urls"
android:title="@string/domain_urls_title"
android:fragment="com.android.settings.applications.ManageDomainUrls">
</PreferenceScreen>
android:fragment="com.android.settings.applications.ManageDomainUrls" />
<Preference
android:key="assist_and_voice_input"