OSDN Git Service

NumberPicker not redrawn when current value is changed via an IME.
authorSvetoslav Ganov <svetoslavganov@google.com>
Thu, 12 Apr 2012 23:51:04 +0000 (16:51 -0700)
committerSvetoslav Ganov <svetoslavganov@google.com>
Thu, 12 Apr 2012 23:57:18 +0000 (16:57 -0700)
1. The NumberPicker scroll wheel was not updated upon value change
   via an IME as well as the picker was not redraws after the change.

bug:6291879

Change-Id: I5ba30df42e38cd06fa150328399eb4deeb0b683d

core/java/android/widget/NumberPicker.java

index d897a39..582a62f 100644 (file)
@@ -1096,12 +1096,7 @@ public class NumberPicker extends LinearLayout {
      * @see #setMaxValue(int)
      */
     public void setValue(int value) {
-        if (mValue == value) {
-            return;
-        }
         setValueInternal(value, false);
-        initializeSelectorWheelIndices();
-        invalidate();
     }
 
     /**
@@ -1498,6 +1493,8 @@ public class NumberPicker extends LinearLayout {
         if (notifyChange) {
             notifyChange(previous, current);
         }
+        initializeSelectorWheelIndices();
+        invalidate();
     }
 
     /**