RecyclerView OnTouch Listener

1. implements RecyclerView.OnItemTouchListener
2. final GestureDetector mGestureDetector = new GestureDetector(getActivity().getApplicationContext(), new GestureDetector.SimpleOnGestureListener() {

@Override public boolean onSingleTapUp(MotionEvent e) {
return true;


3. mRecyclerView.addOnItemTouchListener(
new OrderFoodTypeFragment(getActivity().getApplicationContext(), new OrderFoodTypeFragment.OnItemClickListener() {
public void onItemClick(View view, int position) {

clickPosition =position;


মন্তব্য করুন

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  পরিবর্তন )

Google photo

You are commenting using your Google account. Log Out /  পরিবর্তন )

Twitter picture

You are commenting using your Twitter account. Log Out /  পরিবর্তন )

Facebook photo

You are commenting using your Facebook account. Log Out /  পরিবর্তন )

Connecting to %s