[Android] Remove padding in Preferences
Geoffrey Métais
git at videolan.org
Thu Dec 13 17:28:02 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Dec 13 17:24:28 2018 +0100| [940d3a4c80b60e4ee2d68866b0be52295027ec70] | committer: Geoffrey Métais
Remove padding in Preferences
This is in contradiction with Material Design Guidelines:
https://material.io/design/platform-guidance/android-settings.html#label-secondary-text
Categories do not respect style, and sitll have padding: To be fixed
> https://code.videolan.org/videolan/vlc-android/commit/940d3a4c80b60e4ee2d68866b0be52295027ec70
---
vlc-android/res/values/styles.xml | 52 +++++++++++++++++++++++++++++++++++++--
1 file changed, 50 insertions(+), 2 deletions(-)
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index 25833225f..7a9f554fe 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -361,14 +361,62 @@
</style>
<!--Preferences-->
- <style name="VLCPreferenceTheme.Light" parent="PreferenceThemeOverlay.v14.Material">
+ <style name="VLCPreferenceTheme.Light" parent="PreferenceThemeOverlay">
<item name="android:textColorPrimary">@color/grey900</item>
<item name="android:textColorSecondary">@color/grey700</item>
+ <item name="preferenceStyle">@style/VLCPreferenceStyle</item>
+ <item name="editTextPreferenceStyle">@style/VLCEditPreferenceStyle</item>
+ <item name="switchPreferenceCompatStyle">@style/VLCSwitchPreferenceStyle</item>
+ <item name="dialogPreferenceStyle">@style/VLCDialogPreferenceStyle</item>
+ <item name="checkBoxPreferenceStyle">@style/VLCCheckBoxPreferenceStyle</item>
+ <item name="preferenceFragmentCompatStyle">@style/PreferenceFragment.Material</item>
+ <item name="preferenceCategoryStyle">@style/VLCPreferenceCategoryStyle</item>
+ <item name="preferenceScreenStyle">@style/VLCPreferenceScreenStyle</item>
</style>
- <style name="VLCPreferenceTheme.Dark" parent="PreferenceThemeOverlay.v14.Material">
+ <style name="VLCPreferenceTheme.Dark" parent="PreferenceThemeOverlay">
<item name="android:textColorPrimary">@color/grey50</item>
<item name="android:textColorSecondary">@color/grey600</item>
+ <item name="preferenceStyle">@style/VLCPreferenceStyle</item>
+ <item name="editTextPreferenceStyle">@style/VLCEditPreferenceStyle</item>
+ <item name="switchPreferenceCompatStyle">@style/VLCSwitchPreferenceStyle</item>
+ <item name="dialogPreferenceStyle">@style/VLCDialogPreferenceStyle</item>
+ <item name="checkBoxPreferenceStyle">@style/VLCCheckBoxPreferenceStyle</item>
+ <item name="preferenceFragmentCompatStyle">@style/PreferenceFragment.Material</item>
+ <item name="preferenceCategoryStyle">@style/VLCPreferenceCategoryStyle</item>
+ <item name="preferenceScreenStyle">@style/VLCPreferenceScreenStyle</item>
+ </style>
+
+ <style name="VLCEditPreferenceStyle" parent="Preference.DialogPreference.EditTextPreference.Material">
+ <item name="iconSpaceReserved">false</item>
+ </style>
+
+ <style name="VLCSwitchPreferenceStyle" parent="Preference.SwitchPreferenceCompat.Material">
+ <item name="iconSpaceReserved">false</item>
+ </style>
+
+ <style name="VLCDialogPreferenceStyle" parent="Preference.DialogPreference.Material">
+ <item name="iconSpaceReserved">false</item>
+ </style>
+
+ <style name="VLCCheckBoxPreferenceStyle" parent="Preference.CheckBoxPreference.Material">
+ <item name="iconSpaceReserved">false</item>
+ </style>
+
+ <style name="VLCPreferenceFragmentStyle" parent="PreferenceFragment.Material">
+ <item name="iconSpaceReserved">false</item>
+ </style>
+
+ <style name="VLCPreferenceScreenStyle" parent="Preference.PreferenceScreen.Material">
+ <item name="iconSpaceReserved">false</item>
+ </style>
+
+ <style name="VLCPreferenceStyle" parent="Preference.Material">
+ <item name="iconSpaceReserved">false</item>
+ </style>
+
+ <style name="VLCPreferenceCategoryStyle" parent="Preference.Category.Material">
+ <item name="iconSpaceReserved">false</item>
</style>
<!-- Tips Apearance-->
More information about the Android
mailing list