

Get private mPopup member variable and try cast to ListPopupWindowĪ popupWindow = () popup. Drag the Spinner from the pallete, now the activitymain.xml file will. Lets see the simple example of spinner in android. You need to use ArrayAdapter class to store the country list. In this example, we are going to display the country list.

Spinner spinner = (Spinner) findViewById(R.id.spinner) įield popup = ("mPopup") Android Spinner class is the subclass of AsbSpinner class.

What i want : I want to create a drop down view, where user can see only 10 items in theĭrop down view, other items will be shown whenever user will scroll the drop down view. Query : I am creating 2-Spinner view, where i have to add Country/Cities list, So like if i am selecting india then i am getting 50 items inside the drop down view, problem with this is that it is taking the whole page in height. Android spinners are nothing but the drop down-list seen in other programming. This is a quick and easy android studio tutorial about spinner or dropdown. In Android, Spinner provides a quick way to select one value from a set of values. Please suggest any approach which i use to create it. This video tutorial is about spinner in android with string array.
