I am new to Android programming and was working on a card layout. I was wondering, how do I make it clickable?
android:clickable=\"true\"
android:foreground=\"?
In Your Adapter java file and inside of "ViewHolder" you will find:
public ContactViewHolder(final View v) {
super(v);
}
Write blow Code:
v.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
v.getContext().startActivity(new Intent(v.getContext(), YOUR_ACTIVITY_TO_START.class));
}
});