summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-09-20 17:43:51 -0700
committerWinson Chung <winsonc@google.com>2011-09-20 17:51:10 -0700
commit7a74ac9cd68db5e8bba87bbda43f73cea9c427c8 (patch)
tree000cfe21c7542e437fc140dc4caa4a59cce0025c /src/com/android
parent53c67ee6cbd08c2afa313e7f0d25a5a3e1129c8e (diff)
downloadandroid_packages_apps_Trebuchet-7a74ac9cd68db5e8bba87bbda43f73cea9c427c8.tar.gz
android_packages_apps_Trebuchet-7a74ac9cd68db5e8bba87bbda43f73cea9c427c8.tar.bz2
android_packages_apps_Trebuchet-7a74ac9cd68db5e8bba87bbda43f73cea9c427c8.zip
Tweaking clings in response to usability testing. (5057945, 5056643)
- Updating assets - Removing folder cling text - Fading in folder cling after folder animation - Highlighting different icon in allapps cling Change-Id: I6e4fadf10b81a91296304f008644ee1d154ec5f8
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher2/Cling.java2
-rw-r--r--src/com/android/launcher2/Folder.java5
-rw-r--r--src/com/android/launcher2/Launcher.java12
3 files changed, 9 insertions, 10 deletions
diff --git a/src/com/android/launcher2/Cling.java b/src/com/android/launcher2/Cling.java
index 09c5062ae..0a9bc7fa3 100644
--- a/src/com/android/launcher2/Cling.java
+++ b/src/com/android/launcher2/Cling.java
@@ -198,7 +198,7 @@ public class Cling extends FrameLayout {
if (mHandTouchGraphic == null) {
mHandTouchGraphic = getResources().getDrawable(R.drawable.hand);
}
- int offset = -mAppIconSize / 4;
+ int offset = mAppIconSize / 4;
mHandTouchGraphic.setBounds(cx + offset, cy + offset,
cx + mHandTouchGraphic.getIntrinsicWidth() + offset,
cy + mHandTouchGraphic.getIntrinsicHeight() + offset);
diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java
index a1aa670c5..f44d3ed60 100644
--- a/src/com/android/launcher2/Folder.java
+++ b/src/com/android/launcher2/Folder.java
@@ -405,6 +405,11 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
@Override
public void onAnimationEnd(Animator animation) {
mState = STATE_OPEN;
+
+ Cling cling = mLauncher.showFirstRunFoldersCling();
+ if (cling != null) {
+ cling.bringToFront();
+ }
}
});
oa.setDuration(mExpandDuration);
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 3c2c3daea..e4ed31f35 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -77,10 +77,10 @@ import android.view.Surface;
import android.view.View;
import android.view.View.OnLongClickListener;
import android.view.ViewGroup;
-import android.view.ViewParent;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.AccelerateDecelerateInterpolator;
+import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.view.inputmethod.InputMethodManager;
import android.widget.Advanceable;
@@ -162,7 +162,7 @@ public final class Launcher extends Activity
static final int APPWIDGET_HOST_ID = 1024;
private static final int EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT = 300;
private static final int EXIT_SPRINGLOADED_MODE_LONG_TIMEOUT = 600;
- private static final int SHOW_CLING_DURATION = 250;
+ private static final int SHOW_CLING_DURATION = 550;
private static final int DISMISS_CLING_DURATION = 250;
private static final Object sLock = new Object();
@@ -1770,8 +1770,6 @@ public final class Launcher extends Activity
final FolderInfo info = folderIcon.mInfo;
Folder openFolder = mWorkspace.getFolderForTag(info);
- Cling cling = showFirstRunFoldersCling();
-
// If the folder info reports that the associated folder is open, then verify that
// it is actually opened. There have been a few instances where this gets out of sync.
if (info.opened && openFolder == null) {
@@ -1800,10 +1798,6 @@ public final class Launcher extends Activity
}
}
}
-
- if (cling != null) {
- cling.bringToFront();
- }
}
private void growAndFadeOutFolderIcon(FolderIcon fi) {
@@ -3102,7 +3096,7 @@ public final class Launcher extends Activity
cling.setAlpha(0f);
cling.animate()
.alpha(1f)
- .setInterpolator(new DecelerateInterpolator())
+ .setInterpolator(new AccelerateInterpolator())
.setDuration(SHOW_CLING_DURATION)
.setStartDelay(delay)
.start();