onListItemClick is not getting called on ListActivity

后端 未结 6 1050
闹比i
闹比i 2021-01-16 12:00

I have a small application, and I am trying to display list of youtube thumbnails using the ListActivity

public class ResultListActivity extends ListActivity         


        
6条回答
  •  清歌不尽
    2021-01-16 12:17

    For ListActivity its simple to call setOnItemClickListener

    The corresponding code is below

    list.setOnItemClickListener(new OnItemClickListener() {
    
    public void onItemClick(AdapterView arg0,
                        View arg1, int position, long arg3)
    {
       System.out.println("LIST ITEM POSITION "+position);
    }
    });
    

提交回复
热议问题