Reputation: 235
I have a NumberPicker inside an AlertDialog instantiated like this: final NumberPicker np = new NumberPicker(PiattoActivity.this);
.
The problem is, instead of being rendered like this (on the left):
it's rendered like this:
Why the dividers take up all the space given? How can I fix it?
Upvotes: 1
Views: 488
Reputation: 57173
You are using for the picker
android:layout_width="match_parent"
You should use
android:layout_width="wrap_content"
android:layout_gravity="center"
Upvotes: 1