blackjack
blackjack

Reputation: 585

Spinner item not showing as dropdown but in the top of the spinner

i am using spinner in my code which i had declare in my xml

xml code for spinner:-

<Spinner
        android:id="@+id/spinner"
        android:layout_width="180dp"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/button1"
        android:layout_marginTop="133dp"
        android:drawSelectorOnTop="true" />

so as can be seen that the spinner is down the one button which is also in that layout xml .Now when i run my app its loading all data correctly but the item is showing in the top of the spinner not in the down side of the spinner.Mentioning the screenshot how it appear

Spinner when placed down of the button

but when i m using the same spinner parallel to the button the spinner dropdown effect working very fine.Here is the screenshot how it appear.

Spinner when placed parallel to the button

so can any tell me how can we solve this kind of scenario.thanks for any reply.

Upvotes: 3

Views: 3488

Answers (1)

Faisal Khan
Faisal Khan

Reputation: 2614

try this hope this will help you

 android:spinnerMode="dropdown"

Upvotes: 2

Related Questions