diff options
author | Hongwei Wang <hwwang@google.com> | 2013-09-20 11:19:50 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-20 11:19:50 -0700 |
commit | f97f09791d7f4526003b6a994bb25defb3744eec (patch) | |
tree | 0aaed79e27d660a94f5b2d1a77e2b7a9cf7a8803 | |
parent | 1579bc3ceb3ffd5740bca3ef309907a049745671 (diff) | |
parent | 6ede26cd243de0b475a181e16cfe7d505fb3be4d (diff) |
am 6ede26cd: am 20d682f9: Tweak the animation for Drag and Drop. Finale
* commit '6ede26cd243de0b475a181e16cfe7d505fb3be4d':
Tweak the animation for Drag and Drop. Finale
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoriteFragment.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoriteFragment.java b/src/com/android/dialer/list/PhoneFavoriteFragment.java index 9e8476062..d731786a5 100644 --- a/src/com/android/dialer/list/PhoneFavoriteFragment.java +++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java @@ -143,7 +143,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen @Override public void onScrollStateChanged(AbsListView view, int scrollState) { mActivityScrollListener.onListFragmentScrollStateChange(scrollState); - mLastScrollState = scrollState; } } @@ -186,8 +185,6 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen new ContactTileLoaderListener(); private final ScrollListener mScrollListener = new ScrollListener(); - private int mLastScrollState = ListView.OnScrollListener.SCROLL_STATE_IDLE; - @Override public void onAttach(Activity activity) { if (DEBUG) Log.d(TAG, "onAttach()"); @@ -453,8 +450,7 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen * animations will be performed instead. */ private void animateListView(final long... idsInPlace) { - if (mItemIdTopMap.isEmpty() || - mLastScrollState == ListView.OnScrollListener.SCROLL_STATE_FLING) { + if (mItemIdTopMap.isEmpty()) { // Don't do animations if the database is being queried for the first time and // the previous item offsets have not been cached, or the user hasn't done anything // (dragging, swiping etc) that requires an animation. @@ -501,10 +497,10 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen startTop = top + (i > 0 ? childHeight : -childHeight); delta = startTop - top; } else { - // In the case the first non-square row is pushed down + // In case the first non-square row is pushed down // from the square section. animators.add(ObjectAnimator.ofFloat( - child, "translationX", -child.getWidth(), 0.0f)); + child, "alpha", 0.0f, 1.0f)); } if (DEBUG) { Log.d(TAG, "Found itemId: " + itemId + " for listview child " + i + |