Ensure running mTouchModeReset when AbsListView is detached

mTouchModeReset should be executed when AbsListView is detached from window.
If not, when the AbsListView is re-attaced to window,
the child can retain a pressed state.

You can see this problem easily when you double-touch an item of
option menu very quickly.

Change-Id: I5aaa1fd5b95847efb2f5f1b5ec7cabe8eb85b237
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
This commit is contained in:
Sangkyu Lee
2012-12-07 17:06:15 +09:00
parent 5b6069ce3a
commit a607223f34

View File

@ -2637,7 +2637,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
if (mTouchModeReset != null) {
removeCallbacks(mTouchModeReset);
mTouchModeReset = null;
mTouchModeReset.run();
}
mIsAttached = false;
}
@ -3422,6 +3422,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
if (!mDataChanged) {
performClick.run();
}
mTouchModeReset = null;
}
};
postDelayed(mTouchModeReset,