How to make a click at the item?


When you click exactly on the text DetailActivity does not start, and when you click on the block itself, in a region where there is no text, it moves, you need to make sure that the unit itself was clickable, and through a text clicks. How can I achieve this?
July 4th 19 at 23:18
2 answers
July 4th 19 at 23:20
As one of the options:
In the adapter:
 public void onBindViewHolder(final ViewHolder holder, int position) {
 holder.view.setOnClickListener(new View.OnClickListener() {
 public void onClick(View v) {


public class ViewHolder extends RecyclerView.ViewHolder {
 public final View View;

 public ViewHolder(View v) {
 view = v;
July 4th 19 at 23:22
Add the following to the root ViewGroup of your item a:

Find more questions by tags Android