How to retrieve the clicked string from a listview using OnItemClick?

前端 未结 4 2238
没有蜡笔的小新
没有蜡笔的小新 2020-12-31 06:48

I\'ve got some problem here. It looks simple and i keep searching for its solution. Unfortunately, i cant find anything. This is my problem.... What i\'m trying to do is to

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-31 07:18

     public void onItemClick(AdapterView arg0, View arg1, int arg2,long arg3)
         {
             String data=(String)arg0.getItemAtPosition(arg2);
    
    
         }});
    

    data contains your clicked position's data. Do what ever you want to do with that.

提交回复
热议问题