summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values/preferences_defaults.xml1
-rw-r--r--src/com/android/launcher3/BubbleTextView.java9
-rw-r--r--src/com/android/launcher3/FastBitmapDrawable.java2
3 files changed, 8 insertions, 4 deletions
diff --git a/res/values/preferences_defaults.xml b/res/values/preferences_defaults.xml
index eae8122..7dab6ac 100644
--- a/res/values/preferences_defaults.xml
+++ b/res/values/preferences_defaults.xml
@@ -15,4 +15,5 @@
<bool name="preferences_interface_general_text_small_default">true</bool>
<string name="preferences_interface_general_icons_text_font_family_default">sans-serif-condensed</string>
<integer name="preferences_interface_general_icons_text_font_style_default">0</integer>
+ <bool name="preferences_interface_general_app_icon_animation">false</bool>
</resources>
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index a368796..5bc17b6 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -51,6 +51,7 @@ public class BubbleTextView extends TextView {
private HolographicOutlineHelper mOutlineHelper;
private Bitmap mPressedBackground;
+ private boolean mUseFullClickAnimation = false;
private float mSlop;
@@ -109,6 +110,8 @@ public class BubbleTextView extends TextView {
if (mCustomShadowsEnabled) {
setShadowLayer(SHADOW_LARGE_RADIUS, 0.0f, SHADOW_Y_OFFSET, SHADOW_LARGE_COLOUR);
}
+ mUseFullClickAnimation = getResources().getBoolean(
+ R.bool.preferences_interface_general_app_icon_animation);
}
public void applyFromShortcutInfo(ShortcutInfo info, IconCache iconCache,
@@ -204,7 +207,7 @@ public class BubbleTextView extends TextView {
// So that the pressed outline is visible immediately on setStayPressed(),
// we pre-create it on ACTION_DOWN (it takes a small but perceptible amount of time
// to create it)
- if (mPressedBackground == null) {
+ if (mUseFullClickAnimation && mPressedBackground == null) {
mPressedBackground = mOutlineHelper.createMediumDropShadow(this);
}
@@ -236,7 +239,7 @@ public class BubbleTextView extends TextView {
}
// Only show the shadow effect when persistent pressed state is set.
- if (getParent() instanceof ShortcutAndWidgetContainer) {
+ if (mUseFullClickAnimation && getParent() instanceof ShortcutAndWidgetContainer) {
CellLayout layout = (CellLayout) getParent().getParent();
layout.setPressedIcon(this, mPressedBackground, mOutlineHelper.shadowBitmapPadding);
}
@@ -253,7 +256,7 @@ public class BubbleTextView extends TextView {
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (super.onKeyDown(keyCode, event)) {
// Pre-create shadow so show immediately on click.
- if (mPressedBackground == null) {
+ if (mUseFullClickAnimation && mPressedBackground == null) {
mPressedBackground = mOutlineHelper.createMediumDropShadow(this);
}
return true;
diff --git a/src/com/android/launcher3/FastBitmapDrawable.java b/src/com/android/launcher3/FastBitmapDrawable.java
index d13f66a..e9c7a04 100644
--- a/src/com/android/launcher3/FastBitmapDrawable.java
+++ b/src/com/android/launcher3/FastBitmapDrawable.java
@@ -47,7 +47,7 @@ class FastBitmapDrawable extends Drawable {
}
}
};
- static final long CLICK_FEEDBACK_DURATION = 2000;
+ static final long CLICK_FEEDBACK_DURATION = 150;
private static final int PRESSED_BRIGHTNESS = 100;
private static ColorMatrix sGhostModeMatrix;