解决了添加事件bug,实现了fragment的list view的点击事件,fragment里调用数据库一系列问题。以下目标实现长按事件和表格。
以下未实现图片:
点击跳转到activity
Toast.makeText(getContext(),listView.getAdapter().getItem(position).toString(), Toast.LENGTH_SHORT).show();标签:Toast,18,bundle,intent,冲刺,Intent,团队,consumer,id From: https://www.cnblogs.com/JIANGzihao0222/p/17331728.html
int consumer_id = comsumes.get(position).getConsume_id();
Intent intent = new Intent();
intent.setClass(getActivity(), Show.class);
Bundle bundle = new Bundle();
bundle.putInt("Consumer_id",consumer_id );
System.out.println("Consumer_id = " + consumer_id);
intent.putExtra("View",bundle);
startActivity(intent);