summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/settings/Utils.java7
-rwxr-xr-xsrc/com/android/settings/applications/InstalledAppDetails.java2
-rw-r--r--src/com/android/settings/notification/NotificationStation.java2
3 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index cd5dec7..8401941 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -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);
}
/**
diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java
index fc4d37d..463520d 100755
--- a/src/com/android/settings/applications/InstalledAppDetails.java
+++ b/src/com/android/settings/applications/InstalledAppDetails.java
@@ -454,7 +454,7 @@ public class InstalledAppDetails extends Fragment
final View view = inflater.inflate(R.layout.installed_app_details, container, false);
final ViewGroup allDetails = (ViewGroup) view.findViewById(R.id.all_details);
- Utils.forceCustomPadding(allDetails);
+ Utils.forceCustomPadding(allDetails, true /* additive padding */);
mRootView = view;
mComputingStr = getActivity().getText(R.string.computing_size);
diff --git a/src/com/android/settings/notification/NotificationStation.java b/src/com/android/settings/notification/NotificationStation.java
index 8b5e150..024d863 100644
--- a/src/com/android/settings/notification/NotificationStation.java
+++ b/src/com/android/settings/notification/NotificationStation.java
@@ -142,7 +142,7 @@ public class NotificationStation extends SettingsPreferenceFragment {
super.onActivityCreated(savedInstanceState);
ListView listView = getListView();
- Utils.forceCustomPadding(listView);
+ Utils.forceCustomPadding(listView, false /* non additive padding */);
mAdapter = new NotificationHistoryAdapter(mContext);
listView.setAdapter(mAdapter);