+ 1
I'm using RecyclerView getting data from firebase but want to add a button on RecyclerView for get same value in next activity
I'm unable to understand how to work (mTeacherbtn)button for the same Recyclerview for get same ReceyclerView data in the next activity. mTeacherbtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ??? } }); public void onItemClick(int position) { Teacher clickedTeacher=mTeachers.get(position); String[] teacherData={clickedTeacher.getName(),clickedTeacher.getDescription(),clickedTeacher.getImageUrl(),clickedTeacher.getPhone(),clickedTeacher.getRating(),clickedTeacher.getMechanttype(),clickedTeacher.getWorkday()}; openDetailActivity(teacherData); }
1 Antwort
+ 1
I think. Need to call the method onItemClick();
I could be wrong.