I want to use an on click listener onto the whole recycler view item. well, I want to use the on click listener when clicking on the item "anywhere" (the whole item). but when the whole item is using an on click listener, as you can see, the click listener is preventing the scrolling. how can i use an on click listener onto the whole item in the recycler, but scrolling should still be possible. i used the systems itemview for the click listener, also a button over the whole item layout, anyway the click listener prevents from scrolling. how to solve this? Thanks! Here the code:
public class ViewHolder extends RecyclerView.ViewHolder {
public TextView tvBezeichnung;
public ImageButton buttonSelect;
public ImageButton buttonUpDown;
public ViewHolder(View itemView) {
super(itemView);
tvBezeichnung = itemView.findViewById(R.id.risftvbezeichnung);
itemview.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
...
});
//also tried buttons/other views over the whole item, on click listener prevents scrolling
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…