How to decrease padding in NumberPicker
I want something like it:
It's surprisingly easy to archive:
(scaleX
and scaleY
equals 2.5)
(without scaleX
and scaleY
)
String[] values = {"Public", "Shared", "Private",....}; NumberPicker np= (NumberPicker) findViewById(R.id.numberPicker); np.setMaxValue(values.length-1); np.setMinValue(0); np.setDisplayedValues(values);
And simply set small layout_height
and scaleX
, scaleX
:
<NumberPicker android:id="@+id/numberPicker" android:layout_width="wrap_content" android:layout_height="50dp" android:scaleX="2.5" android:scaleY="2.5"/>
I do agree, that standard NumberPicker
is hardly customizable, though.
I hope, it helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With