onItemTouchListner on RecyclerView - #12

preview_player
Показать описание
In this tutorial, we’ll learn how we can click on each RecyclerView Item and perform different Functionalities on each Item. We will also learn how we can open different Activities by Clicking different Recyclerview Item.
.
.
If you want to learn RecyclerView from Basic
Follow this Playlist:
.
.
Show your Support at Patreon:
.

.
________________________________________
Follow us on Social Media
📢 Facebook Page:
.
👨‍🔧 Join Facebook Group : (Post your Errors here)
.
📱 Follow us on Instagram:
.
➡️ Follow us on Twitter:
.
For business Inquires:
Рекомендации по теме
Комментарии
Автор

Explained in the simplest way. Can't be explained in easiest way than this. Thank you Sir. Allah aapko tarakki de. Ameen

mdmuzammil
Автор

Found your video at the perfect time when I needed the most 😊

hanisingh
Автор

Bhai Ksi ke pass RecyclerView Item Click File Hai ???

abrarulislam
Автор

Asslam o alaikum sir j mashAllah bht achy lecture thy sir j jazakAllah

azkabashir
Автор

why you couldn't explain the code present in the class "RecyclerItemClickListener" ? without having knowledge of this code how we can use it blindly in the "MainActivity" class? Sir, you should explain it and write it in front of us so we can understand it and then practice it.

umairbashir
Автор

Thank you so much sir, your videos help me allot in making my project

yuvrajkhinchi
Автор

Sir humlog ek page se dusre page m Jane k liye cases use kar sakte h, like intent as u use, thanks🙏

rashmisharma
Автор

Sir mera ek question hain.
10 item ke liye 10 scrollview lena parega? Plz ans me??

kidstvbangla
Автор

in adapter we use onclicklistner on holder there we can also perform different activities on different item while you telling that we can't perform kindly clear please

techcollege
Автор

Sir if my recycle view contain more than 500 hundred item list then how can I add listener each item using switch..case
It means it is recommended approach or not sir..
Due to this The source code of length is increased and performance is down..
Please sir make the videos on this topic and reply it as soon possible..I Hope U reply it

NehaKumari-rkem
Автор

package

import android.content.Context;
import
import
import android.view.MotionEvent;
import android.view.View;

public class RecyclerItemClickListener implements {
private OnItemClickListener mListener;

public interface OnItemClickListener {
public void onItemClick(View view, int position);

public void onLongItemClick(View view, int position);
}

GestureDetector mGestureDetector;

public context, final RecyclerView recyclerView, OnItemClickListener listener) {
mListener = listener;
mGestureDetector = new GestureDetector(context, new {
@Override
public boolean onSingleTapUp(MotionEvent e) {
return true;
}

@Override
public void onLongPress(MotionEvent e) {
View child = recyclerView.findChildViewUnder(e.getX(), e.getY());
if (child != null && mListener != null) {
mListener.onLongItemClick(child,
}
}
});
}

@Override public boolean view, MotionEvent e) {
View childView = view.findChildViewUnder(e.getX(), e.getY());
if (childView != null && mListener != null && {
mListener.onItemClick(childView,
return true;
}
return false;
}

@Override public void onTouchEvent(RecyclerView view, MotionEvent motionEvent) { }

@Override
public void (boolean disallowIntercept){}
}

hardikjade
Автор

Can we set video on item click listener

invoketowrite
Автор

Sir, intent m putExtra kis tarah apply hoga

muhammadwaqas
Автор

Ye recycler view wali file to fb pe he hi nahi... Ab kya karun me...?

d.modi-aik
Автор

Sir plz make a video on firebase UI recyclerview and Firebase recycler adapter with click listener.

Sourav_
Автор

Hello Neat Roots. I Cant Find The File. Where Can I Find It????

RORONOA_ZORO
Автор

Sir Recyclerview me n post ke bad banner ads lagane ke liye sikhaye

rosegoldtelefilms
Автор

sir fb page sa file ni mil rahi kindly file ka link b description ma da dan

tamoorsarwar
Автор

Sir toast to show ho rha hai, agar mughe click karne par pdf next fragment me show karna hai to kaise kare

rosegoldtelefilms
Автор

Can we use on item touch dynamically. Bcz sometime we need a lots product list and show their details accordingly. So switch will be to difficult..

dtechtricks