diff options
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/widget/NumberPickerButton.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/widget/NumberPickerButton.java b/core/java/android/widget/NumberPickerButton.java index 1c8579c..292b668 100644 --- a/core/java/android/widget/NumberPickerButton.java +++ b/core/java/android/widget/NumberPickerButton.java @@ -85,4 +85,12 @@ class NumberPickerButton extends ImageButton { mNumberPicker.cancelDecrement(); } } + + public void onWindowFocusChanged(boolean hasWindowFocus) { + super.onWindowFocusChanged(hasWindowFocus); + if (!hasWindowFocus) { + cancelLongpress(); + } + } + } |