2

In Android, I want to use a Spinner that initially (when the user has not made a selection yet) displays the text "Select". When the user clicks the spinner, the list of items is displayed and the user selects one of the options. After the user has made a selection, the selected item is displayed in the Spinner instead of "Select".

blahdiblah
  • 33,069
  • 21
  • 98
  • 152
MJBoss
  • 55
  • 1
  • 7

4 Answers4

2

Add "Select" at 0th potion of array of spinner item

Prashant Kadam
  • 551
  • 1
  • 12
  • 25
2

Put "Select" at 0 position in your list or array which you are using to create Spinner.

Arun Badole
  • 10,977
  • 19
  • 67
  • 96
1

Prior to being touched, spinners always display the first item in their array of options. Create the spinner with the text "Select" as its only option, which will cause it to be shown. Then override the onClick() method to reload the spinner's content to the list of options you want to show the user.

Drew C
  • 6,408
  • 3
  • 39
  • 50
0

How to make an Android Spinner with initial text "Select One"

Community
  • 1
  • 1
Mikita Belahlazau
  • 15,326
  • 2
  • 38
  • 43
  • thanks for answer but i don't want selectone text as initial text,i want "select" text as it. – MJBoss May 20 '11 at 08:37