标签:span ast 界面 replace int nsa cti tac com
要想实现点击每个item进入其它界面需要在自己的Adapter里设置点击事件
holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(mcontext,"第"+(position+1)+"条消息查看成功",Toast.LENGTH_SHORT).show(); KeFragment keFragment=new KeFragment(""); FragmentTransaction transaction=((StudentActivity)mcontext).getSupportFragmentManager().beginTransaction(); transaction.replace(R.id.fragment_container,keFragment); transaction.addToBackStack(null); transaction.commit(); } });
标签:span ast 界面 replace int nsa cti tac com
原文地址:https://www.cnblogs.com/chenaiiu/p/12793999.html