diff options
author | Yorke Lee <yorkelee@google.com> | 2013-10-02 09:45:03 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-02 09:45:03 -0700 |
commit | 52a988360c077f9d3a18b75a6ab07fd915e97561 (patch) | |
tree | 3cbe5c3a6c43580546e8029375e7b24bd8f90a09 | |
parent | 996a8f57ff66da558b629b16793846fa06cb32b0 (diff) | |
parent | ca5bb93f1544fbc637976ae4119c6b4065e80eda (diff) |
am ca5bb93f: am 59f1f5f7: am 19518d2d: Merge "Fix flicker when long pressing to drag and drop" into klp-dev
* commit 'ca5bb93f1544fbc637976ae4119c6b4065e80eda':
Fix flicker when long pressing to drag and drop
4 files changed, 3 insertions, 13 deletions
diff --git a/res/layout/phone_favorite_regular_row_view.xml b/res/layout/phone_favorite_regular_row_view.xml index 2e4dde217..a90117f10 100644 --- a/res/layout/phone_favorite_regular_row_view.xml +++ b/res/layout/phone_favorite_regular_row_view.xml @@ -24,8 +24,7 @@ android:id="@+id/contact_favorite_card" android:layout_width="match_parent" android:layout_height="match_parent" - android:focusable="true" - android:background="?android:attr/selectableItemBackground" > + android:focusable="true"> <com.android.contacts.common.widget.LayoutSuppressingQuickContactBadge android:id="@+id/contact_tile_quick" diff --git a/src/com/android/dialer/list/PhoneFavoriteListView.java b/src/com/android/dialer/list/PhoneFavoriteListView.java index 10b9e9a96..b685e8231 100644 --- a/src/com/android/dialer/list/PhoneFavoriteListView.java +++ b/src/com/android/dialer/list/PhoneFavoriteListView.java @@ -306,14 +306,6 @@ public class PhoneFavoriteListView extends ListView implements SwipeHelperCallba } } - private FrameLayout.LayoutParams getDragShadowLayoutParams() { - final FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams( - mDragShadowWidth, mDragShadowHeight); - lp.leftMargin = mDragShadowLeft; - lp.topMargin = mDragShadowTop; - return lp; - } - /** * @return True if the drag is started. */ @@ -361,7 +353,8 @@ public class PhoneFavoriteListView extends ListView implements SwipeHelperCallba mDragShadowOverlay.setVisibility(VISIBLE); mDragShadowOverlay.setAlpha(DRAG_SHADOW_ALPHA); - mDragShadowOverlay.setLayoutParams(getDragShadowLayoutParams()); + mDragShadowOverlay.setX(mDragShadowLeft); + mDragShadowOverlay.setY(mDragShadowTop); // x and y passed in are the coordinates of where the user has touched down, calculate // the offset to the top left coordinate of the dragged child. This will be used for diff --git a/src/com/android/dialer/list/PhoneFavoriteTileView.java b/src/com/android/dialer/list/PhoneFavoriteTileView.java index 765745172..ac89fd693 100644 --- a/src/com/android/dialer/list/PhoneFavoriteTileView.java +++ b/src/com/android/dialer/list/PhoneFavoriteTileView.java @@ -96,7 +96,6 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { setOnLongClickListener(new OnLongClickListener() { @Override public boolean onLongClick(View v) { - setPressed(false); final PhoneFavoriteTileView view = (PhoneFavoriteTileView) v; // NOTE The drag shadow is handled in the ListView. if (view instanceof PhoneFavoriteRegularRowView) { diff --git a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java index ce18a2b87..a4a2cb418 100644 --- a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java +++ b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java @@ -772,7 +772,6 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements setVisibility(View.VISIBLE); } } - setPressed(false); } private void addTileFromEntry(ContactEntry entry, int childIndex, boolean isLastRow) { |