Communicating Back from RecyclerView Adapter to Activity or Fragment

  Рет қаралды 21,188

Mohamed Shehab

Mohamed Shehab

Күн бұрын

Пікірлер: 39
@candrasniper3404
@candrasniper3404 Жыл бұрын
Thanks, this trick with interface works on fragment too, smoothly. My app becomes no crash anymore. Thanks a lot for sharing this. Easy and simple.
@dr.shehab
@dr.shehab Жыл бұрын
All the best
@clarayunanti240
@clarayunanti240 2 жыл бұрын
Thank you very much sir. I use Activity, 2 Fragments, and 2 Adapters. I can understand listeners with just a few minutes of watching your video. My problem since 5 days ago is solved now!
@dr.shehab
@dr.shehab 2 жыл бұрын
Excellent! All the best.
@mikaellucas2174
@mikaellucas2174 2 жыл бұрын
Simple and straightforward. Very good, thanks.
@dr.shehab
@dr.shehab 2 жыл бұрын
Thank you.
@andriibibik39
@andriibibik39 Жыл бұрын
Very clear. I think you are a good programmer ;)
@dr.shehab
@dr.shehab Жыл бұрын
Glad you think so! I try :)
@aliyoussef3271
@aliyoussef3271 2 жыл бұрын
عاش يصحبي
@seyyedmahdihosseini4395
@seyyedmahdihosseini4395 3 жыл бұрын
you really help me to understand the procedure of interface listener, thanks a bunch man
@dr.shehab
@dr.shehab 2 жыл бұрын
Welcome.
@rishabhsingh7106
@rishabhsingh7106 3 жыл бұрын
You are a lifesaver man
@dr.shehab
@dr.shehab 3 жыл бұрын
Thank you
@dev3269
@dev3269 4 жыл бұрын
Sir thank you so much, because of this video my error was solved which I am trying to solve from a week
@dr.shehab
@dr.shehab 4 жыл бұрын
All the best.
@tahielgomez
@tahielgomez Жыл бұрын
really helpfull, thanks
@dr.shehab
@dr.shehab 7 ай бұрын
Thank you and let me know if you have any questions.
@MajorKs7
@MajorKs7 Жыл бұрын
Thank you very much great video
@dr.shehab
@dr.shehab Жыл бұрын
You are very welcome
@Bohdan-d7m
@Bohdan-d7m 3 жыл бұрын
Супер, очень полезная информация! Спасибо!
@dr.shehab
@dr.shehab 3 жыл бұрын
I had to translate it :) you are welcome.
@yildiz.mehmetemin
@yildiz.mehmetemin 3 жыл бұрын
Dear Mohamed, thank you :D
@dr.shehab
@dr.shehab 2 жыл бұрын
You are very welcome
@adanpacheco4185
@adanpacheco4185 3 жыл бұрын
VERY HELPFUL thanks a lot.
@dr.shehab
@dr.shehab 3 жыл бұрын
Glad it was helpful!
@guidobertelli7337
@guidobertelli7337 2 жыл бұрын
What if I want to change something within the same activity? For example I want to Glide an Image or set a TextView view in the principal activity by clicking on one Item of the RecView. In your example it would be like setting a Text down the recView with the name of the currently selected user and it changes text every time you click on a different Item. Thanks in advance for your attention and I will be happy to clarify the question if needed.
@guidobertelli7337
@guidobertelli7337 2 жыл бұрын
I solved it by using an Interface and passing an intent with the data needed
@sahilprajapati6195
@sahilprajapati6195 2 жыл бұрын
Hello,i have made new activity just like you have created but how to copy content from previous activity to new activity that we have created
@dr.shehab
@dr.shehab Жыл бұрын
You have to send the content in an intent as extras.
@tknv
@tknv 3 жыл бұрын
Thanks, it was very helpful. If have a complete code link like an at Github, it would be perfect.
@dr.shehab
@dr.shehab 2 жыл бұрын
Will work on that soon.
@fernandodelgado9278
@fernandodelgado9278 3 жыл бұрын
Excelent work, thanks for share!!!
@dr.shehab
@dr.shehab 3 жыл бұрын
Many thanks!
@palakshravagi5518
@palakshravagi5518 3 жыл бұрын
how can we redirect from onclicklistener event on any element in adapter class to fragment
@ganeshgogate6235
@ganeshgogate6235 3 жыл бұрын
How to send onpause event to the viewholder from mainactivity
@dr.shehab
@dr.shehab 3 жыл бұрын
Can you please elaborate a bit ?
@desnshanji2615
@desnshanji2615 4 жыл бұрын
Hello sir supposed the recyclcerview was inside a fragment and you want to set an onclick listener to open a new fragment How do you proceed?
@dr.shehab
@dr.shehab 4 жыл бұрын
You can use the interface to communicate with the outside hosting activity which can trigger the communication with the new fragment.
@desnshanji2615
@desnshanji2615 4 жыл бұрын
@@dr.shehab Thank you so much sir. Your video helped me to figure it out. I am implementing a chipnavigation bar with fragments. and I will like that when on click of a recyclerview in one of the fragments it also changes the selected item on the chipnavigation. Is it possible?
Introduction to HTTP
6:31
Mohamed Shehab
Рет қаралды 1,2 М.
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 275 #shorts
00:29
amazing#devil #lilith #funny #shorts
00:15
Devil Lilith
Рет қаралды 18 МЛН
Каха и лужа  #непосредственнокаха
00:15
Человек паук уже не тот
00:32
Miracle
Рет қаралды 3,6 МЛН
RecyclerView Item Click | Best Practice Way
8:06
Practical Coding
Рет қаралды 96 М.
Adding Buttons in RecyclerView Row Items
4:29
Mohamed Shehab
Рет қаралды 36 М.
RecyclerView OnClickListener (Best practice way)
11:48
CodingWithMitch
Рет қаралды 292 М.
Pass data between destinations by Navigation Component
17:17
Android Geek
Рет қаралды 8 М.
pass data from one fragment to another fragment in android
15:58
Knowledge Extension
Рет қаралды 10 М.
Removing Item from RecyclerView with OnLongClickListener
4:31
Practical Coding
Рет қаралды 20 М.
RecyclerView item Click using Interface | Advanced Way | Android
7:01
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 275 #shorts
00:29