I am beginner in Android. For onItemCliking i have searched and seen 20+ videos and read 10-15 article about this. At last i have got a 100% explained video. Thank you so much sir 😍😍😍 From Bangladesh
@mohamedayad704 жыл бұрын
after watching more than 8 or 9 videos finally i got it thanks bro
@mafiacodes4 жыл бұрын
Glad u like it
@noodler9113 жыл бұрын
@@mafiacodes 3:44 the this argument doesn't work. It provides ValueEventListener instead of recyclerViewClickInterface. What can I do?
@arbiealmeida874 жыл бұрын
No joke, this tutorial saved my butt. Huge huge thanks.
@CarlosAguilar-ue2um4 жыл бұрын
Same
@noodler9113 жыл бұрын
3:44 the this argument doesn't work. It provides ValueEventListener instead of recyclerViewClickInterface. What can I do?
Need to share code on GitHub and also mention the problem in readme.md file
@noodler9113 жыл бұрын
@@mafiacodes thanks man but I just fixed it. Thanks anyway!
@fullgamingindia10 ай бұрын
what happen if we implements this interface in two activity classes and call this from recycler view. method from both classes will be called or not?
@mohamedjakhrouti35564 жыл бұрын
thanks for video i have a question if ithem f listview or recyclerview contains three buttons and every button lanch activity diferent of the others how to add a click listener of them thanks again
@sanketrai13033 жыл бұрын
this tutorial really helped me thanks!!! i was about to giveup and then i saw this video and solved my problem thanks a ton !!!
@solvinglife66582 жыл бұрын
How can we use this with checkbox...urrgently needed....please
@sitaramgangode9124 жыл бұрын
Thank you sir I need your guidance. I want to open new different activity from every item in recyclerview. So I think I should use switch case to perform a task. But I don't know how to do it. Please guide for the same.
@yogeshwarbirangal4 жыл бұрын
Thank you man I wanted this from long time. I didn't know this method i was searching this method from long on Internet but couldn't find better implementation. Once again thank you.
@mafiacodes4 жыл бұрын
Subscribe like share😊
@rajarshimandal32353 жыл бұрын
Passing "this" to adapter is not accepted, in constructor it asked to cast to valueevent listener, all errors gone but app crashed, any help plz?
@suhailzack90753 жыл бұрын
i am not able to call the RecyclerviewInterface inside my adapter any suggestions?
@ageingdragon81322 жыл бұрын
will you consider one day doing this in kotlin??
@Servidor_Publico_do_Ancapistao3 жыл бұрын
2021 almost 2022 and this is how you still want to do it. Thank you very much, I spent my whole day angry as fuck because I simple did not knew how to do it.
@sitaramgangode9124 жыл бұрын
I have used switch case in Recyclerview to open new activities. When items are not filtered it works perfectly. But when it is filtered wrong activity is opened. I think it happens because filtered items take upper position. It happens due to it. I don't know how to come over it. Please guide about it.
@mafiacodes4 жыл бұрын
Watch my video on search filter and see if that helps kzbin.info/www/bejne/eYXZq6KMqbCigJo
@tothepoint15602 жыл бұрын
Same problems i am facing.
@anandmayeemaity71233 жыл бұрын
for passing interface in fragment "this " is not working , how can i pass interface in fragment like you did in Activity??
@mafiacodes3 жыл бұрын
basically this represent the activity, so you can pass in your fragments context for "this"
@ANKITKUMAR-ed9qj4 жыл бұрын
I finally understand it, thanks alot can you make a video about how i can manage my layout for different screen sizes and how to design it?🙏🙏
@helenh24424 жыл бұрын
what is getApaterposition?? I can't see all code of adapter class
@zubaer213 жыл бұрын
Brother how can i implement recyclerview on click textview text change. Suppose a recyclerview has a 3 textview. I want when i click on whole view one textview show "P" and background color will be green. Another click will be background red and text A. Thank you Please help bro.
@AbhinavBhaartiya3 жыл бұрын
It is not working in fragment... Onclick Interface pass error in fragment
@67Diadem3 жыл бұрын
Great tutorial. But I have a question. Can we do that if we click on any movie title and should open a new activity that display the description of that particular movie. For example if I click black panther then it should display the details of black panther and if we click on Iron man then it should display the iron man description. If yes then can you help me? I need it ASAP please
@mafiacodes3 жыл бұрын
simply start the new activity
@67Diadem3 жыл бұрын
@@mafiacodes thanks a lot for the help... I have one more question that I'am making an app on story, that will show list of story in the list view with the help of API using volley library and recycler view. I also want to implement visitors or views count, meaning whenever a user click on a particular list then it will increment the view by one. For that visitors increment count I have extra API, but I'am confused that where to use that API as post method in adapter class? or in main activity class... Can you help me with this...?
@Sukhendusadhukhan4 жыл бұрын
You are really great. Thank you so much. I wanted this for a long time. I didn't know this method I was searching for this method from long on the Internet but couldn't find better implementation. Once again thank you.
@syedshoaib31004 жыл бұрын
What if we use firebase recycler adapter where we have to initialize interface, in firebaseRecyclerAdapter method above on BindView???
@mafiacodes4 жыл бұрын
the same way as its described here,,,
@dagher.a2474 жыл бұрын
If you can tell me, how can I use this way for a recyclerview inside another recyclerview,
@mafiacodes4 жыл бұрын
Implement interface in recycler adapter for child recycler adapter or in main activity or fragment implement the interface
@noobplayer89754 жыл бұрын
how to get details data and send into fragment class
@المبتسمدائما-ن4غ2 жыл бұрын
Thank uu. Do you do freelancing??
@mafiacodes2 жыл бұрын
Yes you can contact me on yourstruly2607@gmail.com
@ritikaans3 жыл бұрын
Finally, Today I got to know how it works ... Many thanks
@mediahafalan63054 жыл бұрын
Bro.. can you guide me how to solve my issue.. i stack for 2 day... i have class and method for animate flipcard in myActivity its call. FlipView.flipTheView(); and i want to use this class in my recycleView. if i write code like your video Its work perfectly but its call by manually clicking.. in my case iwant to call this method using another triger not by clicking.. how can i do something like that?
@yutaitadori73183 жыл бұрын
Aapne kaha se sikha h android development?
@mafiacodes3 жыл бұрын
Android docs and other stuff on youtube
@yutaitadori73183 жыл бұрын
@@mafiacodes please share some resources
@yutaitadori73183 жыл бұрын
@@mafiacodes reading docs takes much efforts then too after hours of researching I don't find the relevant stuff and if I found that then I don't understand how's that working . Please help 🙏
@awaiz36494 жыл бұрын
Hey,In item view onclicklistner it is showing me Nonstatic method cannot be referenced from a static context..please help.. Cardonclick.OncardClick(getAdapterpostion()); Here Iam getting problem .OncardClick is showing error as Non static method cant be referenced from static context..
@mafiacodes4 жыл бұрын
Share code on GitHub
@awaiz36494 жыл бұрын
@@mafiacodes solved it bro thanks for reply...❤
@miguelnuno9282 жыл бұрын
Thank so much for this video.
@bug97023 жыл бұрын
Hello ,Thank you for your knowledge also I have a quesiton I'm asking to understand why we didn't define onClickte directly inside the viewholder
@mafiacodes3 жыл бұрын
What if u want to access or do something from activity or fragment? That is why.
@bug97023 жыл бұрын
@@mafiacodes thank you for answering
@mukeshroy38582 жыл бұрын
great explanation sir... thanks a lot
@asifiqbal12615 жыл бұрын
Sir, which theme r u using? seems nice.
@mafiacodes5 жыл бұрын
Like the video then i’ll tell 😉 . . It is google developers theme
@asifiqbal12615 жыл бұрын
@@mafiacodes Thanks Sir :)
@pronavsandhu4 жыл бұрын
thank you, buti don't know what i am doing wrong its not working for me, i have recyclerview with grid layout manager in a fragment .
@mafiacodes4 жыл бұрын
Share the code on GitHub
@ryanben39884 жыл бұрын
Do not pass 'this' as a parameter , instead pass the .this , just from having the same problem. i.e. homeQuestionsRecyclerViewAdapter adapter = new homeQuestionsRecyclerViewAdapter(tempSearchQuestionArray, getActivity(), homeFragment.this);
@pronavsandhu4 жыл бұрын
@@ryanben3988 legend !! Thank you Gonna try this
@hocineguebbas40164 жыл бұрын
waww. very simple and straight forward. thank you sir.
@mandalsalman4 жыл бұрын
Thank you bro. Quite easy to understand.
@flyingDude5 жыл бұрын
Please make video for multiple image picker
@mafiacodes5 жыл бұрын
will try to do that bro...till then SUBSCRIBE LIKE SHARE 😉
@venkatm63245 жыл бұрын
onclick method open new page (other click same page open but only change data)
@mafiacodes5 жыл бұрын
I dint get what you wanna know? Please elaborate
@ananaspowa58945 жыл бұрын
@@mafiacodes probably he intended starting a new activity, using only one not one for each item, and changing the data shown depending on what item you clicked on, not sure though... ( I could find it very useful too, but I think it's a bit complex)
@ClintonSiegel4 жыл бұрын
Thank you very much! This was super helpful and so well done! Greatly appreciated!
@mafiacodes4 жыл бұрын
Glad u like it
@akhano21423 жыл бұрын
this tutorial help me alot thank you bro.
@MrAziz51523 жыл бұрын
please use the dark mode for code window. BTW your tutorial are really helpful.
@ranggasuryaprayoga59973 жыл бұрын
Thank you very much sir
@Anshukumar-pd8ur3 жыл бұрын
Great job bro
@mafiacodes3 жыл бұрын
Subscribe like share
@kanhaiyatulsyan75603 жыл бұрын
great explanation....but it would have been so easy if google themselves have provided an easy way to do it...!!!!
@noorullah59464 жыл бұрын
Thanks a million bro...its helped me But what if we want to implement clickListener on a single view in recyclerView item (e.g. delete button or favorite button on the recyclerView item)...any help will be appreciated
@mafiacodes4 жыл бұрын
Call the interface method from that onclick view
@handsomeman50984 жыл бұрын
very detail dan it works. thank you
@sleepydev47004 жыл бұрын
Its such a great explanation. But, could you explain why do we need an interface instead of making a method(e.g. handleItemClick(int position) ) in MainActivity for handling item click, then creating instance of MainActivity in the Adapter. It would be mainActiviy.handleItemClick(position)
@mafiacodes4 жыл бұрын
Perfectly wrong 😑, it wud unnecessarily create a memory overhead, and most likely it won’t work as u will have multiple instances of the same activity
@7days2805 жыл бұрын
sir my recycler view is not updating plz help even after trying the notifyItemRemoved
@mafiacodes5 жыл бұрын
Share code on GitHub
@jain783434 жыл бұрын
Nice clear Explanation. Thank You :)
@vamsi18715 жыл бұрын
Sir i need how to save images in blob in room db
@mafiacodes5 жыл бұрын
You can create a column for blob and then can store bytes in that column, the video will come when i start room db somewhr in 4/6days
@ankitdhopate53604 жыл бұрын
Really explained well bro...!!!!!
@chiquito.y.panzon4 жыл бұрын
Nice implementation, thanks you
@saranshagarwal25005 жыл бұрын
Boss Please Make Video on How to open the fragment. when we click on the item of recyclerview.
@captnrango60294 жыл бұрын
Very Good way to explain
@dhfhf67764 жыл бұрын
Sir, please help...OnItemClick successfully worked. But OOnLongClick not working. When I long clicked on an item then the app crashed... here is logcat result : java.lang.NullPointerException: Attempt to invoke interface method 'void com.example.recyclerviewpractice.ROnClickInterface.OnLongItemClick(int)' on a null object reference at com.example.recyclerviewpractice.MyViewHolder$2.onLongClick(MyViewHolder.java:26) Here is the interface: public interface ROnClickInterface { void OnItemClick(int position); void OnLongItemClick(int position); } here is ViewHolder code: itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { rOnClickInterface.OnItemClick(getAdapterPosition()); } }); itemView.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { rOnClickInterface.OnLongItemClick(getAdapterPosition()); return true; } }); here is action: @Override public void OnItemClick(int position) { Toast.makeText(this, cityNames.get(position), Toast.LENGTH_SHORT).show(); } @Override public void OnLongItemClick(int position) { cityNames.remove(position); myAdapter.notifyItemRemoved(position); }
@internetuser66022 жыл бұрын
THANKS SO MUCH. YOU SAVE ME
@prathiv52034 жыл бұрын
super bro plz upload many things from android studio
@mafiacodes4 жыл бұрын
Watch the entire playlist there’s much more
@venkatsai56311 ай бұрын
this help alot bro
@deepamitchaudhary4 жыл бұрын
Please Please Please help Hi Sir, Actually, I have two apps in a single project, 1st is a customer app and 2nd one is company app, both apps share the same firebase database. And both the apps are identical in terms of login and registration, When started writing code for the 2nd app, that time I copied 1st project and modified all the activities(android java code) as per my needs. The issue I am facing is when customers register in the customer app and then the same login credentials are being used to login in company app without registering to it or vice-versa. I don't understand why this is happening. I saw one thing that for both the project SHA-1 key is the same after generating from the android studio. I want to restrict login to without registering to it for both the apps, the one should be able to login in the app in which he/she has registered, not in 2nd app where he/she haven't registered, Kindly help me so that I can move forward with my development. Thanks & Regards, Amit Chaudhary
@mafiacodes4 жыл бұрын
since ur using the same firebase project for authentication, so u cannot protect it, the user can log in with any app, since its using the same firebase auth database...
@jonilsoncoelho89302 жыл бұрын
Thank you so much!
@RashiRitu103 жыл бұрын
Thank you so much
@mafiacodes3 жыл бұрын
You're most welcome subscribe like share
@aneeshahamed24904 жыл бұрын
thanks bro🙏
@retlawam014 жыл бұрын
No sabes cuanto tiempo he buscado hacer esto
@mafiacodes4 жыл бұрын
me alegro de que te haya gustado, suscríbete como compartir
@nelsonmunthe45714 жыл бұрын
I'm from indonesia thanks for sharing. Can you make the sub title?
@mafiacodes4 жыл бұрын
U. An turn on subtitles from KZbin settings. I guess that would work.
@nelsonmunthe45714 жыл бұрын
Still same bro, subtitle still nothing
@elpirato54284 жыл бұрын
muchas gracias!
@marcodeheza59814 жыл бұрын
Thank! Is working OK
@4dn9074 жыл бұрын
Osm Bro, plz change your android s theme
@sepa12343 жыл бұрын
tnks
@mafiacodes3 жыл бұрын
subscribe like share
@umerqaisar60154 жыл бұрын
shukria
@ahsansyed41465 жыл бұрын
thanks buddy :)
@mafiacodes5 жыл бұрын
Subscribe like share 😊
@ahsansyed41465 жыл бұрын
@@mafiacodes i have a question bro. how can I open specific fragment/activity on a specific position and where I need to code in Adapter or fragment/activity? and how ?
@mafiacodes5 жыл бұрын
You can open it from both places, but the proper way is to open from activity or fragment in which this recycler view resides and that was the whole purpose of this video.
@jigneshraval68804 жыл бұрын
nice sir
@mafiacodes4 жыл бұрын
Subscribe like share
@moazelsawaf20005 жыл бұрын
Thanks a lot sir
@mafiacodes5 жыл бұрын
Subscribe like share 😊
@omkeshwani13444 жыл бұрын
Sir give me your address I will come to your place and give you a huge gift with lots of thanks I can't express my happiness I was struggling with this from past 7hours I haven't watched any other video of yours still subscribed 🙂🙂🙂🙂😊😃