diff options
author | Danesh Mondegarian <daneshm90@gmail.com> | 2012-06-12 11:29:42 -0400 |
---|---|---|
committer | Danesh Mondegarian <daneshm90@gmail.com> | 2012-06-12 11:37:41 -0400 |
commit | ce152c647662e30edd94b492e726bbf30cc6ac6d (patch) | |
tree | 01bde0a4da25ac6997cc89e5bd7fadb786630512 | |
parent | f9fd78a054db8f4e43b00c2c54b93fb498f7faf7 (diff) | |
download | frameworks_base-ce152c647662e30edd94b492e726bbf30cc6ac6d.zip frameworks_base-ce152c647662e30edd94b492e726bbf30cc6ac6d.tar.gz frameworks_base-ce152c647662e30edd94b492e726bbf30cc6ac6d.tar.bz2 |
LockscreenTarget : Switch to dp from px for insets
Related to : http://review.cyanogenmod.com/#/c/17561/1
Change-Id: Iace302f95cc73fa18bb6348d7739123f5529a41e
-rw-r--r-- | core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java | 12 | ||||
-rw-r--r-- | core/res/res/values/dimens.xml | 4 | ||||
-rwxr-xr-x | policy/src/com/android/internal/policy/impl/LockScreen.java | 3 |
3 files changed, 5 insertions, 14 deletions
diff --git a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java index 465bd24..12000b0 100644 --- a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java +++ b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java @@ -109,18 +109,6 @@ public class MultiWaveView extends View { public final static int MAX_PHONE_TARGETS = 4; /** - * Inset padding for lockscreen targets for tablets - * @hide - */ - public final static int TABLET_TARGET_INSET = 30; - - /** - * Inset padding for lockscreen targets for phones - * @hide - */ - public final static int PHONE_TARGET_INSET = 60; - - /** * Empty target used to reference unused lockscreen targets * @hide */ diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 82ef68a..b7c794b 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -201,4 +201,8 @@ <!-- Minimum width for an action button in the menu area of an action bar --> <dimen name="action_button_min_width">56dip</dimen> + + <!-- Lockscreen target insets --> + <item type="dimen" name="lockscreen_target_inset">25dp</item> + </resources> diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java index 410fb9e..c0ddac1 100755 --- a/policy/src/com/android/internal/policy/impl/LockScreen.java +++ b/policy/src/com/android/internal/policy/impl/LockScreen.java @@ -267,8 +267,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen { mIsScreenLarge = isScreenLarge(); ArrayList<TargetDrawable> storedDraw = new ArrayList<TargetDrawable>(); final Resources res = getResources(); - final int targetInset = mIsScreenLarge ? MultiWaveView.TABLET_TARGET_INSET : - MultiWaveView.PHONE_TARGET_INSET; + final int targetInset = res.getDimensionPixelSize(com.android.internal.R.dimen.lockscreen_target_inset); final PackageManager packMan = mContext.getPackageManager(); final boolean isLandscape = mCreationOrientation == Configuration.ORIENTATION_LANDSCAPE; final Drawable blankActiveDrawable = res.getDrawable(R.drawable.ic_lockscreen_target_activated); |