diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2014-07-18 19:58:50 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2014-07-18 19:58:50 -0700 |
commit | 38ba9a2d4350fc7d063ec21c994183258bf7a443 (patch) | |
tree | 2a9f35fcbf167bac85cc2cf7afb4df1b89fbbcc2 | |
parent | 97a18c81119566164de3f548fb25f296f114d81f (diff) | |
download | packages_apps_Settings-38ba9a2d4350fc7d063ec21c994183258bf7a443.tar.gz packages_apps_Settings-38ba9a2d4350fc7d063ec21c994183258bf7a443.tar.bz2 packages_apps_Settings-38ba9a2d4350fc7d063ec21c994183258bf7a443.zip |
Fix AppDetails padding on tablet UI
- force custom padding
See bug #: 13140648 Settings needs to support the new Quantum Paper theme
Change-Id: I5c26402c10a4e717cda22b320ab0790f598591c2
-rw-r--r-- | src/com/android/settings/Utils.java | 9 | ||||
-rwxr-xr-x | src/com/android/settings/applications/InstalledAppDetails.java | 24 |
2 files changed, 22 insertions, 11 deletions
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java index 6255d2a0f..8cb1ff74a 100644 --- a/src/com/android/settings/Utils.java +++ b/src/com/android/settings/Utils.java @@ -382,6 +382,15 @@ public final class Utils { } } + public static void forceCustomPadding(View view) { + final Resources res = view.getResources(); + final int paddingSide = res.getDimensionPixelSize(R.dimen.settings_side_margin); + final int paddingBottom = res.getDimensionPixelSize( + com.android.internal.R.dimen.preference_fragment_padding_bottom); + + view.setPaddingRelative(paddingSide, 0, paddingSide, paddingBottom); + } + /** * Return string resource that best describes combination of tethering * options available on this device. diff --git a/src/com/android/settings/applications/InstalledAppDetails.java b/src/com/android/settings/applications/InstalledAppDetails.java index aa1c01005..fc4d37dcf 100755 --- a/src/com/android/settings/applications/InstalledAppDetails.java +++ b/src/com/android/settings/applications/InstalledAppDetails.java @@ -452,17 +452,19 @@ public class InstalledAppDetails extends Fragment public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.installed_app_details, container, false); - Utils.prepareCustomPreferencesList(container, view, view, false); + + final ViewGroup allDetails = (ViewGroup) view.findViewById(R.id.all_details); + Utils.forceCustomPadding(allDetails); mRootView = view; mComputingStr = getActivity().getText(R.string.computing_size); // Set default values on sizes - mTotalSize = (TextView)view.findViewById(R.id.total_size_text); - mAppSize = (TextView)view.findViewById(R.id.application_size_text); - mDataSize = (TextView)view.findViewById(R.id.data_size_text); - mExternalCodeSize = (TextView)view.findViewById(R.id.external_code_size_text); - mExternalDataSize = (TextView)view.findViewById(R.id.external_data_size_text); + mTotalSize = (TextView) view.findViewById(R.id.total_size_text); + mAppSize = (TextView) view.findViewById(R.id.application_size_text); + mDataSize = (TextView) view.findViewById(R.id.data_size_text); + mExternalCodeSize = (TextView) view.findViewById(R.id.external_code_size_text); + mExternalDataSize = (TextView) view.findViewById(R.id.external_data_size_text); if (Environment.isExternalStorageEmulated()) { ((View)mExternalCodeSize.getParent()).setVisibility(View.GONE); @@ -473,13 +475,13 @@ public class InstalledAppDetails extends Fragment View btnPanel = view.findViewById(R.id.control_buttons_panel); mForceStopButton = (Button) btnPanel.findViewById(R.id.left_button); mForceStopButton.setText(R.string.force_stop); - mUninstallButton = (Button)btnPanel.findViewById(R.id.right_button); + mUninstallButton = (Button) btnPanel.findViewById(R.id.right_button); mForceStopButton.setEnabled(false); // Get More Control button panel mMoreControlButtons = view.findViewById(R.id.more_control_buttons_panel); mMoreControlButtons.findViewById(R.id.left_button).setVisibility(View.INVISIBLE); - mSpecialDisableButton = (Button)mMoreControlButtons.findViewById(R.id.right_button); + mSpecialDisableButton = (Button) mMoreControlButtons.findViewById(R.id.right_button); mMoreControlButtons.setVisibility(View.GONE); // Initialize clear data and move install location buttons @@ -491,12 +493,12 @@ public class InstalledAppDetails extends Fragment mCacheSize = (TextView) view.findViewById(R.id.cache_size_text); mClearCacheButton = (Button) view.findViewById(R.id.clear_cache_button); - mActivitiesButton = (Button)view.findViewById(R.id.clear_activities_button); + mActivitiesButton = (Button) view.findViewById(R.id.clear_activities_button); // Screen compatibility control mScreenCompatSection = view.findViewById(R.id.screen_compatibility_section); - mAskCompatibilityCB = (CheckBox)view.findViewById(R.id.ask_compatibility_cb); - mEnableCompatibilityCB = (CheckBox)view.findViewById(R.id.enable_compatibility_cb); + mAskCompatibilityCB = (CheckBox) view.findViewById(R.id.ask_compatibility_cb); + mEnableCompatibilityCB = (CheckBox) view.findViewById(R.id.enable_compatibility_cb); mNotificationSwitch = (CompoundButton) view.findViewById(R.id.notification_switch); |