diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2017-11-09 15:24:06 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2017-11-15 16:43:20 -0800 |
commit | 00ac9202417cb5023b9990b2f6f33d321378ff26 (patch) | |
tree | 28cd25a215dbe9bb568aa1a11394a5ae38e3a8a6 /src/com/android/launcher3/shortcuts/DeepShortcutView.java | |
parent | ea529083bd45bae8edcb86d0be056ff90921d0c1 (diff) | |
download | android_packages_apps_Trebuchet-00ac9202417cb5023b9990b2f6f33d321378ff26.tar.gz android_packages_apps_Trebuchet-00ac9202417cb5023b9990b2f6f33d321378ff26.tar.bz2 android_packages_apps_Trebuchet-00ac9202417cb5023b9990b2f6f33d321378ff26.zip |
Simplifying app icon popup
> Using a single linearLayout instead of multiple nested views
> Using clipToOutline for rounded corners instead of using canvas.saveLayer
> Removing nested view elevations and overdraw
> Using LayoutTransition for animating layout changes, instead of manually creating animators
Change-Id: I8e57092f52ca5a032a2756594fdd39788acc5a0d
Diffstat (limited to 'src/com/android/launcher3/shortcuts/DeepShortcutView.java')
-rw-r--r-- | src/com/android/launcher3/shortcuts/DeepShortcutView.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutView.java b/src/com/android/launcher3/shortcuts/DeepShortcutView.java index 75a48861b..450a690b5 100644 --- a/src/com/android/launcher3/shortcuts/DeepShortcutView.java +++ b/src/com/android/launcher3/shortcuts/DeepShortcutView.java @@ -29,6 +29,7 @@ import com.android.launcher3.Launcher; import com.android.launcher3.R; import com.android.launcher3.ShortcutInfo; import com.android.launcher3.Utilities; +import com.android.launcher3.popup.PopupContainerWithArrow; /** * A {@link android.widget.FrameLayout} that contains a {@link DeepShortcutView}. @@ -42,6 +43,7 @@ public class DeepShortcutView extends FrameLayout { private BubbleTextView mBubbleText; private View mIconView; + private View mDivider; private ShortcutInfo mInfo; private ShortcutInfoCompat mDetail; @@ -65,6 +67,11 @@ public class DeepShortcutView extends FrameLayout { super.onFinishInflate(); mBubbleText = findViewById(R.id.bubble_text); mIconView = findViewById(R.id.icon); + mDivider = findViewById(R.id.divider); + } + + public void setDividerVisibility(int visibility) { + mDivider.setVisibility(visibility); } public BubbleTextView getBubbleText() { @@ -98,7 +105,7 @@ public class DeepShortcutView extends FrameLayout { /** package private **/ public void applyShortcutInfo(ShortcutInfo info, ShortcutInfoCompat detail, - ShortcutsItemView container) { + PopupContainerWithArrow container) { mInfo = info; mDetail = detail; mBubbleText.applyFromShortcutInfo(info); |