Android open ContextMenu on short click + pass item clicked details

后端 未结 6 641
不思量自难忘°
不思量自难忘° 2020-12-03 03:19
 lv.setOnItemClickListener(new OnItemClickListener() {
             @Override
          public void onItemClick(AdapterView parent, View view, int position,         


        
6条回答
  •  不思量自难忘°
    2020-12-03 03:55

    I believe that if you add an OnLongClickListener to the view, you should be able to prevent it from showing the context menu on long click.

    In onItemClick the view parameter is the item view, so you should be able to get ImageViews or TextViews from that:

    view.findById(R.id.my_image_view);
    

提交回复
热议问题