diff options
author | LorDClockaN <davor@losinj.com> | 2015-01-23 15:48:57 +0100 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2015-11-30 02:12:16 +0200 |
commit | c9503e0919ddeae38da404fbec6772bba52e0626 (patch) | |
tree | 9a7ce2cfbacf1ae6654d39c78a6005c074ea59c5 /src/com/android/settings/profiles | |
parent | afc48d714f82b5fc702660cabf126c604f01d316 (diff) | |
download | packages_apps_Settings-c9503e0919ddeae38da404fbec6772bba52e0626.zip packages_apps_Settings-c9503e0919ddeae38da404fbec6772bba52e0626.tar.gz packages_apps_Settings-c9503e0919ddeae38da404fbec6772bba52e0626.tar.bz2 |
Use ScreenType util from cmsdk
Change-Id: I07874c68802674695877c6bd0329c8973dd1c653
Diffstat (limited to 'src/com/android/settings/profiles')
-rw-r--r-- | src/com/android/settings/profiles/ProfilesList.java | 8 | ||||
-rw-r--r-- | src/com/android/settings/profiles/ProfilesSettings.java | 13 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src/com/android/settings/profiles/ProfilesList.java b/src/com/android/settings/profiles/ProfilesList.java index 34e53a0..4a384dc 100644 --- a/src/com/android/settings/profiles/ProfilesList.java +++ b/src/com/android/settings/profiles/ProfilesList.java @@ -35,7 +35,8 @@ import android.widget.ListView; import com.android.settings.R; import com.android.settings.SettingsPreferenceFragment; -import com.android.settings.Utils; + +import org.cyanogenmod.internal.util.ScreenType; public class ProfilesList extends SettingsPreferenceFragment implements Preference.OnPreferenceChangeListener { @@ -60,6 +61,11 @@ public class ProfilesList extends SettingsPreferenceFragment implements public void onResume() { super.onResume(); refreshList(); + + // On tablet devices remove the padding + if (ScreenType.isTablet(getActivity())) { + getListView().setPadding(0, 0, 0, 0); + } } @Override diff --git a/src/com/android/settings/profiles/ProfilesSettings.java b/src/com/android/settings/profiles/ProfilesSettings.java index 957cf82..2de2d95 100644 --- a/src/com/android/settings/profiles/ProfilesSettings.java +++ b/src/com/android/settings/profiles/ProfilesSettings.java @@ -42,17 +42,19 @@ import android.widget.Switch; import android.widget.TextView; import com.android.internal.logging.MetricsLogger; -import cyanogenmod.app.Profile; -import cyanogenmod.app.ProfileManager; import com.android.settings.R; import com.android.settings.SettingsActivity; import com.android.settings.SettingsPreferenceFragment; import com.android.settings.SubSettings; -import com.android.settings.Utils; import com.android.settings.cyanogenmod.CMBaseSystemSettingSwitchBar; + +import cyanogenmod.app.Profile; +import cyanogenmod.app.ProfileManager; import cyanogenmod.providers.CMSettings; +import org.cyanogenmod.internal.util.ScreenType; + import java.util.UUID; public class ProfilesSettings extends SettingsPreferenceFragment @@ -143,6 +145,11 @@ public class ProfilesSettings extends SettingsPreferenceFragment // check if we are enabled updateProfilesEnabledState(); + + // If running on a phone, remove padding around tabs + if (!ScreenType.isTablet(getActivity())) { + mContainer.setPadding(0, 0, 0, 0); + } } @Override |