I love how your codes are clean and straight to the point!👏
@AndroidGeekCo2 жыл бұрын
Glad to hear that😀
@justeben2 жыл бұрын
Please would the nav drawer work if if I don't want the toolbar to be visible?
@AndroidGeekCo2 жыл бұрын
@@justeben you can use the Activity theme: Theme.NoTitleBar (with this code your action bar disapear) and your navigation drawer open with swipes a finger from the left edge of the activity.if you mean not this , pls let me know :)
@justeben2 жыл бұрын
It works but how to make the hamburger sign show is a challenge.
@AndroidGeekCo2 жыл бұрын
you can create custom action bar , and inside your custom action bar , you can put hamburger sign to control your drawer :)
@pagal_scientist Жыл бұрын
I was learning from old outdated videos and facing problems of depcrecation and errors. Found your channel and I am blessed
@AndroidGeekCo Жыл бұрын
Happy to help! 😊
@NimR9Sakura Жыл бұрын
if someone can't see the ActivityMainBinding, just add (dataBinding true) in (buildFeatures{})
@AndroidGeekCo Жыл бұрын
you can add viewbinding= true inside your buildFeatures body 👍
@NimR9Sakura Жыл бұрын
@@AndroidGeekCo well, i use both, one to create the navigator bar and de second to made the activity code
@dr.michaelscoutelis368 Жыл бұрын
A highly educational video and one of the most understandable and clear codes. ❤❤❤
@AndroidGeekCo Жыл бұрын
Really glad to hear that you like the video 😊🙏
@kin_1997 Жыл бұрын
Your explanations are very clean and easy to understand. Thank you so much for the content.
@AndroidGeekCo Жыл бұрын
You're very welcome! glad you like them 😊✨
@bodormarcel4373 Жыл бұрын
Same for me... and at least it works 😀 - Congratulations !
@AndroidGeekCo Жыл бұрын
Glad to hear! 🤩 Thanks 😊🙏
@tshediso11946 ай бұрын
your tutorial was amazing thank you very much it was a life saver😇
@AndroidGeekCo6 ай бұрын
Glad it helped! :)
@ladanirasekhi22662 жыл бұрын
Like always great reyhaneh😍✨
@AndroidGeekCo2 жыл бұрын
Thank you! 🤗
@divyayash5858 Жыл бұрын
Well explained and to the point.
@AndroidGeekCo Жыл бұрын
Thanks for your feedback 😊🙏
@arturoiniguezmejia1740 Жыл бұрын
excellent video, it helped me a lot 😃, could you help me with how to pass data to change the textView inside the nav_header, please 😓For example data I get from a login :(
@user-cc3vg3sp1k Жыл бұрын
thanks
@AndroidGeekCo Жыл бұрын
welcome 😊
@eslammagdy5393 Жыл бұрын
Thank you in advance
@AndroidGeekCo Жыл бұрын
You're very welcome!😊🙏
@igormorozov6311 Жыл бұрын
thank u very much, very helpful🌼
@AndroidGeekCo Жыл бұрын
Glad it was helpful! 😊
@mahshad.a Жыл бұрын
hey, i love your video. however i have some problem on binding. the binding.apply didn't work on my laptop. what should i do?
@AndroidGeekCo Жыл бұрын
Thanks for your feedback 😊glad you liked the video 😊 please check this video : kzbin.info/www/bejne/gKnWe6urg66Wg80
@luisdanielfigueroagarcia317 Жыл бұрын
hi, thank fot you video, i have a questin, How i can close the menu when i tap del option?
@AndroidGeekCo Жыл бұрын
you're welcome , in our example , you can use : drawerLayout.closeDrawers() for closing navigation drawer after clicking on each item 😊
@alemibughunter Жыл бұрын
i loved
@AndroidGeekCo Жыл бұрын
glad to hear that 🤩✨ thanks for your feedback 🙏🏻
@ahmetylmaz99092 жыл бұрын
Menu does not open when click hamburger menu. What's problem? That say deprected for onOptionsItemSelected. That can be reason? How can I solve it?
@AndroidGeekCo2 жыл бұрын
do you use the codes that I show in this video? or use another code? because the code that I used is not deprecated. Now, I checked again, and it works as I expected. would you please tell me exactly which code cause to error? and also please check your dependencies version , I used the last version for all my dependencies
@ahmetylmaz99092 жыл бұрын
@@AndroidGeekCo I use it for fragment. So I can't click it from fragment? It works when I swipe screen from left to right. But dont work when click hamburger. Also it can be deprected for fragment.
@AndroidGeekCo2 жыл бұрын
I got , let me check it for fragment , just as suggestion , you can use single activity , and then in your activity , yoy can use drawer with out any problem , and this way is mush more modern instead of using just fragment
@ahmetylmaz99092 жыл бұрын
@@AndroidGeekCo I do navigation compoenent. I did it for MainActivity that works. It's all about fragment. Thanks for your helping.:)
@majhawk84312 жыл бұрын
how do we redirect to another activity from navigation drawer in kotlin
@AndroidGeekCo2 жыл бұрын
in this video, we use => [ when (it.itemId) ] for accessing each item of our navigation drawer instead of show toast that we have done in this video, you can use intent for going to another activity like this -> startActivity(Intent(this,SecondActivity::class.java))
@majhawk84312 жыл бұрын
@@AndroidGeekCo thanks
@majhawk84312 жыл бұрын
@@AndroidGeekCo Can you tell me what is wrong in my code lateinit var binding: ActivityMainBinding lateinit var toggle: ActionBarDrawerToggle override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding = ActivityMainBinding.inflate(layoutInflater) setContentView(binding.root) binding.apply { toggle = ActionBarDrawerToggle(this@MainActivity, homeMain, R.string.open, R.string.close) homeMain.addDrawerListener(toggle) toggle.syncState() supportActionBar?.setDisplayHomeAsUpEnabled(true) navView.setNavigationItemSelectedListener { when (it.itemId) { R.id.loginBtn -> startActivity(Intent(this@MainActivity, LoginActivity::class.java)) } true } } } override fun onOptionsItemSelected(item: MenuItem): Boolean { if(toggle.onOptionsItemSelected(item)){ true } return super.onOptionsItemSelected(item) } }
@majhawk84312 жыл бұрын
menu item is not clickable why it is
@AndroidGeekCo2 жыл бұрын
Please check your code again with the video and GitHub source : github.com/ezatpanah/Navigation-drawer-KZbin , as you can see in the video when I click on each item of menu, the toast has appeared and it's works
@user-ze5ri4yd2t Жыл бұрын
i have followed your code but navigation drawer button not showing me ... if i swipe on the screen from left side drawer menu it will come.. how can i fix this ?? pls help
@lifeforce345110 ай бұрын
same for me the hamburger menu is visible, but if I touch it the window hide , did you found a fix ?
@supermurloc53716 ай бұрын
Hi. I don't know if the problem is relevant at the moment, but still. I also followed the code from the video, just like you. The same problem has arisen. The solution is that you need to initialize the Toolbar in the Activity.xml and Activity.kt for Activity.xml --- in ConstraintLayout --- // initialize the Toolbar with the code
@sophiejcbs2 ай бұрын
@@supermurloc5371 thank u very much 🙏🙏🙏
@valeriao54742 жыл бұрын
Hi i have a problem, the DrawerToggle doesnt show up, what should i do?
@AndroidGeekCo2 жыл бұрын
would you please write your code about toggle here
@valeriao54742 жыл бұрын
@@AndroidGeekCo private lateinit var toggle: ActionBarDrawerToggle override fun onCreate(savedInstanceState: Bundle?) { toggle = ActionBarDrawerToggle(this, binding.notebook, R.string.open_drawer, R.string.close_drawer) binding.notebook.addDrawerListener(toggle) toggle.syncState() supportActionBar?.setDisplayHomeAsUpEnabled(true); } override fun onOptionsItemSelected(item: MenuItem): Boolean { if (toggle.onOptionsItemSelected(item)){ return true } return super.onOptionsItemSelected(item) } notebook is my drawerLayout
@AndroidGeekCo2 жыл бұрын
your code seems right... 🤔 is there your code on github? maybe I can take look into whole your code...
@ErickRodriguez-vf9qt Жыл бұрын
I have the same problem and i don´t know how to solved it
@KhizarHayat067 Жыл бұрын
How this drawer work on other Activities??
@luisdanielfigueroagarcia317 Жыл бұрын
just use fragment to use the same activity and only change the fragments