iaindownie iaindownie - 1 year ago 235
Android Question

Android spinner full screen view

I have a form in a DialogFragment that includes a spinner. I don't think I can port the spinner options out to a new activity (e.g. customisable ListView etc.) as it will close the DialogFragment, so I'm using the spinner embedded into the DialogFragment (screenshot 1). There is nothing unusual about how I'm populating the spinner with an ArrayList and adapter.

android:paddingTop="10dip" />

Functionally it works fine and the spinner options appear and are selectable, but looks terrible as it only uses half the screen (see screenshot 2), anchored to the position of the spinner in the DialogFragment. Is there anyway to force it to use the full screen, as in the 3rd screenshot with Breeding evidence title? I've tried fiddling with layout_height="match_parent" etc. - no joy.

App is developed for min SDK_10, compiled for SDK_23, build tools 23.0.3.

Form in DialogFragment Sub-standard spinner view Full screen spinner view

Answer Source

You can either create your own dialog and style it as you want, or just use


as attribute in spinner. See docs here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download