0
如何在Listview wordList上设置onclickListener来检索列表中显示的文本?我还应该在哪里编写该功能?我是一个天真的Android开发人员,找不到合适的例子!如何在列表视图上放置onclickListener
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (requestCode == REQUEST_CODE && resultCode == RESULT_OK)
{
// Populate the wordsList with the String values the recognition engine thought it heard
matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
wordsList.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,matches));
}
super.onActivityResult(requestCode, resultCode, data);
}
一下: http://stackoverflow.com/questions/2240411/android-when-i-set-an-onclicklistener-for-a-listview – Santhosh 2012-04-29 05:39:06