BOTTOM NAVIGATION VIEW - Android Fundamentals

  Рет қаралды 56,185

Philipp Lackner

Philipp Lackner

Күн бұрын

Пікірлер
@manishpingale6558
@manishpingale6558 4 жыл бұрын
Great Tutorial man !!!! I am watching your every single video in this series and I AM LOVING IT!!!! Thanks For Such Valuable Content MIllions subscribers on your way.
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thanks man!
@srivastav3684
@srivastav3684 3 жыл бұрын
You have a very good knowledge plus a good voice to express it. Don't stop it brother, your views are increasing day by day. If you continue like this, your channel might hit 1 lakh subscribers in the next few months. All the best
@BrandCatalogs
@BrandCatalogs 4 жыл бұрын
New channel, yet the quality of this tutorial is gold
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thanks!!
@valarmorghulisx
@valarmorghulisx 4 жыл бұрын
You can add this implementation guys. implementation 'com.google.android.material:material:1.2.0-alpha05'
@ste1516
@ste1516 3 жыл бұрын
16:43 there are nothing to improve, your explanation is perfect
@yadude101
@yadude101 2 жыл бұрын
these are all very good tutorials, I am watching each one, but these are getting somewhat confusing, could you provide an overview at the beginning so we can see how all these files and built in functions work together? You explain what each function does but if you could further explain what each function in terms of it's relation to the other functions and lists etc. in other files at each step, it would help. Keep up the the great work! and thank you. netninja provides a good level of explanation, he may be a good model to follow?
@MCA_HimanshuSeth
@MCA_HimanshuSeth 4 жыл бұрын
Very good , now I am feeling like a developer 😁😁
@riteshgeddam3619
@riteshgeddam3619 3 жыл бұрын
how can we change the title of action bar at top , when clicked on particular icon from the bottom menu? for e.g on clicking home it should display Home instead of Tutorials, same for others too.
@MMB3245
@MMB3245 3 жыл бұрын
Hi Philipp, this is such a wonderful video. In the beginning of the video (0:16) you mentioned 'it should have at least 3 fragments.' Is there any particular reason for this? I've tested using two fragments and it seems to work fine so far. Any comment on this issue if you may?
@alejandroflorez9409
@alejandroflorez9409 3 жыл бұрын
I think it's a convention of the Material Design Standard, not about a technical reason.
@chris_rb84
@chris_rb84 4 жыл бұрын
You are my Hero! Thank you so much!
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Glad I could help!
@wowovanmbothen
@wowovanmbothen 4 жыл бұрын
Thanks for the explanation.. Btw i have a question If i want to get the data from another activity and i want use that data on my fragments (first fragment and second fragmen), should i use intent on each fragments or only use intent on the activity??
@pratikthorat3480
@pratikthorat3480 4 жыл бұрын
This right here! nothing less than divine. Thanks Philipp
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thanks!
@valarmorghulisx
@valarmorghulisx 4 жыл бұрын
İ finished it! great explaining! you are awesome!
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thank you❤️
@tanloc1273
@tanloc1273 2 жыл бұрын
since setOnNavigationItemSelectedListener is deprecated use setOnItemSelectedListener instead: binding.btNav.setOnItemSelectedListener { when(it.itemId) { R.id.miHome -> setCurrentFragment(firstFragment) R.id.miMessage -> setCurrentFragment(secondFragment) R.id.miProfile -> setCurrentFragment(thirdFragment) } true } Hope it can help you
@orbulak
@orbulak Жыл бұрын
Thanks, but do u have any solution for this? wtihout deprecation
@rabihchannel
@rabihchannel Жыл бұрын
thanks man for saving my time
@vlc5554
@vlc5554 2 жыл бұрын
Cool Information, it appreciate for a New Development !!!
@Prog10000
@Prog10000 3 жыл бұрын
Thank you very much. This is the best tutorial on this subject
@hod64
@hod64 Ай бұрын
Is there any way to make this work with the 2024 November version? I'm stuck at the 1st step: implement dependencies.
@aav42005
@aav42005 3 жыл бұрын
Thank you for a very detailed tutorial.
@DanielMaze-tr1kp
@DanielMaze-tr1kp Жыл бұрын
After i create the botton button view can i just create buttons on a created fragment and everything will show or is there another step? Im trying to create a sple menue on one of the fragments with a button
@Self_growth_and_Love
@Self_growth_and_Love 4 жыл бұрын
What if I want to set the counter based on the amount of nodes that get added to my firebase Database? Or when I add a layout to my recycler view adapter? Basically making the counter Dynamic.
@sheffomp
@sheffomp 4 жыл бұрын
Good bonus ! Great Videos so far!
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thank you!
@LaurinusPonpon
@LaurinusPonpon 3 жыл бұрын
Thanks sooooo much. So clear!
@josephgellida
@josephgellida 2 жыл бұрын
the code is little bit deprecated i cant reach the change between fragments.
@Somerandomnessvvv
@Somerandomnessvvv 3 жыл бұрын
since setOnNavigationItemSelectedListener is deprecated use setOnItemSelectedListener instead: bottomNavigationView.setOnItemSelectedListener{ when(it.itemId) { R.id.messages -> setCurrentFragment(fragSecond) R.id.profile -> setCurrentFragment(fragThird) else -> setCurrentFragment(fragFirst) } true }
@tushankdutt8954
@tushankdutt8954 2 жыл бұрын
Is this method still working buddy?
@Somerandomnessvvv
@Somerandomnessvvv 2 жыл бұрын
@Emprende Libre 'when' is not a method/function. It is part of Kotlin's conditional statements/expressions you can learn more about it here kzbin.info/www/bejne/moTWfaxjlNWDf5o Here I am using when as a statement to check every item id and set my fragments accordingly
@srini01
@srini01 4 жыл бұрын
You have recorded this video in Mar. But by now the dependencies in build.gradle file could have have been updated. From where do i get the latest dependencies. if you use the dependencies you mentioned it is showing error
@thekralj9600
@thekralj9600 3 жыл бұрын
you can just hit alt+enter and it'll find the latest version
@tomasyedid3140
@tomasyedid3140 3 жыл бұрын
Thank for the video, it helps me a lot! I have one question, i did the same as you but at the time of running the App, each time i touch an item, gets double in the screen. I start in home but when a touch another item, goes to that fragment and the homeFragment stills there. any help?
@sasidharan1937
@sasidharan1937 3 жыл бұрын
Speechless !!!
@TheImaginativeSachin
@TheImaginativeSachin 2 жыл бұрын
Hey In the fragments we added (addToBackStack) to remember the stack of fragment. I want to also synchronize the bottom navigation items with those stack. When clicking the back button only the fragment's stack is used. Is there anyway to also remember the stack of bottom navigation synchronized with the fragments while using back button? If you have answer please comments friends!!
@Anshu_nisha
@Anshu_nisha 3 жыл бұрын
I have error on bottomnavigationview.setOnItemSelectedListener in main activity why?
@android-dev
@android-dev Жыл бұрын
Could you make a video how to save fragments state when switching between them with bottom navigation bar (using xml and navigation component). It would be really helpful for beginners. Thank you!
@knflux9840
@knflux9840 Жыл бұрын
You are probably gonna want to use a ViewModel for that, I think he has some videos on that.
@bigotes20random86
@bigotes20random86 3 жыл бұрын
Thank you so much mate!! :D
@kareemkamal6185
@kareemkamal6185 3 жыл бұрын
great Tutorial man !!!
@nt1231
@nt1231 3 жыл бұрын
i Just want to add back stack in every fragments how i can ? i mean addToBackStack(null)
@Anonymous-nx9fh
@Anonymous-nx9fh 3 жыл бұрын
How can I add a coloured line below the selected item in bottom nav ?
@bharathkrishnan23
@bharathkrishnan23 4 жыл бұрын
How can we test bottom navigation using espresso
@harshaharshi7269
@harshaharshi7269 4 жыл бұрын
sir how to get the dependencies like for bottom navigation bar you have a dependency where will we get those dependency
@PhilippLackner
@PhilippLackner 4 жыл бұрын
you find them by googling
@brucebane7401
@brucebane7401 3 жыл бұрын
really informative !!!!!
@un7sh226
@un7sh226 2 жыл бұрын
Is anyone having the problem where the XML preview disappears just like in the Fragment video when we dont mention the tools:layout = "@layout/first_fragment" line in the fragment tags? if so does anyone know how to fix this problem?
@un7sh226
@un7sh226 Жыл бұрын
i fixed by downgrading the material version from 1.5.0 to 1.4.0
@ishaangupta6915
@ishaangupta6915 Жыл бұрын
u need to click on the ! icon, then again a popup from bottom will appear, then again it will show the ! icon on the bottom pain, click on it, anothe popup will appear to the right with 2 li ks highlighted in blue, click on the second one
@geraldlinao1143
@geraldlinao1143 3 жыл бұрын
Philipp are you using kotlin x is it still working kotlin x is deprecated now
@princedeka6054
@princedeka6054 3 жыл бұрын
New subscriber 😎👍
@NeitonSilva
@NeitonSilva 4 жыл бұрын
Great video!
@lara-kp7lp
@lara-kp7lp 4 жыл бұрын
How we can add recyclerview in fragment?
@jackwinter2669
@jackwinter2669 2 жыл бұрын
everything works up until 15:00
@jackwinter2669
@jackwinter2669 2 жыл бұрын
bottomNavigationView is unknown
@sujalaggrawal5481
@sujalaggrawal5481 Жыл бұрын
/Code/ package com.example.bottomnavigation import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import android.widget.Button import androidx.fragment.app.Fragment import com.google.android.material.bottomnavigation.BottomNavigationView class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) lateinit var bottomNav : BottomNavigationView var firstFragment = FirstFragment() var secondFragment = SecondFragment() var thirdFragment = ThirdFragment() setCurrentFragment(firstFragment) bottomNav = findViewById(R.id.bottomNavigationView) bottomNav.setOnItemSelectedListener { when (it.itemId) { R.id.miHome -> setCurrentFragment(firstFragment) R.id.miMessages -> setCurrentFragment(secondFragment) R.id.miProfile -> setCurrentFragment(thirdFragment) } true } bottomNav.getOrCreateBadge(R.id.miMessages).number=10 } private fun setCurrentFragment(fragment: Fragment)= supportFragmentManager.beginTransaction().apply { replace(R.id.flFragment, fragment) commit() } }
@yisun9573
@yisun9573 2 жыл бұрын
setOnNavigationItemSelectedListener is deprecated, we need to use onNavigationItemSelected
@md.imranhossain5364
@md.imranhossain5364 4 жыл бұрын
How can I move everything from main activity to Home Fragment ?
@bugra1994
@bugra1994 4 жыл бұрын
Great video! I wonder is there any chance you can upload these mini projects on GitHub so that we can copy/paste some parts?
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Thank you for the feedback! That's a good point, but sadly I don't have all the projects anymore. I think I will start with this in my next series from the beginning on
@bugra1994
@bugra1994 4 жыл бұрын
@@PhilippLackner that would be great, thank you :)
@loveshpurswani632
@loveshpurswani632 3 жыл бұрын
I don't know but the bottomNavigationView.setOnNavigationItemSelectedListener() is not working for me. it's not even coming in the auto completion. if anybody could help.
@edenlu1331
@edenlu1331 3 жыл бұрын
replace with setOnItemSelectedListener
@Marinakulichok
@Marinakulichok 4 жыл бұрын
Still can not understand diff between vector and image assets.
@bessamlegrand
@bessamlegrand 3 жыл бұрын
Wunderbar tutorial meine freund, ich liebe dich
@hari7027
@hari7027 3 жыл бұрын
Bro i have downloaded icons but when i am adding them they are not showing up instead empty square is showing up what to do
@ezcorp19
@ezcorp19 2 жыл бұрын
notice that you have icon_name_foreground and same with background, use the foreground and not the background when selecting the icon to attach
@rihanarinsi9988
@rihanarinsi9988 Жыл бұрын
in my values folder, there is no styles.xml file ..
@abhisheh2191
@abhisheh2191 11 ай бұрын
now its themes>themes.xml
@MCA_HimanshuSeth
@MCA_HimanshuSeth 4 жыл бұрын
Dear sir I got an error when I implemented the dependency com.google.android.matetial: material:1.2.0-alpha04. The error is that - DSL method not found implementation ()
@rufansdev7446
@rufansdev7446 4 жыл бұрын
implementation 'com.google.android.material:material:1.2.0-alpha04'
@mohitmahajan1947
@mohitmahajan1947 4 жыл бұрын
why don't you use jetpack navigation?
@LaBoots
@LaBoots Жыл бұрын
Because it’s cheeks
@mohitmahajan1947
@mohitmahajan1947 Жыл бұрын
@@LaBoots i changed my domain lol
@urvishbundela7826
@urvishbundela7826 4 жыл бұрын
This was awesome, but I wonder, can I use three separate activities in place of those three fragments. is that possible ? and is it easy to do so ?
@DanielMaze-tr1kp
@DanielMaze-tr1kp Жыл бұрын
wondering the same
@roerbakeitje1
@roerbakeitje1 4 жыл бұрын
Realy sorry i.m a beginner. And need help. Fragment 1 must be a webview . Must i make this is in mainactivity or in fragment 1 .XML. all the tutrorials begin with a new app. Sorry i want to understand it.
@PhilippLackner
@PhilippLackner 4 жыл бұрын
I don't really get you, but if you ask where you should put the webview, then in the fragment XML if you want it to be displayed in the fragment
@roerbakeitje1
@roerbakeitje1 4 жыл бұрын
@@PhilippLackner so if i get it now. i must first make a splash screen . Than the menu with fragments and within the fragments i must made the other stuff.
@hanadanefa7837
@hanadanefa7837 4 жыл бұрын
how can we change the name of the toolbar? everytime the bottom navigation is clicked?
@PhilippLackner
@PhilippLackner 4 жыл бұрын
You mean the title?
@hanadanefa7837
@hanadanefa7837 4 жыл бұрын
@@PhilippLackner I think it is
@hanadanefa7837
@hanadanefa7837 4 жыл бұрын
Clicked from bottom nav
@wowovanmbothen
@wowovanmbothen 4 жыл бұрын
Maybe using ActionBar.. Set the ActionBar name with the title name (for this example home/ messages/ profile).. cmiiw
@AryanvedhFromIndia
@AryanvedhFromIndia 3 жыл бұрын
implementation isnt working. showing error, has it changed since you made the video?
@yisun9573
@yisun9573 2 жыл бұрын
I find that addToBackStack can add fragment to the stack. So, is there any listener which can let me know the stack is pop out? Because I want set some status of the fragment. Or there will be some other functions? binding!!.btnFragment1.setOnClickListener{ if(state != 0){ supportFragmentManager.beginTransaction().apply { replace(R.id.flFragment, firstFragment) addToBackStack("0") commit() } } state = 0 }
@htgsniper8458
@htgsniper8458 Жыл бұрын
**********Pls help bro ******************* Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'. This is the error I'm getting while doing the projects what can I do to resolve this error i cant find any answer in stack overflow and any other sources, also tell us where can we get solutions if i get errors ?
@manshalkhatri9289
@manshalkhatri9289 Жыл бұрын
Helpful
@zerotechighqualitytutorial568
@zerotechighqualitytutorial568 2 жыл бұрын
könntest du das nicht auch alles auf deutsch machen :D sehr hilfreiches video danke dafür
@programmer4047
@programmer4047 3 жыл бұрын
Hey! You forgot to paste the dependency in the description box
@savannasullivan4443
@savannasullivan4443 4 жыл бұрын
Really useful tutorial but do you have the same tutorial for Java instead of Kotlin? Thanks
@rowenarrow
@rowenarrow 2 жыл бұрын
I was faced with this same question and decided to scrap working with Java and move onto Kotlin. I watched is Kotlin playlist and am now here on this playlist. While I took my time to get here I am happy I did and ready to move forward using Kotlin. I would suggest anyone who is at is using Java to do the same.
@hanadanefa7837
@hanadanefa7837 4 жыл бұрын
Thanks it works perfectly hahaha, i just miss the commit line sorry for that
@shreyashchoudhary7413
@shreyashchoudhary7413 3 жыл бұрын
EPIC!
@hanadanefa7837
@hanadanefa7837 4 жыл бұрын
how can we add buttons in here?
@PhilippLackner
@PhilippLackner 4 жыл бұрын
Where do you want to add them?
@hanadanefa7837
@hanadanefa7837 4 жыл бұрын
@@PhilippLackner in the fragment itself, i have a problem that encounter, the textview do not appear even that i follow your instruction, what could be the problem, i am using the latest android studio
@hanadanefa7837
@hanadanefa7837 4 жыл бұрын
@@PhilippLackner not just button but also something like recyclerviewer,
@kamyt3460
@kamyt3460 6 ай бұрын
where is dependecies?
@beeatechjs2928
@beeatechjs2928 3 жыл бұрын
good
@sahilmakkar2354
@sahilmakkar2354 3 жыл бұрын
Getting error 'setOnNavigationItemSelectedListener(BottomNavigationView.OnNavigationItemSelectedListener?): Unit' is deprecated. Deprecated in Java
@edenlu1331
@edenlu1331 3 жыл бұрын
replace it with setOnItemReselectedListener
@edenlu1331
@edenlu1331 3 жыл бұрын
*meant setOnItemSelectedListener
@carelventer1964
@carelventer1964 3 жыл бұрын
@@edenlu1331 Thank you
@Yash-jp6xh
@Yash-jp6xh 3 жыл бұрын
I wanted this video with java
@hanadanefa7837
@hanadanefa7837 4 жыл бұрын
sorry i forgot to put the commit lol
@alfian3570
@alfian3570 3 жыл бұрын
up
@ksalarang
@ksalarang 2 жыл бұрын
A comment for promotion.
@ramadhansaputra3812
@ramadhansaputra3812 Жыл бұрын
getorcreatebadge
@thijsj2128
@thijsj2128 2 жыл бұрын
Doesn't work. Don't bother
@rowenarrow
@rowenarrow 2 жыл бұрын
As of Jul 2022 I had to use binding.bottomNavigationView.setOnItemSelectedListener {} to get this to work. Hope this helps!
CREATING SWIPABLE VIEWS WITH VIEWPAGER 2 - Android Fundamentals
11:56
Philipp Lackner
Рет қаралды 68 М.
FRAGMENTS - Android Fundamentals
17:29
Philipp Lackner
Рет қаралды 339 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
ViewModels & Configuration Changes - Android Basics 2023
18:46
Philipp Lackner
Рет қаралды 137 М.
Advanced Kotlin: Mastering Delegation in Kotlin
18:54
kt whisperer
Рет қаралды 9 М.
How Do Linux Kernel Drivers Work? - Learning Resource
17:02
LiveOverflow
Рет қаралды 563 М.
6 Design Patterns Every Android Developer Must Know
14:16
Philipp Lackner
Рет қаралды 83 М.
PERMISSIONS - Android Fundamentals
19:00
Philipp Lackner
Рет қаралды 48 М.
Navigation Component | Android Jetpack | Android
17:26
Mafia Codes
Рет қаралды 50 М.
PASSING DATA BETWEEN ACTIVITIES - Android Fundamentals
18:44
Philipp Lackner
Рет қаралды 48 М.
RECYCLERVIEW - Android Fundamentals
24:58
Philipp Lackner
Рет қаралды 106 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН