diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2015-04-17 19:02:30 -0700 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2015-04-19 19:25:49 -0700 |
commit | 4cea4c830283e017fc36197cfe9d7ce713aec49d (patch) | |
tree | 786e402b2d907cb468ade930ce7a9643ca6b742c /src/com/android/launcher3/widget/WidgetCell.java | |
parent | 7af216ff04b7f0c3852119b476d8f692edfcaaa7 (diff) | |
download | android_packages_apps_Trebuchet-4cea4c830283e017fc36197cfe9d7ce713aec49d.tar.gz android_packages_apps_Trebuchet-4cea4c830283e017fc36197cfe9d7ce713aec49d.tar.bz2 android_packages_apps_Trebuchet-4cea4c830283e017fc36197cfe9d7ce713aec49d.zip |
WidgetTray UI tweak
- set fixed image view width
- fade in when widget bitmap populates
- widget dimension is next to the widget name text.
- elevation of the widgets content and the reveal view is the same
b/19897708
Change-Id: Ia656144412e7d63a491ce67ff15fb58c05d9a9d9
Diffstat (limited to 'src/com/android/launcher3/widget/WidgetCell.java')
-rw-r--r-- | src/com/android/launcher3/widget/WidgetCell.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/com/android/launcher3/widget/WidgetCell.java b/src/com/android/launcher3/widget/WidgetCell.java index d10c3049e..1ae75c3cc 100644 --- a/src/com/android/launcher3/widget/WidgetCell.java +++ b/src/com/android/launcher3/widget/WidgetCell.java @@ -50,10 +50,7 @@ public class WidgetCell extends LinearLayout implements OnLayoutChangeListener { private static final String TAG = "WidgetCell"; private static final boolean DEBUG = false; - // Temporary preset width and height of the image to keep them aligned. - //private static final int PRESET_PREVIEW_HEIGHT = 480; - //private static final int PRESET_PREVIEW_WIDTH = 480; - + private static final int FADE_IN_DURATION_MS = 70; private int mPresetPreviewSize; private static WidgetCell sShortpressTarget = null; @@ -210,7 +207,8 @@ public class WidgetCell extends LinearLayout implements OnLayoutChangeListener { mOriginalImagePadding.right, mOriginalImagePadding.bottom); } - image.setAlpha(1f); + image.setAlpha(0f); + image.animate().alpha(1.0f).setDuration(FADE_IN_DURATION_MS); image.mAllowRequestLayout = true; image.requestLayout(); } |