Start new Activity with onClick() in RecyclerView

后端 未结 10 773
渐次进展
渐次进展 2020-12-03 06:12

I want to go into a new Activity with the onClick() method but my code is not working. Can you please offer some advice. I have some issues with the recyclerView, since it\'

10条回答
  •  被撕碎了的回忆
    2020-12-03 06:29

    Just Place these lines of code in onClick(View view)

     view.getContext().startActivity(new 
     Intent(view.getContext(),SecondActivity.class));
    

提交回复
热议问题