Android : Spinner初始化时填充默认值数据

一次次尝试 2011-03-15

---------------------------------------华丽的分割线-----------------------------------------

ArrayAdapter<String> adapter = new ArrayAdapter<String>
(this, android.R.layout.simple_layout,  /*here is your array list*/);   

spinner.setAdapter(adapter);

int position = adapter.getPosition(/*here is some string in your array list*/);

spinner.setSelection(position ,  true);

相关推荐