Loading api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -1201,6 +1201,7 @@ package android { field public static final int selectableItemBackgroundBorderless = 16843868; // 0x101045c field public static final deprecated int selectedDateVerticalBar = 16843591; // 0x1010347 field public static final deprecated int selectedWeekBackgroundColor = 16843586; // 0x1010342 field public static final int selectionDividerHeight = 16844190; // 0x101059e field public static final int sessionService = 16843837; // 0x101043d field public static final int settingsActivity = 16843301; // 0x1010225 field public static final int settingsSliceUri = 16844179; // 0x1010593 Loading Loading @@ -54578,6 +54579,7 @@ package android.widget { method public java.lang.String[] getDisplayedValues(); method public int getMaxValue(); method public int getMinValue(); method public int getSelectionDividerHeight(); method public int getValue(); method public boolean getWrapSelectorWheel(); method public void setDisplayedValues(java.lang.String[]); Loading @@ -54587,6 +54589,7 @@ package android.widget { method public void setOnLongPressUpdateInterval(long); method public void setOnScrollListener(android.widget.NumberPicker.OnScrollListener); method public void setOnValueChangedListener(android.widget.NumberPicker.OnValueChangeListener); method public void setSelectionDividerHeight(int); method public void setValue(int); method public void setWrapSelectorWheel(boolean); } core/java/android/widget/NumberPicker.java +34 −3 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package android.widget; import android.annotation.CallSuper; import android.annotation.IntDef; import android.annotation.IntRange; import android.annotation.Px; import android.annotation.TestApi; import android.annotation.UnsupportedAppUsage; import android.annotation.Widget; Loading @@ -30,6 +32,7 @@ import android.graphics.Paint; import android.graphics.Paint.Align; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import android.text.InputFilter; import android.text.InputType; Loading Loading @@ -88,6 +91,16 @@ import java.util.Locale; * of the current value. Tapping on the current value allows to type in a * desired value. * </li> * <li> * If the current theme is derived from {@link android.R.style#Theme_Material} * the widget presents the current value as a scrolling vertical selector with * the selected value in the center and the previous and following numbers above * and below, separated by a divider. The value is changed by flinging vertically. * The thickness of the divider can be changed by using the * {@link android.R.attr#selectionDividerHeight} attribute and the color of the * divider can be changed by using the * {@link android.R.attr#colorControlNormal} attribute. * </li> * </ul> * <p> * For an example of using this widget, see {@link android.widget.TimePicker}. Loading Loading @@ -436,14 +449,14 @@ public class NumberPicker extends LinearLayout { /** * Divider for showing item to be selected while scrolling */ @UnsupportedAppUsage @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) private final Drawable mSelectionDivider; /** * The height of the selection divider. */ @UnsupportedAppUsage private final int mSelectionDividerHeight; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) private int mSelectionDividerHeight; /** * The current scroll state of the number picker. Loading Loading @@ -1556,6 +1569,24 @@ public class NumberPicker extends LinearLayout { return mSelectorIndexToStringCache.get(getValue()); } /** * Set the height for the divider that separates the currently selected value from the others. * @param height The height to be set */ public void setSelectionDividerHeight(@IntRange(from = 0) @Px int height) { mSelectionDividerHeight = height; invalidate(); } /** * Retrieve the height for the divider that separates the currently selected value from the * others. * @return The height of the divider */ public int getSelectionDividerHeight() { return mSelectionDividerHeight; } @Override protected float getTopFadingEdgeStrength() { return TOP_AND_BOTTOM_FADING_EDGE_STRENGTH; Loading core/res/res/values/attrs.xml +1 −1 Original line number Diff line number Diff line Loading @@ -5532,7 +5532,7 @@ <attr name="solidColor" format="color|reference" /> <!-- @hide The divider for making the selection area. --> <attr name="selectionDivider" format="reference" /> <!-- @hide The height of the selection divider. --> <!-- The height of the selection divider. --> <attr name="selectionDividerHeight" format="dimension" /> <!-- @hide The distance between the two selection dividers. --> <attr name="selectionDividersDistance" format="dimension" /> Loading core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2928,6 +2928,7 @@ <public name="dataSharedWithThirdParty" /> <public name="dataUsedForMonetization" /> <public name="dataRetentionTime" /> <public name="selectionDividerHeight" /> </public-group> <public-group type="drawable" first-id="0x010800b4"> Loading Loading
api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -1201,6 +1201,7 @@ package android { field public static final int selectableItemBackgroundBorderless = 16843868; // 0x101045c field public static final deprecated int selectedDateVerticalBar = 16843591; // 0x1010347 field public static final deprecated int selectedWeekBackgroundColor = 16843586; // 0x1010342 field public static final int selectionDividerHeight = 16844190; // 0x101059e field public static final int sessionService = 16843837; // 0x101043d field public static final int settingsActivity = 16843301; // 0x1010225 field public static final int settingsSliceUri = 16844179; // 0x1010593 Loading Loading @@ -54578,6 +54579,7 @@ package android.widget { method public java.lang.String[] getDisplayedValues(); method public int getMaxValue(); method public int getMinValue(); method public int getSelectionDividerHeight(); method public int getValue(); method public boolean getWrapSelectorWheel(); method public void setDisplayedValues(java.lang.String[]); Loading @@ -54587,6 +54589,7 @@ package android.widget { method public void setOnLongPressUpdateInterval(long); method public void setOnScrollListener(android.widget.NumberPicker.OnScrollListener); method public void setOnValueChangedListener(android.widget.NumberPicker.OnValueChangeListener); method public void setSelectionDividerHeight(int); method public void setValue(int); method public void setWrapSelectorWheel(boolean); }
core/java/android/widget/NumberPicker.java +34 −3 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package android.widget; import android.annotation.CallSuper; import android.annotation.IntDef; import android.annotation.IntRange; import android.annotation.Px; import android.annotation.TestApi; import android.annotation.UnsupportedAppUsage; import android.annotation.Widget; Loading @@ -30,6 +32,7 @@ import android.graphics.Paint; import android.graphics.Paint.Align; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import android.text.InputFilter; import android.text.InputType; Loading Loading @@ -88,6 +91,16 @@ import java.util.Locale; * of the current value. Tapping on the current value allows to type in a * desired value. * </li> * <li> * If the current theme is derived from {@link android.R.style#Theme_Material} * the widget presents the current value as a scrolling vertical selector with * the selected value in the center and the previous and following numbers above * and below, separated by a divider. The value is changed by flinging vertically. * The thickness of the divider can be changed by using the * {@link android.R.attr#selectionDividerHeight} attribute and the color of the * divider can be changed by using the * {@link android.R.attr#colorControlNormal} attribute. * </li> * </ul> * <p> * For an example of using this widget, see {@link android.widget.TimePicker}. Loading Loading @@ -436,14 +449,14 @@ public class NumberPicker extends LinearLayout { /** * Divider for showing item to be selected while scrolling */ @UnsupportedAppUsage @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) private final Drawable mSelectionDivider; /** * The height of the selection divider. */ @UnsupportedAppUsage private final int mSelectionDividerHeight; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) private int mSelectionDividerHeight; /** * The current scroll state of the number picker. Loading Loading @@ -1556,6 +1569,24 @@ public class NumberPicker extends LinearLayout { return mSelectorIndexToStringCache.get(getValue()); } /** * Set the height for the divider that separates the currently selected value from the others. * @param height The height to be set */ public void setSelectionDividerHeight(@IntRange(from = 0) @Px int height) { mSelectionDividerHeight = height; invalidate(); } /** * Retrieve the height for the divider that separates the currently selected value from the * others. * @return The height of the divider */ public int getSelectionDividerHeight() { return mSelectionDividerHeight; } @Override protected float getTopFadingEdgeStrength() { return TOP_AND_BOTTOM_FADING_EDGE_STRENGTH; Loading
core/res/res/values/attrs.xml +1 −1 Original line number Diff line number Diff line Loading @@ -5532,7 +5532,7 @@ <attr name="solidColor" format="color|reference" /> <!-- @hide The divider for making the selection area. --> <attr name="selectionDivider" format="reference" /> <!-- @hide The height of the selection divider. --> <!-- The height of the selection divider. --> <attr name="selectionDividerHeight" format="dimension" /> <!-- @hide The distance between the two selection dividers. --> <attr name="selectionDividersDistance" format="dimension" /> Loading
core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2928,6 +2928,7 @@ <public name="dataSharedWithThirdParty" /> <public name="dataUsedForMonetization" /> <public name="dataRetentionTime" /> <public name="selectionDividerHeight" /> </public-group> <public-group type="drawable" first-id="0x010800b4"> Loading