Android full screen view

I have a form in DialogFragment that includes a spinner. I don’t think I can transfer the spinner parameters to a new activity (for example, a custom ListView, etc.), since it will close the DialogFragment, so I use the spinner built into DialogFragment (screenshot 1). It is not unusual for me to populate a counter using an ArrayList and an adapter.

<Spinner
    android:id="@+id/breedingcodes"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingTop="10dip" />

Functionally, it works fine, and the spinner parameters appear and are selected, but look awful, since it uses only half of the screen (see screenshot 2), tied to the counter position in the Dialog dialog box. In any case, to make him use the full screen, as in the third screenshot with the title certificate of reproduction? I tried to mess with layout_height = "match_parent" etc. - without joy.

The application is designed for the minimum SDK_10 compiled for SDK_23, build tools 23.0.3.

Form in DialogFragment Custom counter display View full screen

+4
source share
2 answers

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

android:spinnerMode="dialog"

spinner. .

+10
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);

, :)

0

All Articles