At about @8:33 when he starts typing out "view.textField1" that's because he has applied the "kotlin-android-extensions" plugin in the app's build.gradle. Looks like a Kotlin plugin that creates extension functions for Views so you dont have to "findViewById()" all of the time. I'm not sure if that was already covered in a previous video of yours, but maybe adding that to the description, or something, could eliminate a little bit of confusion :D Thanks for the video
Man, I saw 2 official videos already and still didn't get what it is. Your video finally triggered my mind. I think the visual aid in your video helps a lot.
great videos !!, Please make video about handling the backstack, its so difficult for me.., this is my cases, here the flow of navigation graph : 1. A-B-C 2. D-B-F The question is, how the B fragment knows, which fragment that called them, from A or D, i mean how to handle onBackpress, im glad if u have the solution, thanks dude!
I just subscribed your channel because I've been searching for difference between data binding and view binding and I found yours useful. So I liked this video before I start it ❤️❤️❤️❤️❤️
Sir, if you don't mind, can I ask you something? Let say an app needs 3-4 different user logins (teacher, students, etc). How would you approach this issue, sir? Thank you so much
Hi sir.. I downloaded Android Studio 3.6.1. But I found a problem, there is no support repository in SDK tools! Besides, there is no android drawable importer in the Plugins. I hope you tell me about the cause and how to overcome this problem. I googled the issues and search many videos in UA-cam but that was useless. Thanks
Good day @ Stevdza-San. The line " view.textView.setOnClickListener {Navigation.findNavController(view).navigate(R.id.navigate_to_secondfragment)}" is not referencing or calling the "textView" id from the first fragment. Instead android studio is showing Unresolved reference:textView :( the same error happens too in the second fragment with the second fragments id(textView2) :(
at 8:34, view.textView1.setOnClickListener is giving me an error. I cannot access the textView object from view. What should I do? Do I have to configure something in the build.gradle file?
@@StevdzaSan Thank you. I have configured viewBinding to true in my build.gradle file. what I know is I should create a lateint val binding, and use that binding object to call all my views with IDs. however, you have not declared any binding object in your FirstFragment.kt file. How are you calling it from a view object? Or first do I have to change something in my MainActivity.kt file, and then does FirstFragment.kt import my binding object from MainActivity.kt?
I can't figure out how to do this with fabs. I'm working across fragments and activities. Using the fab to navigate between activities, can't find any examples of this though
I am getting error in the line : view.button1.setOnClickListener{Navigation.findNavController(view).navigate(R.id.navigateToFirstFragment)} Error : unresolved reference : Navigation
how can you change the fragment from the activity, I ask because I want one specific fragment to show some settings when the user select a settings menu?
Hey! Great videos! I was wondering if there will be a tutorial on how to navigate from a single fragment using numerous buttons which lead to more than one other fragment. like 1 fragment leads to 2+ others.
Are you looking to inflate 2 fragments simultaneously side by side? If that is the case then try to make a fragment with 2 child fragments(which you want to inflate) and make the parent fragment in the nav graph!
You just speak what's going on, That is a hard to understand. it would be really great if you can add what is the intent and how in each step we can achieve it. Thank you
The following options can be used as viable work arounds: 1. Retrieve the navController directly from the NavHostFragment. val navHostFragment = supportFragmentManager.findFragmentById(R.id.my_nav_host_fragment) as NavHostFragment val navController = navHostFragment.navController 2. Post the call to the findNavController method on a handler and execute all actions that need it after that post is complete. 3. Continue to use the fragment tag () to inflate the NavHostFragment issuetracker.google.com/issues/142847973
At about @8:33 when he starts typing out "view.textField1" that's because he has applied the "kotlin-android-extensions" plugin in the app's build.gradle. Looks like a Kotlin plugin that creates extension functions for Views so you dont have to "findViewById()" all of the time.
I'm not sure if that was already covered in a previous video of yours, but maybe adding that to the description, or something, could eliminate a little bit of confusion :D Thanks for the video
YOU just SAVE MY LIFEE, thanks man.
thanks
thx. you help me a lot.
@@user-lq1te8xn5f Also the java code for the:
View view = inflater.inflate(R.layout.fragment_second, container, false);
TextView textView = view.findViewById(R.id.textView2);
textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Navigation.findNavController(view).navigate(R.id.action_secondFragment_to_firstFragment);
}
});
return view;
Man, I saw 2 official videos already and still didn't get what it is. Your video finally triggered my mind. I think the visual aid in your video helps a lot.
I am doing a google course for the same topic and yours is heaps better! Thanks for this! Life saver
same i was doing from udacity
same here... despite being the maker of it they couldn't explain it 😢
yeah, easy to understand and better than Android official team documentary video
add this in gradle(module) dependencies:
apply plugin : "kotlin-android"
apply plugin : "kotlin-android-extensions"
Падажжи. Зависимости нужные в градл сами цепляются, нужно только разрешить? А мы копировали из техдокументации - карго да.
i have read severals books, they couldnt explain simpler like you. i get so well now
Glad to hear that!
great videos !!,
Please make video about handling the backstack, its so difficult for me..,
this is my cases, here the flow of navigation graph :
1. A-B-C
2. D-B-F
The question is, how the B fragment knows, which fragment that called them, from A or D, i mean how to handle onBackpress,
im glad if u have the solution, thanks dude!
Machaa Allah machaa Allah machaa Allah, Allah yberek fik doctora! Et bravo Mr le journaliste pour cette belle émission et votre compétence, Merciii
Could you also please add the java code to your description. That really helped in your last video. Thank you for these amazing tutorials!!!
The clearest and best tutorials on the internet! Man
Thanks! 💜
Своих всегда можно узнать по акценту.
жаль что не по "нашему" этот наш "свой" рассказывает
он поляк
@@denzmc серб
The best explanation I've ever seen
you just made my day! thank you so much for this
i love you
when we navigate to another fragment ، the data in fragment is lost , what we can do ?
Fantastic video!! This is even better than the official docs and tutorial!! Respect
I have a doubt that if I press back button when I was in first fragment it move to second fragment instead back button has to pause the activity
Good simple introduction. Thank you!
I just subscribed your channel because I've been searching for difference between data binding and view binding and I found yours useful.
So I liked this video before I start it ❤️❤️❤️❤️❤️
Thank you 😊💜🙏
At last, I got it cleared from your video.. huge 👍 👍👍👍
simple and fun
I've created a navgraph but the "directions" class from Fragment 1 to Fragment 2 doesn't generate automatically. What could be wrong?
Thank you soo much man....please make these types of video more as it is very helpful for us.
Sir, if you don't mind, can I ask you something? Let say an app needs 3-4 different user logins (teacher, students, etc). How would you approach this issue, sir? Thank you so much
Hi sir.. I downloaded Android Studio 3.6.1. But I found a problem, there is no support repository in SDK tools! Besides, there is no android drawable importer in the Plugins. I hope you tell me about the cause and how to overcome this problem. I googled the issues and search many videos in UA-cam but that was useless. Thanks
Good day @
Stevdza-San. The line " view.textView.setOnClickListener {Navigation.findNavController(view).navigate(R.id.navigate_to_secondfragment)}" is not referencing or calling the "textView" id from the first fragment.
Instead android studio is showing Unresolved reference:textView :(
the same error happens too in the second fragment with the second fragments id(textView2) :(
Kotlinx.synthetic is now deprecated, migrate to View Binding instead. I've made a video about it: ua-cam.com/video/MXZz438aCDM/v-deo.html
@@StevdzaSan Thank you 😖 I retried and watched the video multiple times, since I thought I was doing something wrong. Thanks a bunch
cute background music
Muito bom o vídeo, muito bem explicado. Sensacional.
Simple and Plain. Thank you.
Stevdza-San saving me once again
Anytime broah 🦸♂️🙌
You are the best❤️
How to open any fragment from any other activity not the host activity
Even though it was in Kotlin language, it has been useful to me. Thanks :).
Would be cool to have xml and design tabs open for those of us that prefer the xml
I love you man. Thanks for the video.
at 8:34, view.textView1.setOnClickListener is giving me an error. I cannot access the textView object from view. What should I do? Do I have to configure something in the build.gradle file?
View Binding
@@StevdzaSan Thank you. I have configured viewBinding to true in my build.gradle file.
what I know is I should create a lateint val binding, and use that binding object to call all my views with IDs.
however, you have not declared any binding object in your FirstFragment.kt file. How are you calling it from a view object? Or first do I have to change something in my MainActivity.kt file, and then does FirstFragment.kt import my binding object from MainActivity.kt?
@@BehruzbekOtayev Because now kotlinx.synthetic is deprecated.
@@StevdzaSan thank you. I will figure it out.
Thank you so much you made my dayyyyy
Happy to hear that 😁👊
Such a good video! You explained every important feature very well.
doesnt let me add the dependancies automatically :( just says it cant find them....
Terrific walkthrough, thanks!
Hello.. Great explanation..
Please Can you make video on searchview in recycler view..
Thankyou..
Love from India..
And you are great..
how to do the same with back button?
should the findNavController method be better called in the onViewCreated method?
I can't figure out how to do this with fabs. I'm working across fragments and activities. Using the fab to navigate between activities, can't find any examples of this though
Thank you so much for this amazing playlist 👌
Thanx man this was very helpful ☺️
Thanks a lot man, it really helped me 🙏
Can we navigate through multiple activities by using bottom navigation bar?
I have to put someting on my main activity?
Very amazing tutorial.
Very helpful.
Thanks
good content, easy way to make watcher understand how to do. Ty so much
Hi, but How to send data from one Fragment to another Fragment in this way?
how can we handle multiple navigation graphs in app ?
How to make those fragments take up status bar as well?
Really clear tutorial, thanks
Glad to help! 🙌
Make sure activity subclasses FragmentActivity 😮💨
Thx for the lesson. It was easy to understand
arigato stevdza san!!
onNavifationUp() is not working in Navigation Drawer Activity.
thank u so much
I try to do this with drawer and doesn't work, somebody knows something? :C
great video, tks very muchmuch
You're welcome 🙏
I am getting error in the line : view.button1.setOnClickListener{Navigation.findNavController(view).navigate(R.id.navigateToFirstFragment)}
Error :
unresolved reference : Navigation
best content
Great tutorial! Thank you!
Incredible explanation, thanks for this! :)
how can you change the fragment from the activity, I ask because I want one specific fragment to show some settings when the user select a settings menu?
how do you make this work with binding?
How to pass data between fragments in Navigation Components
Hey! Great videos! I was wondering if there will be a tutorial on how to navigate from a single fragment using numerous buttons which lead to more than one other fragment. like 1 fragment leads to 2+ others.
Are you looking to inflate 2 fragments simultaneously side by side? If that is the case then try to make a fragment with 2 child fragments(which you want to inflate) and make the parent fragment in the nav graph!
Hey ,I am not getting option of textView, like view.textView1 .I am not getting it!What should I do??
ua-cam.com/video/MXZz438aCDM/v-deo.html
Your Google Play Store link does not work... What happened?
Thank U For this great video.....
Great video, awesome thanks
You just speak what's going on, That is a hard to understand. it would be really great if you can add what is the intent and how in each step we can achieve it. Thank you
Amazing video !
Excelente vídeo! Ajudou muito!
why my 1 activity is not showing
Interesting topic , is it new feature in the latest upd?
That's correct
@@StevdzaSan thank you for covering it
great Work
🤩💙
Thanks! 🙌
My app display the content of activity_main.xml instead of the first fragment XML.
How do I change it?
ok I forgot the NavHostFragment in the activity_main.xml.
I am actually new to Android dev, I have a question. When to use a activity and when to use a fragment??? Thanks in advance 👍👍(anyone can ans)
These days you would use multiple fragments and single activity only.
sr sir, can u help me with saving state fragment when navigating between fragment in Navigation component
I will create a tutorial about that in the future.
@@StevdzaSan thanks sir
I love you
great
Keep up the great vids 👍
This is pretty confusing, Android studio is a nightmare lol
would be nice if half this stuff actually worked lol
Неплохо
Can you please don't speed up your video.
The following options can be used as viable work arounds:
1. Retrieve the navController directly from the NavHostFragment.
val navHostFragment = supportFragmentManager.findFragmentById(R.id.my_nav_host_fragment) as NavHostFragment
val navController = navHostFragment.navController
2. Post the call to the findNavController method on a handler and execute all actions that need it after that post is complete.
3. Continue to use the fragment tag () to inflate the NavHostFragment
issuetracker.google.com/issues/142847973