I had an error inside the switch. I had the idea of putting if, and it worked, thank you very much for the video
@Icaro360lol Жыл бұрын
if (item.getItemId() == R.id.menuHome) { startActivity(new Intent(getApplicationContext(), HomePage.class)); overridePendingTransition(0, 0); } if (item.getItemId() == R.id.menuEvents) { startActivity(new Intent(getApplicationContext(), Events.class)); overridePendingTransition(0, 0); } if (item.getItemId() == R.id.menuProfile) { return true; }
@wisebroadcast Жыл бұрын
Thanks. I need this video for my assignment..
@MdArif-ef1gz3 жыл бұрын
Thanks for the help, there not a single video of switching activities from navigation Menu on utube .Very clean and clear explanation. Make Videos on adding food items to cart and storing the data to firestore.
@mikkomengullo20172 жыл бұрын
Great tutorial bro, your details in explanation is very helpful ✨
@tfckiller3 жыл бұрын
this was the only video that worked for me. thanks.!!
@zohalmohebzadeh78542 жыл бұрын
Thanks a looooooot🙏🙏🙏🙏🙏♥♥♥♥♥♥♥♥♥your video helped me a looooot 😍😍😍😍god bless you🤲♥
@hadiyaaijaz71812 жыл бұрын
Your video literally helped me out in my project. God bless❤️
@1MoTimeRound Жыл бұрын
This video earned a new subscription. :)
@weonYlawea2 жыл бұрын
Gracias me ayudaste bastante saludos desde CHILE
@vasamnamitha3 жыл бұрын
Bro, I can Integrate bottom navigation with activities. But how to integrate CUSTOM bottom navigation with activities????
@D4vSG2 жыл бұрын
Thank you so much for the tutorial
@josue66672 жыл бұрын
Thanks thanks thanks , your video really relped me
@BTechDays Жыл бұрын
You're welcome
@beccabigcca2 жыл бұрын
HI i got error if i paste the bottom navigation switch case to the other two activity why? It works only for the main activity(my home page)
@beccabigcca2 жыл бұрын
after i click other activity icons it will go back to my main activity , click again, then it crashed in my emulator and the problem mentioned that Resource IDs will be non-final by default in Android Gradle Plugin version 8.0, avoid using them in switch case statements
@beccabigcca2 жыл бұрын
bottomNavigationView = findViewById(R.id.navBar); bottomNavigationView.setSelectedItemId(R.id.history); bottomNavigationView.setOnItemSelectedListener(new NavigationBarView.OnItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { case R.id.home: startActivity(new Intent(getApplicationContext(), HomePage.class)); overridePendingTransition(0, 0); return true; case R.id.profile: startActivity(new Intent(getApplicationContext(), Profile.class)); overridePendingTransition(0, 0); return true; } return false; } }); ---------------------------------------------------- This is my code and I cannot use setOnNavigationItemSelectedListener because it is deprecated
@creatorsofcreator Жыл бұрын
@@beccabigcca important thing is add your activity in manifest
@GoingOno2 жыл бұрын
What about backPressd?
@kissgergo52022 жыл бұрын
So I have a custom sliding animtion for the transition but how can I make it so the navigation bar doesn't move?
@Code_123 Жыл бұрын
Thank you sir for this
@BTechDays Жыл бұрын
Most welcome
@azizboukhchim48182 жыл бұрын
Saved my life thankssss !
@dovdover2 жыл бұрын
Great work! thanks
@vidyakini6079 Жыл бұрын
For me inside switch case not able access menu ids
@BTechDays Жыл бұрын
Check the code again.
@kavitabharti97912 жыл бұрын
Its setonNavigationItemselectedListenr function is depricated
@ROGELDominicM Жыл бұрын
how to change icon color
@proviwebApp3 жыл бұрын
you can make this video from kotlin??
@sharjeelrajput28772 жыл бұрын
can u please tell me how to handle the back pressed?
@yanni33792 жыл бұрын
Hi thank you so much for the video I'm working on an app project for school rn and have to use kotlin instead of Java do you know how to change the Java to kotlin I cant't move on from 15 minutes if there's an online converter or something?