开发者

android listview onItemClickListener failed

i use the following code to listener my listview onItemClick Events. no compile error occurred ,

and nothing happened when i clicked any list item , i don't why Orz

could someone tell me why @@?

mp3_listView.setOnItemClickListener(new OnItemClickListener() 
        { 
            @Override
            开发者_开发技巧public void onItemClick(AdapterView<?> arg0, View arg1, int arg2 , long arg3) { 
                Toast.makeText(tabDigTest.this , arg2+" ", Toast.LENGTH_SHORT);
            }
        });


You need to call show on the Toast object then only it'll be shown.

Toast.makeText(tabDigTest.this , arg2+" ", Toast.LENGTH_SHORT).show();

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