Loading src/com/android/dialer/list/PhoneFavoriteRegularRowView.java +2 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,8 @@ public class PhoneFavoriteRegularRowView extends PhoneFavoriteTileView { rowPaddingBottom = resources.getDimensionPixelSize( R.dimen.favorites_row_bottom_padding); favoriteContactCard.setBackgroundResource(R.drawable.bottom_border_background); favoriteContactCard.setPaddingRelative(rowPaddingStart, rowPaddingTop, rowPaddingEnd, rowPaddingBottom); Loading src/com/android/dialer/list/PhoneFavoriteTileView.java +7 −17 Original line number Diff line number Diff line Loading @@ -131,20 +131,10 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { public void displayRemovalDialog() { mRemovalDialogue.setVisibility(VISIBLE); mRemovalDialogue.setAlpha(0f); final int animationLength = ANIMATION_LENGTH; final AnimatorSet animSet = new AnimatorSet(); final ObjectAnimator fadeIn = ObjectAnimator.ofFloat(mRemovalDialogue, "alpha", 1.f).setDuration(animationLength); if (mParentRow.getItemViewType() == ViewTypes.FREQUENT) { final ObjectAnimator backgroundFadeIn = ObjectAnimator.ofInt( mParentRow.getBackground(), "alpha", 0).setDuration(animationLength); animSet.playTogether(fadeIn, backgroundFadeIn); } else { animSet.playTogether(fadeIn); } 1.f).setDuration(ANIMATION_LENGTH); animSet.addListener(new AnimatorListenerAdapter() { fadeIn.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { mParentRow.setHasTransientState(true); Loading @@ -155,8 +145,7 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { mParentRow.setHasTransientState(false); } }); animSet.start(); fadeIn.start(); } /** Loading @@ -172,10 +161,11 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { setDuration(ANIMATION_LENGTH); final ObjectAnimator moveBack = ObjectAnimator.ofFloat(mFavoriteContactCard, "translationX", 0.f).setDuration(ANIMATION_LENGTH); final ObjectAnimator backgroundFadeOut = ObjectAnimator.ofInt(mParentRow.getBackground(), "alpha", 255).setDuration(ANIMATION_LENGTH); final AnimatorSet animSet = new AnimatorSet(); animSet.playTogether(fadeIn, moveBack, backgroundFadeOut); animSet.playTogether(fadeIn, moveBack); animSet.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { Loading src/com/android/dialer/list/PhoneFavoritesTileAdapter.java +5 −5 Original line number Diff line number Diff line Loading @@ -688,6 +688,8 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements R.dimen.favorites_row_start_padding); mRowPaddingEnd = resources.getDimensionPixelSize( R.dimen.favorites_row_end_padding); setBackgroundResource(R.drawable.bottom_border_background); } else { // For row views, padding is set on the view itself. mRowPaddingTop = 0; Loading @@ -696,8 +698,6 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements mRowPaddingEnd = 0; } setBackgroundResource(R.drawable.bottom_border_background); setPaddingRelative(mRowPaddingStart, mRowPaddingTop, mRowPaddingEnd, mRowPaddingBottom); Loading Loading @@ -743,7 +743,6 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements } } setPressed(false); getBackground().setAlpha(255); } private void addTileFromEntry(ContactEntry entry, int childIndex, boolean isLastRow) { Loading Loading @@ -960,11 +959,12 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements public void onBeginDrag(View v) { removePendingContactEntry(); final int index = indexOfChild(v); // Move tile to front so that any overlap will be hidden behind its siblings /* if (index > 0) { detachViewFromParent(index); attachViewToParent(v, 0, v.getLayoutParams()); } }*/ // We do this so the underlying ScrollView knows that it won't get // the chance to intercept events anymore Loading src/com/android/dialer/list/SwipeableListView.java +1 −2 Original line number Diff line number Diff line Loading @@ -152,13 +152,12 @@ public class SwipeableListView extends ListView implements SwipeHelperCallback { @Override public void onDragCancelled(View v) { v.setHasTransientState(false); } @Override public void onBeginDrag(View v) { final View tileRow = (View) v.getParent(); tileRow.setHasTransientState(true); // We do this so the underlying ScrollView knows that it won't get // the chance to intercept events anymore requestDisallowInterceptTouchEvent(true); Loading Loading
src/com/android/dialer/list/PhoneFavoriteRegularRowView.java +2 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,8 @@ public class PhoneFavoriteRegularRowView extends PhoneFavoriteTileView { rowPaddingBottom = resources.getDimensionPixelSize( R.dimen.favorites_row_bottom_padding); favoriteContactCard.setBackgroundResource(R.drawable.bottom_border_background); favoriteContactCard.setPaddingRelative(rowPaddingStart, rowPaddingTop, rowPaddingEnd, rowPaddingBottom); Loading
src/com/android/dialer/list/PhoneFavoriteTileView.java +7 −17 Original line number Diff line number Diff line Loading @@ -131,20 +131,10 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { public void displayRemovalDialog() { mRemovalDialogue.setVisibility(VISIBLE); mRemovalDialogue.setAlpha(0f); final int animationLength = ANIMATION_LENGTH; final AnimatorSet animSet = new AnimatorSet(); final ObjectAnimator fadeIn = ObjectAnimator.ofFloat(mRemovalDialogue, "alpha", 1.f).setDuration(animationLength); if (mParentRow.getItemViewType() == ViewTypes.FREQUENT) { final ObjectAnimator backgroundFadeIn = ObjectAnimator.ofInt( mParentRow.getBackground(), "alpha", 0).setDuration(animationLength); animSet.playTogether(fadeIn, backgroundFadeIn); } else { animSet.playTogether(fadeIn); } 1.f).setDuration(ANIMATION_LENGTH); animSet.addListener(new AnimatorListenerAdapter() { fadeIn.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { mParentRow.setHasTransientState(true); Loading @@ -155,8 +145,7 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { mParentRow.setHasTransientState(false); } }); animSet.start(); fadeIn.start(); } /** Loading @@ -172,10 +161,11 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { setDuration(ANIMATION_LENGTH); final ObjectAnimator moveBack = ObjectAnimator.ofFloat(mFavoriteContactCard, "translationX", 0.f).setDuration(ANIMATION_LENGTH); final ObjectAnimator backgroundFadeOut = ObjectAnimator.ofInt(mParentRow.getBackground(), "alpha", 255).setDuration(ANIMATION_LENGTH); final AnimatorSet animSet = new AnimatorSet(); animSet.playTogether(fadeIn, moveBack, backgroundFadeOut); animSet.playTogether(fadeIn, moveBack); animSet.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { Loading
src/com/android/dialer/list/PhoneFavoritesTileAdapter.java +5 −5 Original line number Diff line number Diff line Loading @@ -688,6 +688,8 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements R.dimen.favorites_row_start_padding); mRowPaddingEnd = resources.getDimensionPixelSize( R.dimen.favorites_row_end_padding); setBackgroundResource(R.drawable.bottom_border_background); } else { // For row views, padding is set on the view itself. mRowPaddingTop = 0; Loading @@ -696,8 +698,6 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements mRowPaddingEnd = 0; } setBackgroundResource(R.drawable.bottom_border_background); setPaddingRelative(mRowPaddingStart, mRowPaddingTop, mRowPaddingEnd, mRowPaddingBottom); Loading Loading @@ -743,7 +743,6 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements } } setPressed(false); getBackground().setAlpha(255); } private void addTileFromEntry(ContactEntry entry, int childIndex, boolean isLastRow) { Loading Loading @@ -960,11 +959,12 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements public void onBeginDrag(View v) { removePendingContactEntry(); final int index = indexOfChild(v); // Move tile to front so that any overlap will be hidden behind its siblings /* if (index > 0) { detachViewFromParent(index); attachViewToParent(v, 0, v.getLayoutParams()); } }*/ // We do this so the underlying ScrollView knows that it won't get // the chance to intercept events anymore Loading
src/com/android/dialer/list/SwipeableListView.java +1 −2 Original line number Diff line number Diff line Loading @@ -152,13 +152,12 @@ public class SwipeableListView extends ListView implements SwipeHelperCallback { @Override public void onDragCancelled(View v) { v.setHasTransientState(false); } @Override public void onBeginDrag(View v) { final View tileRow = (View) v.getParent(); tileRow.setHasTransientState(true); // We do this so the underlying ScrollView knows that it won't get // the chance to intercept events anymore requestDisallowInterceptTouchEvent(true); Loading