summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/shortcuts
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2017-04-10 14:05:34 -0700
committerTony Wickham <twickham@google.com>2017-04-11 16:44:38 -0700
commitce44516dd869dff1d6a744e26625a662d9567a10 (patch)
tree9bdca8838804fefb913d73fcf92d62883a3699cc /src/com/android/launcher3/shortcuts
parentcd4cc97f6f761b8cc377821a2214432a376dd4f8 (diff)
downloadandroid_packages_apps_Trebuchet-ce44516dd869dff1d6a744e26625a662d9567a10.tar.gz
android_packages_apps_Trebuchet-ce44516dd869dff1d6a744e26625a662d9567a10.tar.bz2
android_packages_apps_Trebuchet-ce44516dd869dff1d6a744e26625a662d9567a10.zip
Update popup to match redlines
- Update specs in dimens.xml and colors.xml - Move notification count to top right, and keep "Notifications" in left - Also removed NotificationHeaderView and instead use FrameLayout - Limit to 2 shortcuts instead of 3 if there are notifications - Use SP instead of DP for text (b/35869307) Bug: 35766387 Change-Id: I892640933ad6351946af3df6c805b98bb4e7cb50
Diffstat (limited to 'src/com/android/launcher3/shortcuts')
-rw-r--r--src/com/android/launcher3/shortcuts/DeepShortcutTextView.java2
-rw-r--r--src/com/android/launcher3/shortcuts/ShortcutsItemView.java9
2 files changed, 3 insertions, 8 deletions
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutTextView.java b/src/com/android/launcher3/shortcuts/DeepShortcutTextView.java
index 42086fcb5..1a5297dc7 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutTextView.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutTextView.java
@@ -47,7 +47,7 @@ public class DeepShortcutTextView extends BubbleTextView {
super(context, attrs, defStyle);
Resources resources = getResources();
- mDragHandleWidth = resources.getDimensionPixelSize(R.dimen.deep_shortcut_padding_end)
+ mDragHandleWidth = resources.getDimensionPixelSize(R.dimen.popup_padding_end)
+ resources.getDimensionPixelSize(R.dimen.deep_shortcut_drag_handle_size)
+ resources.getDimensionPixelSize(R.dimen.deep_shortcut_drawable_padding) / 2;
}
diff --git a/src/com/android/launcher3/shortcuts/ShortcutsItemView.java b/src/com/android/launcher3/shortcuts/ShortcutsItemView.java
index 2255007d3..ef6365b63 100644
--- a/src/com/android/launcher3/shortcuts/ShortcutsItemView.java
+++ b/src/com/android/launcher3/shortcuts/ShortcutsItemView.java
@@ -118,8 +118,7 @@ public class ShortcutsItemView extends PopupItemView implements View.OnLongClick
return false;
}
- public void addShortcutView(View shortcutView, PopupPopulator.Item shortcutType,
- boolean isAboveIcon) {
+ public void addShortcutView(View shortcutView, PopupPopulator.Item shortcutType) {
if (shortcutType == PopupPopulator.Item.SHORTCUT) {
mDeepShortcutViews.add((DeepShortcutView) shortcutView);
} else {
@@ -130,11 +129,7 @@ public class ShortcutsItemView extends PopupItemView implements View.OnLongClick
if (mSystemShortcutIcons == null) {
mSystemShortcutIcons = (LinearLayout) mLauncher.getLayoutInflater().inflate(
R.layout.system_shortcut_icons, mShortcutsLayout, false);
- if (isAboveIcon) {
- mShortcutsLayout.addView(mSystemShortcutIcons, 0);
- } else {
- mShortcutsLayout.addView(mSystemShortcutIcons);
- }
+ mShortcutsLayout.addView(mSystemShortcutIcons, 0);
}
mSystemShortcutIcons.addView(shortcutView);
} else {