Bottom Navigation Bar - Android Studio | Fragments | Java | 2023

Поделиться
HTML-код
  • Опубликовано: 26 ноя 2024

Комментарии • 131

  • @harshrana2004
    @harshrana2004 9 месяцев назад +4

    Thank you!! You don't have idea, how your video helped at my project preparation work...

  • @satheeshkumarbabu7737
    @satheeshkumarbabu7737 23 дня назад

    Excellent

  • @alexsandooliveira
    @alexsandooliveira Месяц назад

    Very good

  • @ship-yw7xk
    @ship-yw7xk 7 месяцев назад

    It is perfect, perfect!

  • @eduardoreyes5203
    @eduardoreyes5203 Год назад +2

    Nice video, awesome explanation, it works perfect on my app!

  • @Mirtguitar
    @Mirtguitar Год назад +5

    Very clear tutorial.

  • @Sky-nq5pp
    @Sky-nq5pp 8 месяцев назад +1

    Thx a lot legen :)

  • @FSCO_sahilsatishchavan
    @FSCO_sahilsatishchavan Год назад +2

    Thx bro

  • @FilipeeX
    @FilipeeX 4 месяца назад +1

    What if you need to have multiple activities? Do you just copy the bottom menu to that new activity?

    • @AnimateMJ
      @AnimateMJ 3 месяца назад

      yes 100%

    • @nguyendcb
      @nguyendcb 2 месяца назад

      No, you need to use fragments

    • @FilipeeX
      @FilipeeX 2 месяца назад

      @@nguyendcb figured it out by now but thx lol

  • @RiteshVerma-jf3nq
    @RiteshVerma-jf3nq Год назад

    Thankyou sirrrrrrr

  • @jarjaju9524
    @jarjaju9524 11 месяцев назад +1

    My panel buttons do not switch, that is, when switching, the home button is always active. Help me, please

  • @oxuanhieu5753
    @oxuanhieu5753 Год назад +1

    I want as soon as I enter the app, the profile fragment will appear and the profile icon under the bottom bar will light up, how can I do that?

  • @Master_Ali_Coder
    @Master_Ali_Coder 10 месяцев назад +1

    in my studio bottomNavigationView Not show Please Help

  • @Deep-codes
    @Deep-codes Год назад +1

    7:23

  • @gitauyganjo7257
    @gitauyganjo7257 Год назад +6

    Error: constant expression required. In my switch case

    • @gitauyganjo7257
      @gitauyganjo7257 Год назад

      please help

    • @deno8322
      @deno8322 Год назад

      @@gitauyganjo7257 use if - else if
      like that:
      binding.bottomNavigationView.setOnItemSelectedListener(item -> {
      if (item.getItemId() == R.id.home) {
      replaceFragment(new HomeFragment());
      }
      else if (item.getItemId() == R.id.settings) {
      replaceFragment(new SettingsFragment());
      }
      else if (item.getItemId() == R.id.profile) {
      replaceFragment(new ProfileFragment());
      }
      return true;
      });

    • @El_Master533
      @El_Master533 Год назад

      Hello, were you able to solve it?

    • @gitauyganjo7257
      @gitauyganjo7257 Год назад +4

      @@El_Master533 yes. I just changed the switch case to an if else statement

    • @bauerdev
      @bauerdev Год назад

      mine has the same error, can you help me?

  • @muhammadariffahmi9088
    @muhammadariffahmi9088 11 месяцев назад

    thanks bro!

  • @chosen3494
    @chosen3494 10 месяцев назад +1

    Guys btw if the contents are not appearing remember to set the top constraint as well for FrameLayout 2:34

    • @geraldjohnsotto4960
      @geraldjohnsotto4960 9 месяцев назад

      Thanks bro

    • @Ollarzabal22
      @Ollarzabal22 2 месяца назад

      thanks for the assist, was starting to drive me nuts

    • @dfoors1038
      @dfoors1038 2 месяца назад

      спасибо, бро!!! Очень сильно помог!!!

  • @MrYou845
    @MrYou845 6 месяцев назад

    मेने भी अपने app में bottom navigation के साथ fragments का use लिया पर मेरा app बार बार क्रैश हो रहा है इसका कुछ सलूशन पता हो तो बताना ,मेने हर एक fregment में api calling के through data load करवाया है जब data जल्दी load हो जाता है तब app क्रैश नहीं होता है पर जब धीरे load होता है या नहीं होता है तब app क्रैश हो जाता है इसका कुछ उपाय हो तो बताना

  • @javenleathercrafts
    @javenleathercrafts 4 месяца назад

    please help me , i only need 2 buttons for this project and i folloed your steps. On the emulator it shows 4 buttons 2 same pairs but on the xml file there is only one pair and the layout i want

  • @AhmadJS
    @AhmadJS Год назад +1

    💚

  • @chinhnguyen7668
    @chinhnguyen7668 Год назад

    thank you

  • @bauerdev
    @bauerdev Год назад +3

    Error: constant expression required. In my switch case. someone help me?

    • @matze_5737
      @matze_5737 Год назад +8

      you need to use if/else statements

    • @shortbydurgaprasad
      @shortbydurgaprasad Год назад

      ​@@matze_5737how

    • @devuslee3219
      @devuslee3219 7 месяцев назад

      @@matze_5737 legendary comment. This solved my problem also

  • @sonicpubggaming402
    @sonicpubggaming402 Год назад +8

    bro iam getting a Constant expresstion required for the switch case R.id.home i did same as u but its showing error, can u help with this...

    • @alo_lola
      @alo_lola Год назад +1

      Did you find the answer?

    • @onei3533
      @onei3533 Год назад +1

      found a solution just use if instead switch

    • @alimishazwan3687
      @alimishazwan3687 Год назад +24

      binding.bottomNavigationView.setOnItemSelectedListener(item -> {
      if (item.getItemId() == R.id.learn) {
      replaceFragment(new LearnFragment());
      } else if (item.getItemId() == R.id.game) {
      replaceFragment(new GameFragment());
      } else if (item.getItemId() == R.id.profile) {
      replaceFragment(new ProfileFragment());
      } else {
      replaceFragment(new SettingFragment());
      }
      return true;
      });
      here the example to solve the problem. just use if statement

    • @contentisking6702
      @contentisking6702 Год назад +7

      ​@@alo_lolago to switch click alt+ enter then choose if . Problem will be solved

    • @kevinkrisdianto132
      @kevinkrisdianto132 Год назад

      ​@@alimishazwan3687 thanks bro

  • @Mirtguitar
    @Mirtguitar Год назад +3

    Everything went well, until the ActivityMainBinding. Good tutorial though.

    • @castero465
      @castero465 Год назад

      change it to name of the class next to name of xml activity Binding
      for example if the xml file name is avtivity_editable the binding name will be ActivityEditableBinding not ActivityMainBinding

    • @Mirtguitar
      @Mirtguitar Год назад +1

      @@castero465 Thank you mate, i had a typo in the binding name, now it works.

    • @the_one_from_beyond
      @the_one_from_beyond 6 месяцев назад +1

      @@castero465 sorry bro i didn't understand i even didn't see where author made the class next to name of xml activity Binding

    • @shashellazelicha2224
      @shashellazelicha2224 22 дня назад

      thank you, it works on me

  • @mikaeljotsa6290
    @mikaeljotsa6290 Год назад +1

    It doesn't work, no fragment is displayed not even the default Home fragment, i have changed the switch to if

    • @Gustavo_788
      @Gustavo_788 Год назад +2

      Someone help me, the screens are not changing. they are all white since I defined colors etc😓

    • @Jeridi
      @Jeridi Месяц назад

      Thanks for the Solution , becouse In some rare cases, switching from switch-case to if-else can help.

  • @electronicaparatodos9841
    @electronicaparatodos9841 9 месяцев назад

    la parte de arriba del botton navigation se puede quitar

  • @cypheron3030
    @cypheron3030 Год назад +1

    buildFeatures { viewBinding True }
    My viewBinding doesn't show in purple

    • @taisiaapakina8115
      @taisiaapakina8115 Год назад

      have you figured out how to fix it? I have an error with this connection

    • @schmoopiegrob8758
      @schmoopiegrob8758 Год назад

      @@taisiaapakina8115 edit file res=>values=>colors.xml, two colors are given there, in the image and likeness, you add the colors that you need, if you don’t master it, then you climbed here early)

    • @cianely1047
      @cianely1047 10 месяцев назад

      you need to have a groovy gradle build had same problem

  • @HiteshRaj-t7x
    @HiteshRaj-t7x Год назад

    Cannot resolve method 'getItemId' in 'View' how to resolve this

  • @attruong2341
    @attruong2341 Год назад +2

    I can run the app smoothly, but when I log login my app doesn't show the fragment already been designed as in the video, I also converted the switch into if, it shows no problem, someone please help me.

    • @neoplasia536
      @neoplasia536 Год назад

      same problem

    • @attruong2341
      @attruong2341 Год назад

      @@neoplasia536 I've change the framelayout in Activity_Main into this and my code can run

    • @johnk.849
      @johnk.849 Год назад

      What do you see where the fragmentLayout is ?

    • @ThatOneKid499
      @ThatOneKid499 Год назад

      @@johnk.849 I have the same problem, I just see a white screen and the top bar with the time is slightly cut off.

    • @chiphanminh4640
      @chiphanminh4640 Год назад

      you can try to fix the height and width of FrameLayout to match_parent, i tried and succeeded

  • @water8garden
    @water8garden Год назад

    can't process with MainActivity- code problem

    • @johnk.849
      @johnk.849 Год назад

      What error are you getting ?

  • @Jeet_Chudasma
    @Jeet_Chudasma Год назад

    I have applied all vector asset but after adding in bottom navigation it is giving me home icon

    • @johnk.849
      @johnk.849 Год назад

      Home icon for all bottom nav items ??

    • @Jeet_Chudasma
      @Jeet_Chudasma Год назад

      @@johnk.849 yes but it's solved now.

    • @Gustavo_788
      @Gustavo_788 Год назад

      Someone help me, the screens are not changing. they are all white since I defined colors etc😓

    • @devspuch835
      @devspuch835 Год назад

      @@Gustavo_788 it is beacause home icon - white.

    • @devspuch835
      @devspuch835 Год назад +1

      android:background="@color/black"
      app:itemTextColor="@color/white"
      app:itemIconTint="@color/white"

  • @riguchazo1
    @riguchazo1 7 месяцев назад +1

    very fast; quickly

  • @landertv8621
    @landertv8621 Месяц назад

    Help me my gradle is kotlin

  • @Lily_-_-
    @Lily_-_- Год назад

    How do I contact you. Please respond.

  • @abdelhadibecheikh
    @abdelhadibecheikh Год назад

    if you have more then 3 items there will be problème

    • @johnk.849
      @johnk.849 Год назад

      What problem do you strike when you have more than 3 items ?

  • @idelvertyondouii5787
    @idelvertyondouii5787 Год назад

    switch required integer

  • @berkeleymorrison
    @berkeleymorrison 8 месяцев назад

    wow thx for the tutorial but now i made sure of that android development is a huge joke

  • @tobwell4701
    @tobwell4701 11 месяцев назад

    Could be better if you provide the scripts

  • @Attee_Q
    @Attee_Q Год назад +17

    JAVA? In 2023? 🤣🤣🤣🤣🤣🤣

    • @kenny.mesquita
      @kenny.mesquita Год назад +24

      I work in java, so it's necessary anyway.

    • @Attee_Q
      @Attee_Q Год назад

      @@kenny.mesquita Could be necessary, but not in Android development.

    • @kenny.mesquita
      @kenny.mesquita Год назад +19

      @@Attee_Q so I'm a android developer, and I worK with java.

    • @Attee_Q
      @Attee_Q Год назад

      @@kenny.mesquita Time to change to Kotlin.

    • @Lines4-w2c
      @Lines4-w2c Год назад +6

      ​@@Attee_Q Give me a link of your Application, Time to change in kotlin 😂😂

  • @adityavishwakarma5514
    @adityavishwakarma5514 Год назад

    I dont know why but in starting and cant able to use binding.bottomNavigationView.setOnClicklistner
    Isme bottomnavigtionview use ni ho para pata ni kyu 😢😢😢😢😢

    • @leychelle
      @leychelle Год назад +11

      If your activity name is MainActivity then it will be ActivityMainBinding but for example if your activity name is LoginActivity it will be ActivityLoginBinding.
      You have to call binding according to the activity with it's respective layout file

    • @azlanahmed2811
      @azlanahmed2811 Год назад +1

      Set on click listener nhi call karna hai set on selected item method call hoga

    • @kamil2k111
      @kamil2k111 Год назад

      @@leychelle thx 👍

    • @shuraj_03
      @shuraj_03 Год назад

      @@leychelle I have same problem my activity name is pat_home and my layout name is pathome.xml

    • @castero465
      @castero465 Год назад

      thank you you are a life saver for real@@leychelle