method:getChoiceMode ( )
return type:int
content:ใช้คืนค่า choice mode ของ Object ListView
( choice mode คือการกำหนดว่า ต้องการให้เลือกได้เพียงหนึ่ง หรือมากกว่าหนึ่ง )
example:public class AndroidBamboo extends Activity
{
public void onCreate( Bundle savedInstanceState )
{
super.onCreate ( savedInstanceState );
ListView list = new ListView ( this );
ArrayAdapter array_adapter = new ArrayAdapter <String> ( this, android.R.layout.simple_dropdown_item_1line );
String [ ] items = { "bam", "boo", "lab", "code", "programming", "framework", "android" };
array_adapter.add ( items );
list.setAdapter ( array_adapter );
int choice_mode = list.getChoiceMode ( );
setContentView( list );
}
}