No video

How to creat a Navigation drawer in android studio kotlin

  Рет қаралды 11,767

Android Geek

Android Geek

Күн бұрын

Пікірлер: 61
@justeben
@justeben 2 жыл бұрын
I love how your codes are clean and straight to the point!👏
@AndroidGeekCo
@AndroidGeekCo 2 жыл бұрын
Glad to hear that😀
@justeben
@justeben 2 жыл бұрын
Please would the nav drawer work if if I don't want the toolbar to be visible?
@AndroidGeekCo
@AndroidGeekCo 2 жыл бұрын
@@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 :)
@justeben
@justeben 2 жыл бұрын
It works but how to make the hamburger sign show is a challenge.
@AndroidGeekCo
@AndroidGeekCo 2 жыл бұрын
you can create custom action bar , and inside your custom action bar , you can put hamburger sign to control your drawer :)
@pagal_scientist
@pagal_scientist Жыл бұрын
I was learning from old outdated videos and facing problems of depcrecation and errors. Found your channel and I am blessed
@AndroidGeekCo
@AndroidGeekCo Жыл бұрын
Happy to help! 😊
@NimR9Sakura
@NimR9Sakura Жыл бұрын
if someone can't see the ActivityMainBinding, just add (dataBinding true) in (buildFeatures{})
@AndroidGeekCo
@AndroidGeekCo Жыл бұрын
you can add viewbinding= true inside your buildFeatures body 👍
@NimR9Sakura
@NimR9Sakura Жыл бұрын
@@AndroidGeekCo well, i use both, one to create the navigator bar and de second to made the activity code
@dr.michaelscoutelis368
@dr.michaelscoutelis368 Жыл бұрын
A highly educational video and one of the most understandable and clear codes. ❤❤❤
@AndroidGeekCo
@AndroidGeekCo Жыл бұрын
Really glad to hear that you like the video 😊🙏
@kin_1997
@kin_1997 Жыл бұрын
Your explanations are very clean and easy to understand. Thank you so much for the content.
@AndroidGeekCo
@AndroidGeekCo Жыл бұрын
You're very welcome! glad you like them 😊✨
@bodormarcel4373
@bodormarcel4373 Жыл бұрын
Same for me... and at least it works 😀 - Congratulations !
@AndroidGeekCo
@AndroidGeekCo Жыл бұрын
Glad to hear! 🤩 Thanks 😊🙏
@tshediso1194
@tshediso1194 6 ай бұрын
your tutorial was amazing thank you very much it was a life saver😇
@AndroidGeekCo
@AndroidGeekCo 6 ай бұрын
Glad it helped! :)
@ladanirasekhi2266
@ladanirasekhi2266 2 жыл бұрын
Like always great reyhaneh😍✨
@AndroidGeekCo
@AndroidGeekCo 2 жыл бұрын
Thank you! 🤗
@divyayash5858
@divyayash5858 Жыл бұрын
Well explained and to the point.
@AndroidGeekCo
@AndroidGeekCo Жыл бұрын
Thanks for your feedback 😊🙏
@arturoiniguezmejia1740
@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
@user-cc3vg3sp1k Жыл бұрын
thanks
@AndroidGeekCo
@AndroidGeekCo Жыл бұрын
welcome 😊
@eslammagdy5393
@eslammagdy5393 Жыл бұрын
Thank you in advance
@AndroidGeekCo
@AndroidGeekCo Жыл бұрын
You're very welcome!😊🙏
@igormorozov6311
@igormorozov6311 Жыл бұрын
thank u very much, very helpful🌼
@AndroidGeekCo
@AndroidGeekCo Жыл бұрын
Glad it was helpful! 😊
@mahshad.a
@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
@AndroidGeekCo Жыл бұрын
Thanks for your feedback 😊glad you liked the video 😊 please check this video : kzbin.info/www/bejne/gKnWe6urg66Wg80
@luisdanielfigueroagarcia317
@luisdanielfigueroagarcia317 Жыл бұрын
hi, thank fot you video, i have a questin, How i can close the menu when i tap del option?
@AndroidGeekCo
@AndroidGeekCo Жыл бұрын
you're welcome , in our example , you can use : drawerLayout.closeDrawers() for closing navigation drawer after clicking on each item 😊
@alemibughunter
@alemibughunter Жыл бұрын
i loved
@AndroidGeekCo
@AndroidGeekCo Жыл бұрын
glad to hear that 🤩✨ thanks for your feedback 🙏🏻
@ahmetylmaz9909
@ahmetylmaz9909 2 жыл бұрын
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?
@AndroidGeekCo
@AndroidGeekCo 2 жыл бұрын
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
@ahmetylmaz9909
@ahmetylmaz9909 2 жыл бұрын
@@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.
@AndroidGeekCo
@AndroidGeekCo 2 жыл бұрын
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
@ahmetylmaz9909
@ahmetylmaz9909 2 жыл бұрын
@@AndroidGeekCo I do navigation compoenent. I did it for MainActivity that works. It's all about fragment. Thanks for your helping.:)
@majhawk8431
@majhawk8431 2 жыл бұрын
how do we redirect to another activity from navigation drawer in kotlin
@AndroidGeekCo
@AndroidGeekCo 2 жыл бұрын
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))
@majhawk8431
@majhawk8431 2 жыл бұрын
@@AndroidGeekCo thanks
@majhawk8431
@majhawk8431 2 жыл бұрын
@@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) } }
@majhawk8431
@majhawk8431 2 жыл бұрын
menu item is not clickable why it is
@AndroidGeekCo
@AndroidGeekCo 2 жыл бұрын
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
@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
@lifeforce3451
@lifeforce3451 10 ай бұрын
same for me the hamburger menu is visible, but if I touch it the window hide , did you found a fix ?
@supermurloc5371
@supermurloc5371 6 ай бұрын
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
@sophiejcbs
@sophiejcbs 2 ай бұрын
@@supermurloc5371 thank u very much 🙏🙏🙏
@valeriao5474
@valeriao5474 2 жыл бұрын
Hi i have a problem, the DrawerToggle doesnt show up, what should i do?
@AndroidGeekCo
@AndroidGeekCo 2 жыл бұрын
would you please write your code about toggle here
@valeriao5474
@valeriao5474 2 жыл бұрын
@@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
@AndroidGeekCo
@AndroidGeekCo 2 жыл бұрын
your code seems right... 🤔 is there your code on github? maybe I can take look into whole your code...
@ErickRodriguez-vf9qt
@ErickRodriguez-vf9qt Жыл бұрын
I have the same problem and i don´t know how to solved it
@KhizarHayat067
@KhizarHayat067 Жыл бұрын
How this drawer work on other Activities??
@luisdanielfigueroagarcia317
@luisdanielfigueroagarcia317 Жыл бұрын
just use fragment to use the same activity and only change the fragments
@KhizarHayat067
@KhizarHayat067 Жыл бұрын
@@luisdanielfigueroagarcia317 Thank You Sir.
How to use Shared Preferences in kotlin
20:29
Android Geek
Рет қаралды 9 М.
Navigation Drawer in Jetpack Compose using Kotlin | Android Studio
18:06
Android Knowledge
Рет қаралды 4,5 М.
а ты любишь париться?
00:41
KATYA KLON LIFE
Рет қаралды 3,2 МЛН
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
Logo Matching Challenge with Alfredo Larin Family! 👍
00:36
BigSchool
Рет қаралды 22 МЛН
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 13 МЛН
Understanding and Using Services in Kotlin - Beginner
16:08
Android Geek
Рет қаралды 11 М.
Land Navigation Demonstration Video
8:38
STOKERMATIC
Рет қаралды 595 М.
How to creat Notification in android kotlin
18:02
Android Geek
Рет қаралды 4 М.
Top App Bar in Jetpack Compose using Kotlin | Android Studio
9:52
Android Knowledge
Рет қаралды 4 М.
How to make a Splash Screen without extra Activity in Android
9:48
Philipp Lackner
Рет қаралды 86 М.
FRAGMENTS - Android Fundamentals
17:29
Philipp Lackner
Рет қаралды 328 М.
Gradle Course for Beginners | Get Going with Gradle
56:59
Tom Gregory Tech
Рет қаралды 29 М.
а ты любишь париться?
00:41
KATYA KLON LIFE
Рет қаралды 3,2 МЛН