From 0065720a974377d8139679528f2e3e5c076e91b7 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Mon, 2 May 2016 11:39:03 -0700 Subject: Fix the bug that quick contact cannot be removed. The "removed" button doesn't received drag and drop event since it's not visible at the time the drag event starts. The workaround is to change the visibility of its child view instead. Change-Id: Iada912fcc36983ad758296f33092cc54ad6f9f5e Fix: 28479593 (cherry-picked from b20b76437ae6aae8fe4da64097351cc80f030919) (cherry picked from commit 22a193b7babae99256149a0536748c6ad9c6b943) --- src/com/android/dialer/list/ListsFragment.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/com/android') diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index ceed61274..52bf3cbb5 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -81,6 +81,7 @@ public class ListsFragment extends Fragment private ViewPagerTabs mViewPagerTabs; private ViewPagerAdapter mViewPagerAdapter; private RemoveView mRemoveView; + private View mRemoveViewContent; private SpeedDialFragment mSpeedDialFragment; private CallLogFragment mHistoryFragment; @@ -251,6 +252,7 @@ public class ListsFragment extends Fragment addOnPageChangeListener(mViewPagerTabs); mRemoveView = (RemoveView) parentView.findViewById(R.id.remove_view); + mRemoveViewContent = parentView.findViewById(R.id.remove_view_content); Trace.endSection(); Trace.endSection(); @@ -422,7 +424,7 @@ public class ListsFragment extends Fragment public void showRemoveView(boolean show) { - mRemoveView.setVisibility(show ? View.VISIBLE : View.GONE); + mRemoveViewContent.setVisibility(show ? View.VISIBLE : View.GONE); mRemoveView.setAlpha(show ? 0 : 1); mRemoveView.animate().alpha(show ? 1 : 0).start(); } -- cgit v1.2.3