I have a simple NumberPicker
just like this:
and I was wondering how I can make it show more elements above and below the selected element.
For example, in the picture you can see "9" above the selected element "10", and "11" right below it.
I would like to change the number of visible rows so it shows more elements like "7, 8, 9", then the selected element "10", then "11, 12, 13".
This is my code:
<NumberPicker
android:id="@+id/picker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="16sp"
/>
and I've tried to change setting android:layout_height
to match_parent
and to a big number (e.g. 500dp) but it doesn't seen to work...