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

Ғылым және технология

Bottom Navigation Bar - Android Studio | Fragments | Java | 2023
Follow me on Instagram: / foxandroidblog
Follow me on Facebook: / foxandroidblog
SUPPORT THE CHANNEL
------------------------------------------------------------------------------------------------------------------------------------------------------
Join this channel to access the perks :
/ @_foxandroid
Patreon Link: / foxandroid
---------------------------------------------------------------------------------------------------------------------------------------------------------
Hey Developers,
In this video, I have explained :
* Alternate For StartActivityForResult Deprecated using Java
* RegisterForActivityResult using Java
How to Request Multiple Permissions in Android 11 using Java
• How to Request Multipl...
How to Request Multiple Permissions in Android 11 using Kotlin
• How to Request Multipl...
How to Save Image to External Storage using Java API 30
• How to Save Image to E...
Read Image From External Storage API 30+ using Kotlin
• Read Image From Extern...
Read Image From External Storage API 30+ using Java
• Read Image From Extern...
StartActivityForResult Deprecated Solution using Java
• StartActivityForResult...
#bottomnavigationview #android #java

Пікірлер: 115

  • @eduardoreyes5203
    @eduardoreyes5203 Жыл бұрын

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

  • @Mirtguitar
    @Mirtguitar8 ай бұрын

    Very clear tutorial.

  • @harshrana2004
    @harshrana20045 ай бұрын

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

  • @ship-yw7xk
    @ship-yw7xk3 ай бұрын

    It is perfect, perfect!

  • @Sky-nq5pp
    @Sky-nq5pp4 ай бұрын

    Thx a lot legen :)

  • @FSCO_sahilsatishchavan
    @FSCO_sahilsatishchavan Жыл бұрын

    Thx bro

  • @RiteshVerma-jf3nq
    @RiteshVerma-jf3nq8 ай бұрын

    Thankyou sirrrrrrr

  • @muhammadariffahmi9088
    @muhammadariffahmi90887 ай бұрын

    thanks bro!

  • @AhmadJS
    @AhmadJS Жыл бұрын

    💚

  • @chinhnguyen7668
    @chinhnguyen7668 Жыл бұрын

    thank you

  • @FilipeeX
    @FilipeeX14 күн бұрын

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

  • @oxuanhieu5753
    @oxuanhieu57539 ай бұрын

    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?

  • @Deep-codes
    @Deep-codes11 ай бұрын

    7:23

  • @javenleathercrafts
    @javenleathercrafts17 күн бұрын

    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

  • @jarjaju9524
    @jarjaju95247 ай бұрын

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

  • @riguchazo1
    @riguchazo14 ай бұрын

    very fast; quickly

  • @Lily_-_-
    @Lily_-_- Жыл бұрын

    How do I contact you. Please respond.

  • @sonicpubggaming402
    @sonicpubggaming402 Жыл бұрын

    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

    Жыл бұрын

    Did you find the answer?

  • @onei3533

    @onei3533

    Жыл бұрын

    found a solution just use if instead switch

  • @alimishazwan3687

    @alimishazwan3687

    Жыл бұрын

    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

    Жыл бұрын

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

  • @kevinkrisdianto132

    @kevinkrisdianto132

    11 ай бұрын

    ​@@alimishazwan3687 thanks bro

  • @attruong2341
    @attruong234110 ай бұрын

    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

    10 ай бұрын

    same problem

  • @attruong2341

    @attruong2341

    10 ай бұрын

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

  • @johnk.849

    @johnk.849

    9 ай бұрын

    What do you see where the fragmentLayout is ?

  • @ThatOneKid499

    @ThatOneKid499

    9 ай бұрын

    @@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

    9 ай бұрын

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

  • @gitauyganjo7257
    @gitauyganjo7257 Жыл бұрын

    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

    Жыл бұрын

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

  • @bauerdev

    @bauerdev

    10 ай бұрын

    mine has the same error, can you help me?

  • @MrYou845
    @MrYou8452 ай бұрын

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

  • @bauerdev
    @bauerdev10 ай бұрын

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

  • @matze_5737

    @matze_5737

    10 ай бұрын

    you need to use if/else statements

  • @shortbydurgaprasad

    @shortbydurgaprasad

    10 ай бұрын

    ​@@matze_5737how

  • @devuslee3219

    @devuslee3219

    3 ай бұрын

    @@matze_5737 legendary comment. This solved my problem also

  • @Master_Ali_Coder
    @Master_Ali_Coder7 ай бұрын

    in my studio bottomNavigationView Not show Please Help

  • @idelvertyondouii5787
    @idelvertyondouii5787 Жыл бұрын

    switch required integer

  • @Nikitakaf

    @Nikitakaf

    4 ай бұрын

    Use it if

  • @user-ws4lz5lo9m
    @user-ws4lz5lo9m8 ай бұрын

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

  • @electronicaparatodos9841
    @electronicaparatodos98415 ай бұрын

    la parte de arriba del botton navigation se puede quitar

  • @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

    9 ай бұрын

    Home icon for all bottom nav items ??

  • @Jeet_Chudasma

    @Jeet_Chudasma

    9 ай бұрын

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

  • @Gustavo_788

    @Gustavo_788

    9 ай бұрын

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

  • @devspuch835

    @devspuch835

    8 ай бұрын

    @@Gustavo_788 it is beacause home icon - white.

  • @devspuch835

    @devspuch835

    8 ай бұрын

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

  • @water8garden
    @water8garden11 ай бұрын

    can't process with MainActivity- code problem

  • @johnk.849

    @johnk.849

    9 ай бұрын

    What error are you getting ?

  • @cypheron3030
    @cypheron3030 Жыл бұрын

    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

    6 ай бұрын

    you need to have a groovy gradle build had same problem

  • @Mirtguitar
    @Mirtguitar8 ай бұрын

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

  • @castero465

    @castero465

    8 ай бұрын

    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

    8 ай бұрын

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

  • @the_one_from_beyond

    @the_one_from_beyond

    2 ай бұрын

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

  • @mikaeljotsa6290
    @mikaeljotsa62909 ай бұрын

    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

    9 ай бұрын

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

  • @chosen3494
    @chosen34946 ай бұрын

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

  • @geraldjohnsotto4960

    @geraldjohnsotto4960

    5 ай бұрын

    Thanks bro

  • @user-fq9lf8fj4v
    @user-fq9lf8fj4v10 ай бұрын

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

  • @johnk.849

    @johnk.849

    9 ай бұрын

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

  • @berkeleymorrison
    @berkeleymorrison4 ай бұрын

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

  • @tobwell4701
    @tobwell47017 ай бұрын

    Could be better if you provide the scripts

  • @JSchwift

    @JSchwift

    7 ай бұрын

    This.

  • @the_one_from_beyond

    @the_one_from_beyond

    2 ай бұрын

    @@JSchwift where?

  • @Attee_Q
    @Attee_Q Жыл бұрын

    JAVA? In 2023? 🤣🤣🤣🤣🤣🤣

  • @kenny.mesquita

    @kenny.mesquita

    Жыл бұрын

    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

    Жыл бұрын

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

  • @Attee_Q

    @Attee_Q

    Жыл бұрын

    @@kenny.mesquita Time to change to Kotlin.

  • @user-xu6mq3oq7x

    @user-xu6mq3oq7x

    Жыл бұрын

    ​@@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

    Жыл бұрын

    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

    Жыл бұрын

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

  • @kamil2k111

    @kamil2k111

    Жыл бұрын

    @@leychelle thx 👍

  • @shuraj_03

    @shuraj_03

    8 ай бұрын

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

  • @castero465

    @castero465

    8 ай бұрын

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

Келесі