Get selected item when double click on listview item

前端 未结 1 1848
广开言路
广开言路 2021-01-05 19:12

Here is the code to display listview items and onclick listener action.

ListView list = (ListView) findViewById(R.id.list);
        ArrayAdapter

        
相关标签:
1条回答
  • 2021-01-05 19:25

    Use the pointToPosition method of the listview in your onDoubleTap method:

    int position = list.pointToPosition(e.getX(), e.getY());
    
    0 讨论(0)
提交回复
热议问题