You should be able to get the effect you want by specifying the width of the dropdown as WRAP_CONTENT
:
<Spinner
android:id="@+id/spinner1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:dropDownWidth="wrap_content"
android:spinnerMode="dropdown" />
This will measure up to 15 items in the spinner’s adapter to determine the width it should use.