diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2015-06-15 12:26:54 -0700 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2015-06-15 12:26:54 -0700 |
commit | 41e3369d5fffb2e8dfa33bfcb14386ad339b0f2f (patch) | |
tree | a738025952bf902827d04f9ad189e24e15cf0acd /src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java | |
parent | 90429e11e75f5756d250f1156cac7cc6479f90a1 (diff) | |
download | android_packages_apps_Trebuchet-41e3369d5fffb2e8dfa33bfcb14386ad339b0f2f.tar.gz android_packages_apps_Trebuchet-41e3369d5fffb2e8dfa33bfcb14386ad339b0f2f.tar.bz2 android_packages_apps_Trebuchet-41e3369d5fffb2e8dfa33bfcb14386ad339b0f2f.zip |
Work profile badge alignment
b/21336417
Change-Id: Icd54320fa0d0976cac0ae66d180cc2c99ddd0c1c
Diffstat (limited to 'src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java')
-rw-r--r-- | src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java b/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java index 96ace8477..13712d8c7 100644 --- a/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java +++ b/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java @@ -108,7 +108,8 @@ class AppWidgetManagerCompatVL extends AppWidgetManagerCompat { } @Override - public Bitmap getBadgeBitmap(LauncherAppWidgetProviderInfo info, Bitmap bitmap, int imageHeight) { + public Bitmap getBadgeBitmap(LauncherAppWidgetProviderInfo info, Bitmap bitmap, + int imageHeight) { if (info.isCustomWidget || info.getProfile().equals(android.os.Process.myUserHandle())) { return bitmap; } @@ -116,15 +117,14 @@ class AppWidgetManagerCompatVL extends AppWidgetManagerCompat { // Add a user badge in the bottom right of the image. final Resources res = mContext.getResources(); final int badgeSize = res.getDimensionPixelSize(R.dimen.profile_badge_size); - final int badgeMargin = res.getDimensionPixelSize(R.dimen.profile_badge_margin); final int badgeMinTop = res.getDimensionPixelSize(R.dimen.profile_badge_minimum_top); final Rect badgeLocation = new Rect(0, 0, badgeSize, badgeSize); - final int top = Math.max(imageHeight - badgeSize - badgeMargin, badgeMinTop); + final int top = Math.max(imageHeight - badgeSize, badgeMinTop); if (res.getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) { - badgeLocation.offset(badgeMargin, top); + badgeLocation.offset(0, top); } else { - badgeLocation.offset(bitmap.getWidth() - badgeSize - badgeMargin, top); + badgeLocation.offset(bitmap.getWidth() - badgeSize, top); } Drawable drawable = mPm.getUserBadgedDrawableForDensity( |