阿糖胞苷>按钮,笛子>阵列
当我点击按钮列表列表视图的按钮?有没有身体帮助我? 帮助,帮助
ps:我尝试了一些但没有工作
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);//
setContentView(R.layout.activity_main);
Ara = (Button)findViewById(R.id.btnAra);
multitv =(MultiAutoCompleteTextView) findViewById(R.id.multiAutoCompleteTextView1);
adapter =new ArrayAdapter<String>(this,android.R.layout.select_dialog_singlechoice, Neresi());
multitv.setAdapter(adapter);
multitv.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
Aranan = (String)multitv.getText().toString();
listView = (ListView) findViewById(R.id.list);
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
Ara.setOnClickListener(this) ;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(v.getId() == R.id.btnAra)
{
String []dizi =null;
dizi = Belirtiler("Baş");
adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_multiple_choice,dizi);
listView.setAdapter(adapter);
}
}
答案 0 :(得分:0)