Тёмный

RecyclerView Item Click | Best Practice Way 

Practical Coding
Подписаться 11 тыс.
Просмотров 95 тыс.
50% 1

Опубликовано:

 

13 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 106   
@Krankschwester
@Krankschwester 2 года назад
Finally someone who explains it properly and doesn't create 15 classes and interfaces for a click listener... Thanks😁
@Sydewinder890
@Sydewinder890 2 года назад
Still a better explanation than my pre-recorded lecture that we have been using since 4 years ago
@fctvlthq
@fctvlthq Год назад
Thank you! When stackoverflow doesnt help or only offers deprecated information... RU-vid helps! You are the best!
@rohitsinha1092
@rohitsinha1092 7 месяцев назад
thanks man saves a ton of hassle and works like a charm truly helpful
@rydzu98
@rydzu98 5 месяцев назад
thx bro, finally someone who can it simply explain
@rungxanh2901
@rungxanh2901 Год назад
Thank you very much man! Efficient and easy to understand!
@edgaralexis9738
@edgaralexis9738 2 года назад
Excelent Explanation!!! Thank you so much. You're brilliant
@dimalag07
@dimalag07 Год назад
pure gold! Thank you
@pavolmotyl3232
@pavolmotyl3232 2 года назад
Man, great video! Helped me so much. Thanks
@evangelistar
@evangelistar 9 месяцев назад
Great video! Easy to understand. Thank you!
@burakpmk
@burakpmk 2 года назад
Thank u so much This video very help me with my university project
@PracticalCoding
@PracticalCoding 2 года назад
That's great to hear!
@andresmonagas7662
@andresmonagas7662 2 года назад
Man, you make such good content!
@AryanSingh-zv5ch
@AryanSingh-zv5ch Год назад
Thanks man first video that really helped
@stillpickinganame5350
@stillpickinganame5350 11 месяцев назад
Great video as always!! Thank you man❤
@Anushkai1
@Anushkai1 3 месяца назад
Thank You. Good Explanation
@SwainerGamer
@SwainerGamer 9 месяцев назад
You have helped me immensely thank you very much!
@mastertareas
@mastertareas 2 года назад
gracias crack me sirvio mucho. Saludos desde Colombia
@mohammedel6420
@mohammedel6420 2 года назад
good content i understand the concept even don't work for me, but realy understand a lot
@dasahead33
@dasahead33 2 года назад
Great explanation. Worked for me
@TarunTejaGurajada
@TarunTejaGurajada Год назад
Thank you for helping me.
@arpitagupta5834
@arpitagupta5834 Год назад
Really Good! Keep making more such videos..
@SimranKaur-fc4hn
@SimranKaur-fc4hn 2 года назад
You've made it quite easy......
@illidan1400
@illidan1400 11 месяцев назад
this is special, thanks a ton
@fouadsaid5093
@fouadsaid5093 2 года назад
you are a legend bro !
@bokzruales4056
@bokzruales4056 2 года назад
Where did you put the description of each elements? In another xml file? Sorry I'm still learning mobile dev.
@Srimath
@Srimath 2 года назад
Hey if it's on firebase it will be the best
@haidarjpr8754
@haidarjpr8754 Год назад
Thanks bro, its help me a lot
@pragyanshreedas23594
@pragyanshreedas23594 2 года назад
please keep posting you are doing greate job and deserve more likes as you explain really well
@ali_x1917
@ali_x1917 2 года назад
🔥Great video but I use a Fragment instead of Activity and when i pass the parameter "recyclerView Interface" as "this" show as error What do you think? or what is the alternative of this in Fragment Situation
@sleepall4025
@sleepall4025 2 года назад
If your using kotlin then you could add activity instead of this or getActivity().
@haidarjoo9055
@haidarjoo9055 8 месяцев назад
thanks a lot sir 😁
@RandyTata-zy2qg
@RandyTata-zy2qg Год назад
I like your video. They are very good and easy to understand. Please can you do a video on a PDF app. That an app that has PDF and when you click on it you can see the contain of the pdf
@williamgomez6226
@williamgomez6226 2 года назад
Quality videos, thank you so much. Are you using an API to retrieve the molecules data? Can you show us how to do that? Thank you again!!
@PracticalCoding
@PracticalCoding 2 года назад
Actually, I'm not using an API. I got the descriptions from the internet and the names/abbreviations from my biochem book. The vector images of the molecules were made in Adobe Illustrator. I'm gonna be using them in an app I'm working on so probably won't be releasing them😬 Thought it would be cool to use them rather than the default vectors that come with Android Studio. Little different than what everyone else is doing on RU-vid and it's more of a real-world example I think.
@surajbaranwal56.
@surajbaranwal56. 2 года назад
Nice explanation 👍
@TimesShortVideoChannel
@TimesShortVideoChannel 2 года назад
nice sir, I salute you
@dashcode2892
@dashcode2892 2 года назад
Muy bueno, me sirivio!. Crack
@mobiledevloperroadtopro
@mobiledevloperroadtopro Год назад
Perfect Job
@brayammatias4832
@brayammatias4832 Год назад
Eres la mera vrga mijo, muchas gracias
@TTiTTiMaN
@TTiTTiMaN Год назад
helped me so much
@user-ji4nk8wd5o
@user-ji4nk8wd5o 4 месяца назад
Can you create a video on how you create a button in an item? Please and thank you
@nickynault812
@nickynault812 Год назад
I am so confused on the very last part where you're putting all the different pages' info on one activity... any way you could go more in depth with me? Struggling for school :(
@christianvillanueva723
@christianvillanueva723 Год назад
Thank you
@yakupakdas6028
@yakupakdas6028 2 года назад
thx it's too helpful
@yunoletmehaveaname
@yunoletmehaveaname Год назад
Do you have a way to do this between fragments in an activity?
@olddirty4589
@olddirty4589 11 месяцев назад
is there a video for the the last thing u did? how to swap to a new activity?
@muztabarafid
@muztabarafid Год назад
Could you please add searching option in this app
@jmsanchez5631
@jmsanchez5631 Год назад
Where did you get the add method for your model class? You didn't even code it in the class itself
@mobiledevloperroadtopro
@mobiledevloperroadtopro Год назад
thanks bro u save me)))))))))))))))
@bestoftheinternet3421
@bestoftheinternet3421 2 года назад
thanks!
@schoellhorn
@schoellhorn 7 месяцев назад
6:36 what should I use, I couldnt understand it
@elgimcadiwitan6767
@elgimcadiwitan6767 Год назад
how to solve that get method u put in putextras? it says cant solve method?
@twu588
@twu588 Год назад
I put recyclerView on a dynamic layout container , layout.addView(), then "click" is "invoke interface on a null object reference", please help!
@adityarajsinhchauhan7151
@adityarajsinhchauhan7151 Год назад
I getting error in main acitivity adapter where tour error is gone by writing this my is not going and it is sating to create recyclerview interface then making it null
@dgomesreal
@dgomesreal 2 года назад
Is it possible to retrieve data from Firebase?
@unatteksen1884
@unatteksen1884 Год назад
ABİM ÇOK TAŞAKLISIN
@khawajahamdanahmad677
@khawajahamdanahmad677 2 года назад
I cant put this in parameter it is giving me red line in this in adapter parameter in out main activity what should I do
@The_Developer7
@The_Developer7 2 года назад
Bro please help In Android studio there is an error how to solve it ? APPT: error: resources drawable/xyz not found.
@jabseraseyfe2598
@jabseraseyfe2598 Год назад
How we add onclick listner
@ghadarashwan8687
@ghadarashwan8687 2 года назад
Please I need to know how to make the second activity
@musiclamat
@musiclamat 2 года назад
good
@capt.cacksparrow9224
@capt.cacksparrow9224 Год назад
How to open a pdf when clicked on a recycler view item?
@chuashanjing2261
@chuashanjing2261 2 года назад
How do i add a searchView in this recycler view?
@은혜-s8z
@은혜-s8z Год назад
hello what if i just want the selected item to show a toast message and not a new activity how do i do that
@jonispatented
@jonispatented Год назад
Just make a toast message in the click listener, instead of a new intent.
@jarell2805
@jarell2805 2 года назад
how to add the additional information for the next activity, Sir? please we need a tutorial 🥺
@Sydewinder890
@Sydewinder890 2 года назад
I just typed the code from the explanation and it works
@jarell2805
@jarell2805 2 года назад
@@Sydewinder890 it also worked on me, but can't quite follow how to put an extra description, i had my data stored in the string. did u add the additional textview in the adapter? kinda confusing
@abdulrahman-hr1cx
@abdulrahman-hr1cx 2 года назад
From where can i get these pictures?
@amrkeefa4966
@amrkeefa4966 2 года назад
Good work but does this way better than itemCallback ?
@PracticalCoding
@PracticalCoding 2 года назад
I'm not sure where I saw this on the Android Developers page but from what I understand, you're supposed to handle what happens in the onClickListener from your activity and use a callback implementation using an interface. So in the video, we passed the interface to our adaptor and from the adaptor, we were able to call the callback function when an item was clicked because we set an onClickListener to each of our itemViews. Did that answer your question? I'm not entirely sure what you mean by "itemCallback". Maybe we're talking about the same thing?
@OP-pv6un
@OP-pv6un Год назад
what if there is SEARCHVIEW??
@Ron_Baukanski
@Ron_Baukanski Год назад
Hey dude, is there any way to help?
@leemajelifa5489
@leemajelifa5489 Год назад
Hi sir, how to write code for fragment instead of activity?
@huutienang7600
@huutienang7600 Год назад
I doesn't find solution for that, so i only call setOnClick for the layout of item
@pragyanshreedas23594
@pragyanshreedas23594 2 года назад
I would like to ask how to do the same while using jet pack lib binding ?????????????????????????????????????????????????????????????????
@ratulmondal7154
@ratulmondal7154 Год назад
what about json object?
@user-tq3zn1wm1k
@user-tq3zn1wm1k Год назад
But don't forget to add in Manifest new Activity.
@febieclintlapera3788
@febieclintlapera3788 2 года назад
Anyone here who has an issue in clicking an item in the recyclerview twice to work the setOnlClickListener on the adaptter class?
@PracticalCoding
@PracticalCoding 2 года назад
What do you mean by clicking an item twice? I don't think I fully understand the question
@desairajveersinh5837
@desairajveersinh5837 6 месяцев назад
hi sir where are you frome
@medjl6083
@medjl6083 2 года назад
Recyclerview inside fragment, to display item in another fragment is not documented in google and it is not explain in youtube !!!!!!!!!
@emantahir338
@emantahir338 2 года назад
bro, may we get this project's source code ❣❣
@AgentsoloOG
@AgentsoloOG 2 года назад
did you find it
@mulleryeshambel7360
@mulleryeshambel7360 2 года назад
man please send me the source code i need it so urgently
@juliusgaldones5048
@juliusgaldones5048 2 года назад
why you skip coding?
@samirdesigner3324
@samirdesigner3324 2 года назад
thank you pls upload this code ):
@PracticalCoding
@PracticalCoding 2 года назад
I'll get on it!
@sameerahmad4746
@sameerahmad4746 Год назад
@@PracticalCoding did you upload it? i need it urgetly
@born-in-september
@born-in-september 2 года назад
i hate java interfaces, I prefer to use intent & broadcast methodology...
@shoaibalam7126
@shoaibalam7126 Год назад
time waste
@chugisan6847
@chugisan6847 2 года назад
You showed all the steps but didn't clarify the last ones. If you don't want others to be able to use what you teach, just don't post videos for views. And what is up with you showing such a zoomed-in portion of your code? It's very difficult to follow.
@zexer0_047
@zexer0_047 Год назад
Nice Video..Uh How do you do the same thing but with opening the information in a fragment instead of switching activty ?
@mihaelpurar6317
@mihaelpurar6317 Год назад
Can someone help me i do everything as in video but i still get this error "error: not an enclosing class: RecyclerViewInterface myAdapter = new MyAdapter(ItemView.this, userArrayList, RecyclerViewInterface.this);" I am not sure why i get this error, also my program has little bit more code for some other things and i dont know if something in there can cause this problem.
@pbdeveloperindian4578
@pbdeveloperindian4578 Год назад
At 5:53, you added this, but not working for me My code:- ElementsRecyclerAdapter elementsRecyclerAdapter = new ElementsRecyclerAdapter(elementsList, ElementsRecyclerActivity.this, this); Error:- 'ElementsRecyclerAdapter(java.util.ArrayList, android.content.Context, com.pbgamesandapps.pbchemx.ElementsRecyclerInterface)' in 'com.pbgamesandapps.pbchemx.ElementsRecyclerAdapter' cannot be applied to '(java.util.ArrayList, com.pbgamesandapps.pbchemx.ElementsRecyclerActivity, anonymous com.android.volley.Response.Listener)' My constructor for recycler view adapter :- public ElementsRecyclerAdapter(ArrayList elementsList, Context context, ElementsRecyclerInterface elementsRecyclerInterface) { this.elementsModels = elementsList; this.context = context; this.elementsRecyclerInterface = elementsRecyclerInterface; } Interface:- package com.pbgamesandapps.pbchemx; public interface ElementsRecyclerInterface { void onClick(int position); }
@israasalameh6879
@israasalameh6879 2 года назад
What if I'm fill the array by MVVM way ? I have tried your way, but the value always returns null in the next activity. I have fill the results array by call observe mntRequestViewModel.getMntAllReqMutableLiveData().observe(getViewLifecycleOwner(), new Observer() { @Override public void onChanged(List mntRequests) { if (mntRequests == null) { Toast.makeText(getActivity(), "failed to get all requests", Toast.LENGTH_LONG).show(); } else { //mntRequests is the array that I should use to get position in onItemClick ... allReqResultsAdapter.setResults(mntRequests); } } });
@platinumphonesandcomputers
@platinumphonesandcomputers 2 года назад
Thank you
@The_Developer7
@The_Developer7 2 года назад
Bro please help In Android studio there is an error how to solve it ? APPT: error: resources drawable/xyz not found.
@aidenfau3209
@aidenfau3209 Год назад
hi, i get error in int pos = getAdapterPosition();, its on red and nothings work
@Purpelxd
@Purpelxd Год назад
i got a simillar problem did you solve yours? when i want to write "intent.putExtra("NAME",ProductsModel.get(position).getname);"the .get is in red
@The_Developer7
@The_Developer7 2 года назад
Bro please help In Android studio there is an error how to solve it ? APPT: error: resources drawable/xyz not found.
@The_Developer7
@The_Developer7 2 года назад
Bro please help In Android studio there is an error how to solve it ? APPT: error: resources drawable/xyz not found.
@The_Developer7
@The_Developer7 2 года назад
Bro please help In Android studio there is an error how to solve it ? APPT: error: resources drawable/xyz not found.
Далее
RecyclerView | Everything You Need to Know
25:07
Просмотров 135 тыс.
ДЖЕФ  ЕЩЕ ПОМОГАЕТ!
09:37
Просмотров 480 тыс.
RecyclerView OnClickListener (Best practice way)
11:48
Просмотров 291 тыс.
Cursor Is Beating VS Code (...by forking it)
18:00
Просмотров 102 тыс.
RECYCLERVIEW - Android Fundamentals
24:58
Просмотров 103 тыс.
RecyclerView Item Click | Best Practice Way
6:49
Просмотров 8 тыс.
Recyclerview in android studio
35:06
Просмотров 97 тыс.