Closed younes0 closed 8 years ago
Try direcly from the adapter's view Le 15 mai 2016 11:16, "Younes El Biache" notifications@github.com a écrit :
How would you set a Click Listener on the shuffle component ? I tried this with no success:
shuffle.setOnClickListener(new Shuffle.OnClickListener() { @Override public void onClick(View view) { Debug.i("test"); // Do something here } });
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/Meetic/Shuffle/issues/10
Thanks, it worked.
public class ShuffleAdapter extends Shuffle.Adapter {
@Override
public Shuffle.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int type) {
View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_swipe, viewGroup, false);
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
}
});
return new Shuffle.ViewHolder(view);
}
}
👍
How would you set a Click Listener on the shuffle component ? I tried this with no success: