This code works for me. The NumberPicker is as wide as the longest item text. Maybe you have to choose a different size for the parent layout.
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
<NumberPicker
android:id="@+id/section_numberPicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</FrameLayout>
Also you can set a static widht android:layout_width="300dp"
but then it will truncate the text ifi it is longer.