Fix App Info padding

- need to add to the previous defined on instead of replacing it
- verified also that Notification Station padding is ok too

See bug: #13140648 Settings needs to support the new Quantum Paper theme

Change-Id: I06394bec2a5baa548f34f3fe7ec19d60172a98e8
This commit is contained in:
Fabrice Di Meglio
2014-07-28 18:25:14 -07:00
parent 9e041f02ec
commit 0f4a779214
3 changed files with 7 additions and 4 deletions

View File

@@ -390,13 +390,16 @@ public final class Utils {
}
}
public static void forceCustomPadding(View view) {
public static void forceCustomPadding(View view, boolean additive) {
final Resources res = view.getResources();
final int paddingSide = res.getDimensionPixelSize(R.dimen.settings_side_margin);
final int paddingStart = paddingSide + (additive ? view.getPaddingStart() : 0);
final int paddingEnd = paddingSide + (additive ? view.getPaddingEnd() : 0);
final int paddingBottom = res.getDimensionPixelSize(
com.android.internal.R.dimen.preference_fragment_padding_bottom);
view.setPaddingRelative(paddingSide, 0, paddingSide, paddingBottom);
view.setPaddingRelative(paddingStart, 0, paddingEnd, paddingBottom);
}
/**