Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -26676,6 +26676,7 @@ package android.widget { method public void setOnValueChangedListener(android.widget.NumberPicker.OnValueChangeListener); method public void setValue(int); method public void setWrapSelectorWheel(boolean); field public static final int SELECTOR_WHEEL_ITEM_COUNT = 5; // 0x5 } public static abstract interface NumberPicker.Formatter { core/java/android/widget/NumberPicker.java +13 −5 Original line number Diff line number Diff line Loading @@ -70,6 +70,11 @@ import com.android.internal.R; @Widget public class NumberPicker extends LinearLayout { /** * The number of items show in the selector wheel. */ public static final int SELECTOR_WHEEL_ITEM_COUNT = 5; /** * The default update interval during long press. */ Loading Loading @@ -1137,14 +1142,17 @@ public class NumberPicker extends LinearLayout { * items shown on the selector wheel) the selector wheel wrapping is * enabled. * </p> * * <p> * <strong>Note:</strong> If the number of items, i.e. the range * ({@link #getMaxValue()} - {@link #getMinValue()}) is less than * {@link #SELECTOR_WHEEL_ITEM_COUNT}, the selector wheel will not * wrap. Hence, in such a case calling this method is a NOP. * </p> * @param wrapSelectorWheel Whether to wrap. */ public void setWrapSelectorWheel(boolean wrapSelectorWheel) { if (wrapSelectorWheel && (mMaxValue - mMinValue) < mSelectorIndices.length) { throw new IllegalStateException("Range less than selector items count."); } if (wrapSelectorWheel != mWrapSelectorWheel) { final boolean wrappingAllowed = (mMaxValue - mMinValue) >= mSelectorIndices.length; if ((!wrapSelectorWheel || wrappingAllowed) && wrapSelectorWheel != mWrapSelectorWheel) { mWrapSelectorWheel = wrapSelectorWheel; updateIncrementAndDecrementButtonsVisibilityState(); } Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -26676,6 +26676,7 @@ package android.widget { method public void setOnValueChangedListener(android.widget.NumberPicker.OnValueChangeListener); method public void setValue(int); method public void setWrapSelectorWheel(boolean); field public static final int SELECTOR_WHEEL_ITEM_COUNT = 5; // 0x5 } public static abstract interface NumberPicker.Formatter {
core/java/android/widget/NumberPicker.java +13 −5 Original line number Diff line number Diff line Loading @@ -70,6 +70,11 @@ import com.android.internal.R; @Widget public class NumberPicker extends LinearLayout { /** * The number of items show in the selector wheel. */ public static final int SELECTOR_WHEEL_ITEM_COUNT = 5; /** * The default update interval during long press. */ Loading Loading @@ -1137,14 +1142,17 @@ public class NumberPicker extends LinearLayout { * items shown on the selector wheel) the selector wheel wrapping is * enabled. * </p> * * <p> * <strong>Note:</strong> If the number of items, i.e. the range * ({@link #getMaxValue()} - {@link #getMinValue()}) is less than * {@link #SELECTOR_WHEEL_ITEM_COUNT}, the selector wheel will not * wrap. Hence, in such a case calling this method is a NOP. * </p> * @param wrapSelectorWheel Whether to wrap. */ public void setWrapSelectorWheel(boolean wrapSelectorWheel) { if (wrapSelectorWheel && (mMaxValue - mMinValue) < mSelectorIndices.length) { throw new IllegalStateException("Range less than selector items count."); } if (wrapSelectorWheel != mWrapSelectorWheel) { final boolean wrappingAllowed = (mMaxValue - mMinValue) >= mSelectorIndices.length; if ((!wrapSelectorWheel || wrappingAllowed) && wrapSelectorWheel != mWrapSelectorWheel) { mWrapSelectorWheel = wrapSelectorWheel; updateIncrementAndDecrementButtonsVisibilityState(); } Loading