开发者

populate spinner with some static value which is showing the label as 'select item' in android [duplicate]

开发者 https://www.devze.com 2023-03-01 12:29 出处:网络
This question already has answers here: How to make an Android Spinner with initial text "Select One"?
This question already has answers here: How to make an Android Spinner with initial text "Select One"? (36 answers) Closed 9 years ago. 开发者_如何转开发

i am using a spinner control in my application.i want to set a label on d spinner as "select item" when the page loads.when user trying to select something from the spinner the item should be displayed on the label.is it possible?then how?plz help me


Use android:prompt. See this link

 <Spinner 
    android:id="@+id/spinner"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:drawSelectorOnTop="true"
    android:prompt="@string/planet_prompt"
/>
0

精彩评论

暂无评论...
验证码 换一张
取 消