I have a spinner on right side of action bar, and i am using a background draw-able for my spinner. when i click on that draw-able, drop-down list appears with spinner items, and when i select a spinner item, it starts showing at the action bar, i don't want it to show there at the title bar. how can i do that. Below is the code for my spinner
<Spinner
android:id="@+id/planets_spinner"
android:layout_width="40sp"
android:layout_height="35sp"
android:focusable="false"
android:layout_alignParentRight="true"
android:background="@drawable/arrow"
android:layout_alignParentTop="true" />
I have a spinner like this
On Item selection, i want it to be like this
but the selected item's name keeps on appearing like this
You can play with the spinner adapter, changing the text of the spinner item when it is selected to be blank, and restoring it once it is unselected. This isn't the most graceful solution, but it will give you what you want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.