




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
第第頁Android紫薇軟劍之Spinner之北上廣Android紫薇軟劍之Spinner之北上廣
發(fā)表于:2023-08-05來源:Csdn:lynnli_1229點(diǎn)擊數(shù):標(biāo)簽:Spinner
紫薇軟劍“紫薇軟劍,三十歲前所用,誤傷義士不祥,乃棄之深谷?!睏钸^心想:“這里少了一把劍,原來是給他拋棄了,不知如何誤傷義士,這故事多半永遠(yuǎn)無人知曉了。
紫薇軟劍
"紫薇軟劍,三十歲前所用,誤傷義士不祥,乃棄之深谷。'楊過心想:"這里少了一把劍,原來是給他拋棄了,不知如何誤傷義士,這故事多半永遠(yuǎn)無人知曉了。
今天我們學(xué)習(xí)如何利用Android平臺(tái)"紫薇軟劍'Spinner實(shí)現(xiàn)下拉選項(xiàng)列表的功能,怎么樣?紫薇軟劍也是可以拉的哦^_^。在實(shí)際生活中下拉選項(xiàng)列表出現(xiàn)的場(chǎng)合就太多了,像選擇語種、省份、城市、年限、薪資、職業(yè)等,真可謂是舉不勝舉。下面給出該情景的案例:
一、案例技術(shù)要點(diǎn)
1.從數(shù)據(jù)源采集數(shù)據(jù)分別填充ArrayAdapter和SimpleAdapter。
2.ArrayAdapter和SimpleAdapter將數(shù)據(jù)分別推向正常樣式Spinner和自定義樣式Spinner的對(duì)應(yīng)視圖進(jìn)行顯示。
3.為Spinner設(shè)置點(diǎn)擊選項(xiàng)監(jiān)聽,獲取當(dāng)前說選項(xiàng)的位置和ID。
二、案例代碼陳列
工程包目錄
AndroidManifest.xml
[html]viewplaincopyprint?
package=cn.lynn.spinner
android:versionCode=1
android:versionName=1.0
android:minSdkVersion=8
android:targetSdkVersion=15/
android:icon=@drawable/ic_launcher
android:label=@string/app_name
android:name=.SpinnerMainActivity
android:label=@string/app_name
package=cn.lynn.spinner
android:versionCode=1
android:versionName=1.0
android:minSdkVersion=8
android:targetSdkVersion=15/
android:icon=@drawable/ic_launcher
android:label=@string/app_name
android:name=.SpinnerMainActivity
android:label=@string/app_name
strings.xml
[html]viewplaincopyprint?
Android下拉列表Spinner
您從哪兒回來的?
您選擇的Logo是?
Android下拉列表Spinner
您從哪兒回來的?
您選擇的Logo是?
main.xml
[html]viewplaincopyprint?
android:layout_width=match_parent
android:layout_height=match_parent
android:orientation=vertical
android:layout_width=match_parent
android:layout_height=wrap_content
android:text=@string/where/
android:id=@+id/spinner
android:layout_width=match_parent
android:layout_height=wrap_content/
android:layout_width=match_parent
android:layout_height=wrap_content
android:text=@string/what/
android:id=@+id/spinner2
android:layout_width=match_parent
android:layout_height=wrap_content/
android:layout_width=match_parent
android:layout_height=match_parent
android:orientation=vertical
android:layout_width=match_parent
android:layout_height=wrap_content
android:text=@string/where/
android:id=@+id/spinner
android:layout_width=match_parent
android:layout_height=wrap_content/
android:layout_width=match_parent
android:layout_height=wrap_content
android:text=@string/what/
android:id=@+id/spinner2
android:layout_width=match_parent
android:layout_height=wrap_content/
item.xml
[html]viewpl
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 供貨茶葉合同范本
- 包裝食品配送合同范例
- 合作擔(dān)保合同范例
- 合租合同范本
- 化肥合作協(xié)議合同范本
- 廠房使用合同范例
- 人工勞務(wù)合同范本封皮
- 個(gè)人汽車采購(gòu)合同范本
- 企業(yè)業(yè)務(wù)合同范本
- 合同范本征求意見
- 【講座培訓(xùn)】《中小學(xué)教育懲戒規(guī)則(試行)》解讀課件
- 中科大《無機(jī)化學(xué)》課件1氣體、液體和溶液的性質(zhì)
- 復(fù)婚合同協(xié)議書模板
- U8-EAI二次開發(fā)說明
- 2006 年全國(guó)高校俄語專業(yè)四級(jí)水平測(cè)試試卷
- 浙江省勞動(dòng)保障監(jiān)察員培訓(xùn)監(jiān)察執(zhí)法程序(林琳)
- 新人教版數(shù)學(xué)四年級(jí)下冊(cè)全冊(cè)表格式教案
- 閩教版(2020版)六年級(jí)下冊(cè)信息技術(shù)整冊(cè)教案
- 二手房買賣合同正式版空白
- 食品銷售經(jīng)營(yíng)者食品安全管理制度(零售)
- 通信電源-概述ppt課件
評(píng)論
0/150
提交評(píng)論