If you know in Telegram to delete chat or group we hold item(long press) and clicking another item then we add the group to chat, to delete the list, I cant do it.
Currently I can listening just only click like this:
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(itemView.getContext(),"Short Click",Toast.LENGTH_SHORT).show();
}
});
and listening long click:
itemView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
Toast.makeText(itemView.getContext(),"Short Click",Toast.LENGTH_SHORT).show();
return false;
}
});
In my case, I want to listen to long-press and then I want to highlight item(of course, the item is part of recyclerView) with just click(not long click) I googled but it did not help me.