Bottom Navigation With Activities in Android Studio | BottomNavigation | Android Coding

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • Bottom Navigation Tutorial : In This Video, You Will Learn How to Integrate Bottom Navigation With Multiple Activities in Android Studio.
    Build.Gradle :
    implementation 'com.google.android.material:material:1.0.0'
    All File :
    1) activity_main.xml 2) MainActivity.java
    3) activity_dashboard.xml 4) Dashboard.java
    5) activity_about.xml 6) About.java
    7) selector.xml 8) menu_navigation.xml
    Table Of Content :
    0:23 - Project Creation
    0:43 - XML Code
    6:36 - Java Code
    10:17 - Output
    Presented By : Android Coding
    Background Music By : NoCopyrightSounds
    Download Apk Link :
    drive.google.c...
    All My App Links :
    1) QR Scanner App : bit.ly/ScannerA...
    2) Colors Code App : bit.ly/ColorsCode
    3) Age Calculator App : bit.ly/AndroidA...
    Enjoy & Stay Connected With Us!
    ► Subscribe To Android Coding : bit.ly/UA-cam-...
    ► Like Us On Facebook : bit.ly/Facebook...
    ► Follow Us On Instagram : bit.ly/Instagra...
    ► Follow Us On Twitter : bit.ly/Twitter-...
    #BottomNavWithActivities #AndroidTutorial #12H1r

