I'm using Cards from the CardsLib library inside a CardGridView. I'm able to catch single clicks OR long clicks when implementing one of the listeners, but I'm unable to implement both. Like for regulars views, I'm returning true in the OnLongCardClickListener to consume the event.
MaterialLargeImageCard myCard = MaterialLargeImageCard.with(getActivity())
{...}
.build();
myCard.setOnLongClickListener(new Card.OnLongCardClickListener() {
@Override
public boolean onLongClick(Card card, View view) {
return true;
}
});
myCard.setOnClickListener(new Card.OnCardClickListener() {
@Override
public void onClick(Card card, View view) {
}
});