Merge "Fix issue #3374356: Buttons sometimes don't highlight" into honeycomb
This commit is contained in:
committed by
Android (Google) Code Review
commit
e69e0fde6c
@@ -5027,6 +5027,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
|
|||||||
focusTaken = requestFocus();
|
focusTaken = requestFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (prepressed) {
|
||||||
|
// The button is being released before we actually
|
||||||
|
// showed it as pressed. Make it show the pressed
|
||||||
|
// state now (before scheduling the click) to ensure
|
||||||
|
// the user sees it.
|
||||||
|
mPrivateFlags |= PRESSED;
|
||||||
|
refreshDrawableState();
|
||||||
|
}
|
||||||
|
|
||||||
if (!mHasPerformedLongPress) {
|
if (!mHasPerformedLongPress) {
|
||||||
// This is a tap, so remove the longpress check
|
// This is a tap, so remove the longpress check
|
||||||
removeLongPressCallback();
|
removeLongPressCallback();
|
||||||
@@ -5050,8 +5059,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (prepressed) {
|
if (prepressed) {
|
||||||
mPrivateFlags |= PRESSED;
|
|
||||||
refreshDrawableState();
|
|
||||||
postDelayed(mUnsetPressedState,
|
postDelayed(mUnsetPressedState,
|
||||||
ViewConfiguration.getPressedStateDuration());
|
ViewConfiguration.getPressedStateDuration());
|
||||||
} else if (!post(mUnsetPressedState)) {
|
} else if (!post(mUnsetPressedState)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user