КОМЕНТАРІ • 272

  • @AndroidCoding
    @AndroidCoding  3 роки тому +3

    Follow Flutter Coding :
    ua-cam.com/channels/W_GrcJ80QLBakAATLcvXpg.html

  • @So-jd2kh
    @So-jd2kh 4 роки тому +5

    Thank you, this was the only tutorial that worked out of so many!

  • @azhaanali1109
    @azhaanali1109 3 роки тому +2

    Exactly what the title says and exactly what I needed. This is a lifesaver.
    Thank you very much for making this video.

    • @AndroidCoding
      @AndroidCoding  3 роки тому +1

      Thanks for appreciating my work. You're welcome.

  • @androiddeveloper593
    @androiddeveloper593 2 роки тому +1

    Thank you sir it is very helpful

  • @luanaiacobucci2483
    @luanaiacobucci2483 3 роки тому +2

    Exactky what i needed!!! Simple, no need of a ton of code and does the job wonderfully!!

  • @67_akshaychaudhari25
    @67_akshaychaudhari25 2 роки тому +1

    Thank you very much sir for making amazing video 🙂

  • @adriant1732
    @adriant1732 4 роки тому +3

    Thank you for the amazing video!! You not only solved my issues but you also improved my coding efficiency :). Keep up the great work!!

  • @mehtabkhan9983
    @mehtabkhan9983 3 роки тому +1

    Very nice bro keep it up

  • @noxtorious2962
    @noxtorious2962 3 роки тому +2

    finally been looking for this, i dont really understand fragments good thing you material design

  • @ajaysuresh8856
    @ajaysuresh8856 Рік тому +1

    Awesome

  • @zimmykhumalo6036
    @zimmykhumalo6036 3 роки тому +1

    Thank you SO much!
    All the way from South Africa 🇿🇦

  • @kanjicito
    @kanjicito 2 роки тому +1

    Thanks friend. 🌹😎

  • @rasguard4286
    @rasguard4286 Рік тому +1

    Thank You very much

  • @ahmedmohamed1340
    @ahmedmohamed1340 4 роки тому +3

    nice bro thanks for sharing your knowledge

  • @Michael-vu8pc
    @Michael-vu8pc 3 роки тому +4

    This is what i needed, thank you a lot :D

  • @priyagupta4309
    @priyagupta4309 4 роки тому +1

    Thank you. I checked various videos to learn how to work in android. Yours is best. Thank you, Ur videos helped a lot. Make more videos.

    • @AndroidCoding
      @AndroidCoding  4 роки тому

      Welcome. It's my pleasure. Keep supporting.

  • @AyushKumar-xr7dk
    @AyushKumar-xr7dk 4 роки тому +1

    Thank you very very MUCH!!!!!!!!!!!!!
    Probably the easiest way! 🤩🤩😃😃😌😌

  • @Ithinkthatsit.
    @Ithinkthatsit. 2 роки тому +1

    💙you saved my day

  • @tillyselak6676
    @tillyselak6676 2 роки тому +1

    Thank you man! This worked great, it really helped me a lot

  • @ouattarasiaka8532
    @ouattarasiaka8532 2 роки тому +1

    you are the best professor

  • @talha_chaudhry10
    @talha_chaudhry10 3 роки тому +4

    setonnavigationitemselectedlistener is now deprecated use NavigationBarView.setOnItemSelectedListener it will work.
    Overall it was a very good and helpful Video

  • @vishalkumavat6755
    @vishalkumavat6755 4 роки тому

    your almost all tutorials helps me a lot
    and in every tutorial change background music

  • @laraibmaheen9039
    @laraibmaheen9039 4 роки тому +1

    Best method 👍👍👍

  • @lukailic2699
    @lukailic2699 3 роки тому +2

    Thank you a lot! This really helped me!

  • @shubhamchaurasia4554
    @shubhamchaurasia4554 4 роки тому +2

    Thanku so much...

  • @mksector7542
    @mksector7542 3 роки тому +1

    thanks a lot

  • @universe8989
    @universe8989 2 роки тому +1

    this one actually helped me, thanks!

  • @Saadet-jp6lr
    @Saadet-jp6lr 3 роки тому +1

    thank u sooo much

  • @ms2345y
    @ms2345y 4 роки тому +1

    thank you really much this is a really good way to avoid the fragments

    • @mariovalerio99
      @mariovalerio99 4 роки тому +1

      i agree too

    • @AndroidCoding
      @AndroidCoding  4 роки тому

      Welcome

    • @remithomas3346
      @remithomas3346 4 роки тому

      Im a beginner, why should we avoid fragments ?

    • @remithomas3346
      @remithomas3346 4 роки тому

      I'm curious because with activities I've found some bad points:
      - it seems slower
      - when we spam navigation buttons the pending transition shows up again
      - repetition of code
      - tabs stack for the back button

  • @asaelrddz
    @asaelrddz 2 роки тому +1

    Thank u so much!

  • @washinerdev4355
    @washinerdev4355 4 роки тому +5

    Thanks for your knowledge, your channel was the best I've seen so far. Congratulations on not making a channel with all this content in kotlin ???

  • @omonmurad
    @omonmurad 3 роки тому +1

    thank you bro you are the best bro

    • @AndroidCoding
      @AndroidCoding  3 роки тому

      You're welcome. Thanks for appreciation. Keep learning.

  • @CTCCCCCCCC
    @CTCCCCCCCC 3 роки тому +2

    Thank you so much! You're the best

  • @omersinik3291
    @omersinik3291 3 роки тому

    thanks a lot of . It's work . And Also You solve my change activity transistarion problem . Thanks

  • @john20johnny
    @john20johnny 4 роки тому +14

    Thank you bro, really good, just I have a question, may I know why do you prefer to not use constraint layout?
    Thank you again.

    • @karruramesh9798
      @karruramesh9798 3 роки тому

      Because constraint layout has many disadvantages bottom but we can use even with it .I did it

    • @yassinefourka3540
      @yassinefourka3540 3 роки тому

      @@karruramesh9798 it doesn't work for me bro can u explain to me

  • @vuongqtvn
    @vuongqtvn 3 роки тому +1

    nice tutorial, very useful for me

  • @nastyavlasova30
    @nastyavlasova30 3 роки тому +1

    Thanks! This video helped me so much.

  • @sauravgangurde8492
    @sauravgangurde8492 3 роки тому +1

    very helpful video.Thank you!!

  • @BrunaOliveira-io2wr
    @BrunaOliveira-io2wr 2 роки тому +1

    amazing job! thank you so much

  • @yoreneu1294
    @yoreneu1294 4 роки тому +1

    great example! a ton of thanks dude

  • @thanglemon5958
    @thanglemon5958 Рік тому

    Thank you so much :)

  • @ldhpro
    @ldhpro 3 роки тому +1

    굿....나이스.... good . nice video.. thank you

  • @vuongqtvn
    @vuongqtvn 3 роки тому +1

    Useful thanks

  • @muhamadhaekalainunrafi6110
    @muhamadhaekalainunrafi6110 4 роки тому

    woww thanks for your tutotial its done

  • @devanshudesai7645
    @devanshudesai7645 4 роки тому +5

    Thank you for this video... but in this video there is OnNavigationItemSelectedListener() used in MainActivity so i am doing it same but its showing error that it cannot be used, can anyone help ? @AndroidCoding

  • @dks6459
    @dks6459 4 роки тому +1

    Thanks sir

  • @moazelsawaf2000
    @moazelsawaf2000 3 роки тому +1

    Thanks a lot ❤

  • @jasonli3145
    @jasonli3145 4 роки тому +1

    kind of useful

  • @jeremyheng8573
    @jeremyheng8573 3 роки тому +1

    Good and clear tutorial!
    Do you think that it is better navigation with activity or fragment?

    • @AndroidCoding
      @AndroidCoding  3 роки тому +1

      Thanks for appreciation. I think fragment is better.

  • @Info-dj7qs
    @Info-dj7qs 4 роки тому +1

    Thanks bro.

  • @nelronjayag9643
    @nelronjayag9643 3 роки тому +1

    now im looking for tutorial on how to except the navigation bar on scrolling

    • @AndroidCoding
      @AndroidCoding  3 роки тому

      Try this :
      ua-cam.com/video/AYSlm-KXlQE/v-deo.html

  • @bogdannikitchuk3878
    @bogdannikitchuk3878 4 роки тому +2

    Man, thank you so muchh!

  • @adityamore7471
    @adityamore7471 4 роки тому +1

    Thanks

  • @mihirmehta767
    @mihirmehta767 4 роки тому +5

    hello sir, nice tutorial here. But the problem with this is when you go to other activity and then go back (backPressed or finish) , the selectedIndex does not change as per the code , and changing it in the above mentioned methods would not help either, so do you have any specific way that could help? Thanks in advance.

  • @carlosdanieloliveraloyaga320
    @carlosdanieloliveraloyaga320 3 роки тому

    thanks bro, greetings from Peru

  • @mattma2533
    @mattma2533 4 роки тому

    Very good

  • @bisheshshrestha2656
    @bisheshshrestha2656 4 роки тому

    Thank you.

  • @marie0166
    @marie0166 3 роки тому +1

    Thank you, I've been looking for similar code, but I only found for fragments, and was relatively frustrated.
    I was looking for a kotlin code, but your Java code was easy to "translate" into kotlin.
    Thanks again, you really saved me, I was desperate!

    • @AndroidCoding
      @AndroidCoding  3 роки тому

      You're welcome. Glad to hear.

    • @JuJu-fp9vb
      @JuJu-fp9vb 3 роки тому +1

      Hey, do you have the kotlin code?

    • @AndroidCoding
      @AndroidCoding  3 роки тому

      Hey. You can convert java to kotlin.

    • @JuJu-fp9vb
      @JuJu-fp9vb 3 роки тому

      @@AndroidCoding yes but for this i need to import de whole code in kotlin and i haven't it

    • @JuJu-fp9vb
      @JuJu-fp9vb 3 роки тому +1

      @@AndroidCoding You haven't the code in Kotlin right?

  • @michaelserran8582
    @michaelserran8582 2 роки тому +1

    Hello sir 😊 please make a video to save the data onto Farebase and also make a video for basic functions such as (Add, Update, Deleted, and Search). Lastly is, all the data has been save to the Farebase can we see/view from separated navigation/menu.

    • @AndroidCoding
      @AndroidCoding  2 роки тому

      Try this :
      ua-cam.com/video/aQ7MGoMNBik/v-deo.html

  • @zuri3117
    @zuri3117 4 роки тому +1

    this works but its is not advisable to use, because all you just did was open multiple activities, those Activities are still running in the back ground because u didnt close them after opening them.
    to test run your error try clicking the home button multiple times
    then press back on your android phone...it doesnt return to your menu

  • @top10thingwhichyoushouldkn37
    @top10thingwhichyoushouldkn37 4 роки тому +2

    hello bro i m new to android ,,,,,,,some people do this things from fragments and some with activities which is best

    • @adwaithks
      @adwaithks 4 роки тому

      Use Fragments When using navigation drawers and all.. Coz its kind of lightweight compared to a new activity.. Read online. Not completely sure👍

  • @gouravsingh5129
    @gouravsingh5129 3 роки тому +4

    Sir the onNavigationSelectedListner method is deprecated now so please help me to find a better alternative also If possible then Please update this video

    • @AndroidCoding
      @AndroidCoding  3 роки тому +1

      Ok. I will try to make a video on this topic.

    • @rehanchaudhry3656
      @rehanchaudhry3656 3 роки тому +1

      @@AndroidCoding please tell me what I do now?

    • @AndroidCoding
      @AndroidCoding  3 роки тому +5

      Try this :
      bottomNavigation.setOnItemSelectedListener(new NavigationBarView.OnItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { int id = item.getItemId(); switch(id){ //check id } return true; } });

    • @dhavalmainkar4878
      @dhavalmainkar4878 2 роки тому

      @@AndroidCoding god bless yo.Wasnt sure about this but it really worked

  • @tyrm
    @tyrm 4 роки тому

    Thanks!!!

  • @muhammadnilam5065
    @muhammadnilam5065 4 роки тому +4

    do you have upload video for buttom navigation menu with fragment?
    thank you for your time

    • @AndroidCoding
      @AndroidCoding  4 роки тому

      Check this :
      ua-cam.com/video/mrgs6IWbZ3k/v-deo.html

  • @khametoff6386
    @khametoff6386 4 роки тому +1

    you're cool, bro !)

  • @Johainna
    @Johainna 4 роки тому +1

    BottomNavigationView is not working for me

  • @owuziowuzi7668
    @owuziowuzi7668 4 роки тому +1

    Please help me. Here is my error: attempt to invoke virtual method 'void com.google.android.material.bottomnavigation.BottomNavigation.setSelectedItemId(int)'

  • @hizmetevdenfirebase111
    @hizmetevdenfirebase111 3 роки тому +1

    When clicking home twice, a black screen comes up.

  • @protocol4313
    @protocol4313 3 роки тому

    Super broo... if possible can you make the video in sqlite in android

  • @KillOnS
    @KillOnS Рік тому

    Hey, this was helpful.. Coming a bit late, but would you happen to know how to change the background color of the active item? I know how to change the icon color (I've hid the labels), but I don't know how to change the background without messing with the drawables.. If you have any idea it would be much appreciated, thx.

  • @demigod6190
    @demigod6190 4 роки тому +2

    selector.xml is not working. :(
    anyways great video

  • @hanifabdillah3508
    @hanifabdillah3508 4 роки тому +1

    Please, How to implement recycler view at this? (bottom navigation)

  • @samjones50
    @samjones50 4 роки тому +1

    sir your method is very good, but it is not woking with " on back press " there are threee activities in your app dashboard, home and about. while my app is open from dashboard i select home and then i select about. when i press "on back press button" the activity is come back into home but the icon state not change. I am using and when i again press " on back press button" it come back to dashboard and icone state come into home. I want that when I am in about activity and i press on back press button then the button state also change to previous button. can you help me with this?

    • @AndroidCoding
      @AndroidCoding  4 роки тому

      Thanks for appreciation. I will make a video on this topic later. But it's possible only when you're using fragment.

    • @samjones50
      @samjones50 4 роки тому +1

      @@AndroidCoding okay. thanks for your reply.

    • @AndroidCoding
      @AndroidCoding  4 роки тому

      Welcome

  • @muneeriqbal9562
    @muneeriqbal9562 4 роки тому +2

    Why you add meterial version? Plz describe?

  • @sialeeMK
    @sialeeMK 4 роки тому

    Hello. may I ask you a question? between bottom navigation with activities and bottom navigation with fragment, which one is better?

  • @drm8164
    @drm8164 4 роки тому +1

    It works BUT the colors of the text of menu is pink and i do not have a changing color from black to white when selecting other menu. HELP PLEASE!

    • @AndroidCoding
      @AndroidCoding  4 роки тому

      Try this :
      res/drawable/color_selector .xml:

    • @drm8164
      @drm8164 4 роки тому

      @@AndroidCoding Thank you Brother, but it does not work. In your code it is coloR instead of colo. I changed that but I have the same pink color text. Do you have an idea how to fix that? Thanks bro :)

  • @suryaprasathr8356
    @suryaprasathr8356 4 роки тому +2

    I got error in boolean type methods .how to resolve this error

    • @krisyan9781
      @krisyan9781 4 роки тому +1

      me too;(

    • @IbrahimIceCold
      @IbrahimIceCold 4 роки тому

      Any solution? :((

    • @AndroidCoding
      @AndroidCoding  4 роки тому

      bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
      @Override
      public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) {
      //Your Method
      return false;
      }
      });

  • @兔子-m2j
    @兔子-m2j 4 роки тому

    Hello, I would like to ask why there is a splash screen when switching between activities, unlike the animation in your video that does not directly switch

  • @randy4443
    @randy4443 4 роки тому

    My navigation is not aligning horizontal when I set align parent bottom to true but it is aligning vertical on top of one another. It is the at the bottom but just not horizontally. How do I fix this?

  • @xodiaki
    @xodiaki 3 роки тому

    the navigation bar doesn't show up, it worked on my other app but not on this one, i followed everything but it doesnt work, checked gradle file too and idk whats the matter, do i need a different material version?

  • @shwetapai4915
    @shwetapai4915 3 роки тому +1

    I need to click twice to open a page from navigationview.. Can anyone help me to click it once and open it?

    • @AndroidCoding
      @AndroidCoding  3 роки тому +1

      You can use handler to achieve this.
      Watch this :
      ua-cam.com/video/4ZOUZQ5FUns/v-deo.html

    • @shwetapai4915
      @shwetapai4915 3 роки тому +1

      @@AndroidCoding Thankyou ❤️

    • @AndroidCoding
      @AndroidCoding  3 роки тому

      You're welcome

  • @samirdesigner3324
    @samirdesigner3324 4 роки тому

    thanks bro
    if make music player sound in app 5 file sound in assets or raw and show by listview and when click on play sound and have button play pause with seekbar ..

  • @SudhirKumar-qd5th
    @SudhirKumar-qd5th 4 роки тому

    Hi bro I have a problem the title what you defined in menu for all the vector imges title didnt come until if i clicking on bottom button if I click on button than title show plz tell me how I can get out of this issue ?

  • @sanjadHossain
    @sanjadHossain 4 роки тому +1

    hye brother i need help about navigation icon can you help me please i stack on on little error

    • @AndroidCoding
      @AndroidCoding  4 роки тому

      For any queries direct message on Instagram.

  • @osama6795
    @osama6795 4 роки тому

    thank you so much, an amazing tutorial!!!!!!!!!!!!!!!!!

  • @John-re3tr
    @John-re3tr 3 роки тому

    Hi can you please help me? It is that the overridePendingTransition(enterAnim: 0, exitAnim: 0); is not working correctly in my code.

  • @amuchand47
    @amuchand47 4 роки тому

    Hi, I am not able to switch to another activity , when I put boolean return type of OnNavigationItemSelected then it gives me and error. Please help me.

  • @gendalin6075
    @gendalin6075 2 роки тому

    Hello.
    How to enable shift animation, when the selected element shifts the rest?

  • @daijubudesuka3486
    @daijubudesuka3486 3 роки тому

    Why does the activities keep piling up? When I tap the back button, it returns to the previous open activity. how to fix it so that if the user tap the back button it will show a dialog where its says it exit the app?
    Help me

  • @nazeerm2034
    @nazeerm2034 4 роки тому +1

    Bro please upload side navigation drawer video

    • @AndroidCoding
      @AndroidCoding  4 роки тому

      Check this link :
      ua-cam.com/video/s531hc97z2A/v-deo.html

  • @WeirdStuffaaaa
    @WeirdStuffaaaa 3 роки тому

    please explain what are you doing in video . then everyone can understand it

  • @arvydocumentary
    @arvydocumentary 4 роки тому

    I got error can you guys help me?
    at com.example.futuredream.Tab2.onCreate(Tab2.java:19)
    when i click the option tab layout the apps is force close

  • @cloudmax5902
    @cloudmax5902 4 роки тому +1

    you should have to use of fragments instead of activities.. so you'll not copy paste again the same code in every activity..

  • @siskasiska2904
    @siskasiska2904 2 роки тому

    How if i want input rycycle in gallery activty?

  • @tianplays1551
    @tianplays1551 4 роки тому +1

    java part coding not working for me dont know why but BottomNabigationView keep on getting RED

    • @AndroidCoding
      @AndroidCoding  4 роки тому

      Send me screen shot on Instagram or Facebook.

  • @teychenyi2586
    @teychenyi2586 3 роки тому +1

    Sir, why i get android resource linking failed error? Pls help, thanks.

    • @HussainAli-sg2kb
      @HussainAli-sg2kb 3 роки тому

      How did you slove it

    • @teychenyi2586
      @teychenyi2586 3 роки тому

      @@HussainAli-sg2kb ua-cam.com/video/JT8jKshHVXU/v-deo.html i use this, bottom navigation with fragments.

  • @boomclap267
    @boomclap267 4 роки тому

    Hello there.....i was wondering if you could help me with this problem I'm having. So i added a button on the dashboard activity i tried to add a function to that button on my java code but findviewbyid doesn't work ...... please help ❤

  • @hasbulla7345
    @hasbulla7345 4 роки тому +4

    Would've been better if you explained what you are doing and why. I just started learning Java 3 months ago and I don't understand what you are doing. It is just copy pasting somebody elses code. Im not learning anything here. No explaination whatsoever.

    • @AndroidCoding
      @AndroidCoding  4 роки тому +1

      Ok i will try to explain but it will take some time.

  • @ethanmiller1611
    @ethanmiller1611 4 роки тому

    I still have a title bar at the top on all activities except activity_main. Does anybody know why?

  • @helloabd123
    @helloabd123 4 роки тому +1

    bro help me bro
    my code does not showing any errors still bottom Navigation its not displaying in screen
    plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz help me bro