Android tutorial (2018) - 14 - Fragment to Fragment Communication

preview_player
Показать описание
In this video we are going to learn about how to establish communication between two fragments.

It is not possible for two fragments to directly communicate each other. Two fragments can communicate each other through interfaces.

Рекомендации по теме
Комментарии
Автор

You are best of the best android teacher. Thank you very much. I have been researched all internet for solve this problem and I found

МаксимПашківський
Автор

Very useful example. Just one recommendation:
Bundle bundle = getArguments();
if (bundle != null) {
String new_message= bundle.getString("message", "");
textView.setText(message);
}

biyopist
Автор

Finally, something recent. All other videos on this subject (2017 especially) use deprecated methods.

bobbyblack
Автор

Thank you very much. Everything worked great. The only thing I would suggest is a bit more explanation on some things like how the bundle and fragmentmanager works, but overall great video :)

marcuscollin
Автор

God bless you dear, you are doing a great job. We learn a lot from you ... 👍💐

RandomZindagi
Автор

Hey man, you are just like Gods favor sent to me from Heaven. Your solution pulled me out from the stack just 30 mins before assignment submission! Let God bless your work!

КостяПак-яя
Автор

a really helpful tutorial, great explanation, thank u, keep up with the amazing work

coamanxoi
Автор

Hello,
I have a fragment(1) that gets data from firebase. I wanted when click on the button of fragment(1) that it passes some data to fragment(2). Do you have an example? this one doesn't fit the case because it goes through MainActivity.

Thanks

espectactorteatro
Автор

Thank you Sir, you are very kind to deploy these awesome tutorials.

jlestua
Автор

Your videos are great sir for fresher's like me ....Thank you

NJTechIndia
Автор

Thank you for the videos im following along each one, im coming from a c# background

BrightonSpeciminHunter
Автор

Your videos are great sir nice series for fresher's like me and please continue using constraint layout only sir ....Thank you

TRK
Автор

prabeesh sir.. your videos are amazing as always..
please make videos on MVP approach also.. its new approach and and want to learn it now a days.. thank u

ahsanishaq
Автор

Thank you very much for these videos. You're a blessed man!
I hope you can keep up this great job.

By the way, I would like to know if I wanted to pass more data from one fragment to another, how can I do that?
I mean, from the example you gave we can pass a single value but what if I want to pass a lot o data to another fragment, as an object-like data, how do I do this?

Thanks again man. I am already a fan of yours. ^ ^

tonsantos
Автор

What is the use of Bundle? And why can't we use normal data(string) passing methods as we did in the previous tutorial?

satyabratasahoo
Автор

Thank you for the video. It is very helpful.

andredicioccio
Автор

while passing the string from fragment to main activity...instead of working with "interface"..cant we have a public method in main activity "msg_read" which can be called from fragment?

priyatamsai
Автор

can you do somthing like communication between two dialogfragments

anandkumar-jegh
Автор

Sir, i would like to request you to make a video on how facebook login button can be used to send the user profile details to a new activity and display. In your video you showed us how to do it in the sane activity, but i want you to do it two different activity like a login activity and a welcome activity.

theindianinvestor
Автор

how change the the tab on button click and also share data when click the button

mayurrokade