Info

ftfi/T-W K ffii^ilr® ActivityListl ila + o ft Eclipse -S'f'XXififT if

ActivityListl .java £f'l . onCreate //'ji M&iftttW:

listView - new ListView(this);

listVaew.setAdapter(new ArrayAdapter<String>(this,Android.R.layout.simple list_item 1, da t a) ) ;

setConter.tView (listView) ;

MtW:

• listView = new UstView(this)iu'"J$ri£T t ListView, t&itJ£»i&T ^M&o flltifiS — ft»i£ t Context ftifiiftftlifiFfi».

• listView.setAdapter(new ArrayAdapter<String>(this,Android.R.layout.simple list item 1, data))

CI fcndrc: <W«i>i f «si ¿•fruit properties rno'J»e txt

A SI 7-51 WJf-g-ggft iiHUih list View ill Array Adapter iifcij*^ Si. List View ¡¿. -«tiigWS^iMKo ff. I-

4zCl<JiWVK listView ArrayAdapter MiMjM S^tfi&o liu ArrayAdapter ft® 3 ffiMtffl. $ ft« J| Context. B|J h F\SCfl*J'j|MJ; R >tfl-4U!zft X

¿EiiMjfW^'t', Android.R.layout.simp lejistjtem 1. ii-fclj]

ListView WMfiM-JjSifRKW—^ TextView: $ -.^«[fflWft^i^iftffl.

• setContentView(listView)@iiJ^/j>:^F listView ftiiiltiiS^«

List Adapter?

f^mR | List Adapter ^ i Adapter, ListView *D*Mifcft#WiSR#.

: ii-t ListView

• Data, ill ListView t Cursor

• ListAdapter, & data ListView MffiSg, ig -^ifiFEftHJ.

&& * TW'J 7-1'. ii-^^'T-ilJ^'^JiWtfift 73£ ArrayAdapter ill SimpleAdapter ftjteJtJ-• *

fi'&M: ArrayAdapter? | ArrayAdapter £ ListAdapter ft-^tili^ PTBtfti^A

| ft ft --M & ft 8 ^ £ ListView f.iio ArrayAdapter $ fx it ft

I (ft I jstView # - ^ it 'I* K # -1 Text View, ffi Text View t ih $ ft rt g ft SL

| ^ 0 i + 0 & £ X ft ^ 7; A Bi ® ti R.layou.XX # R ( XX % # iff ft « f ), JP| Android % ^ftft J ft£ ft4 ^ # £, jfefl] 4 it Android.R.layout.XX fr j SX- Xtf-ListView Android 7 ft

j ___...— ________________________________________________

• Android.R.layout.simple list item 1, H 'JjSMW t Text View,

• Android. R.layout.simple_list_item_2 ft -JftfjWt Text View«

• Android.R.layout.simple list item single choice. H t Text View, {HJiU -JjSnJlU

Was this article helpful?

0 0

Post a comment