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