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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user