Android tutorial (2020) - 60 - How Create BottomNavigation Bar / View / Tabs with Fragments
HTML-код
- Опубликовано: 8 сен 2024
- Hi
I am Shafaqat Ali & Welcome to My youtube channel Technical Skillz.
About this video:
This video is about android development. This is the 59th video of android development
In this video we will How Create BottomNavigation Bar / View / Tabs with Fragments android studio.
If you Like the video Press Like button and subscribe my Channel. Thank you so much.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
DISCLAIMER: This Channel DOES NOT Promote or encourage Any illegal activities, all contents provided by This Channel is meant for EDUCATIONAL PURPOSE only.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Our Social Links:
RUclips : / technicalskillz
Facebook : / bscsworld
Twitter : / bscsworld
instagram : / bscsworld
Patreom : / shafaqat
Email :bscsworld@gmail.com
#technicalskillz
#BottomNavigation
#Fragments
#BottomNavigationWithFragments
#ShafaqatAli
The only tutorial I found that actually worked. Thank you very much.
My Pleasure.
finally worked! thank you ❤
You're welcome!
Thank you very much for this. This saved my life :) if you install android studio this year 2021 then put buidle.gradle Module.app under 'com.google.android.material: material: 1.2.1' otherwise it probably won't work.
Welcome .It works for all version .
@@technicalskillz Good that works :)
Very nice easy tutorial to follow. Thanks.
Glad it was helpful!
I found a solution to a problem in your video and the method works perfectly!
Glad it helped!
nice one
Great tutorial! Thank you!
Welcome
thank you shafaqat, good tutorial
You are welcome
Thank you so much !! it helped
Glad it helped!
amazing video thank you!
Thanks Dear .For more video please subscribe Channel/
Thank you very much
You are welcome
Thanks sir, clear explanation from Brunei
My Pleasure.
Best video ever
Thanks Dear
Please update it with new Navigation component intoduced.
Thanks, i am from indonesia
I need my app like login page after login excel and word should be open and Ill work in that thn print should be taken through that Android studio app using Java and XML is this is possible
Did not understand what you mean.
bscsworld@gmail.com
Hi. I want to use app:layout_constraintBottom_toTopOf="id/@+bottomNav" in my fragments. But bottom-navigation can not be found. I've done the same as you. Any ideas?
android:layout_above="@id/bottomNav"
the "+" you have in the id shouldnt be there in a reference
Very good tutorial! Helped a lot!
Glad it helped!
How to implement onitemclicklistener inside fragment class
I am fetch data from firebase and store data in customer adapter but when i tried to implement onitemclicklistener it not work any one help me
Saved my day Thanks bro
Glad I could help
why i cant make
public boolean onNavigationItemReselected(@NonNull MenuItem item)
android always bring me to
public void onNavigationItemReselected(@NonNull MenuItem item)
i fix it, my problem in word "onNavigationItemReselected" into "onNavigationItemSelected"..
your tutorial completely work and make me understand how work your method,,
Thank's from Indonesia................
Both are different methods,if you have already clicked any items then you can call public boolean onNavigationItemReselected(@NonNull MenuItem item) method otherwise it will not work.becaseu you are not going to re select any item
@@technicalskillz thank's sir, help me about splash screen sir
Thank you!
You're welcome!
thanks from Brunei
@technical skillz keep up good work and make more video
Thank dear.
what the defrience between fragment and empty actavity?
can i create Embty actavity and link it to the bottom navigation?
ruclips.net/video/gTvbV7iWrYI/видео.html
Yes you can use.
is it pressed bottomnavigation button long time showed toast?
no
Technical Skillz Question: what if you had "Home" or "Android" going to another fragment?
You can Simply open new Activity after clicking on Android Or Home. You can Also add same Bottom navigation on that activity but that is not good way .
nice tutorial man but one thing i would like to remove the navbar for the rest of fragments
Issue with this is, if you are already in home fragment and you click home again your fragment is recreated?
You can check if saveInstanceState!=null the add new fragment .
@@technicalskillz or you can implement the reselected method:
first set it like so: bottomNavBar.setOnNavigationItemReselectedListener(navReselectedListener);
then create the new method:
private BottomNavigationView.OnNavigationItemReselectedListener navReselectedListener =
new BottomNavigationView.OnNavigationItemReselectedListener() {
@Override
public void onNavigationItemReselected(@NonNull MenuItem item) {
// do nothing here
}
};
Hope it helps.
i'm getting a blue color rectange over my navigation button with the text Search , User .. idk what went wrong can u help me how to remove that blue line and make my text to show in the middle instead of bottom?
After following step by step, I don't have the bottom icons such as search home and android appearing. Help?
bscsworld@gmail.com
How do you add activities to individual fragments?
You can check these videos to get solution:
ruclips.net/p/PLYx38U7gxBf0ppLXUk951FS_oWAjdEDXD
My android studio version is 4.0.1 , this gets installed in my phone but doesn't work
and shows "Unfortunately the app has stopped"
pls help
sen me screenshot of logcat error at bscsworld@gmail.com.I will respond you.
I have some trouble I dont understand. I have everything like you but when I run my code I see no icons in my BottomBar and the listeners are not working
why are we adding dependency of the material???
Used for For bottom Navigation
I'm having an issue where when I use the menuItem.getItemId line, I'm told the the symbol menuItem could not be resolved. Do I need to import something for this?
take a look att your "public boolean onNavigationItemSelected"
why do i have to click twice to move between fragments ? PLEASE HELP
Send me screen shot at bscsworld@gmail.com
when click, there is no transition between fragments
Follow complete video & every steps. If not works send me code screenshot at bscsworld@gmail.com
Back active bhi aata hai backs karne par
Everything is working fine but when I'm clicking icon is not getting highlighted but the fragments are changing can you please help
app:itemIconTint=""
app:itemTextColor=""
assign any color and add in xml of bottom navigation
@@technicalskillz if I use them both icon color and text color will be changed by default
What I need is when I click on the icon the color should change
change item selected color.
@@technicalskillz hmm i'll try that .thanks for your quick response 🤗
In think there is an error. The return value in the onNavigationItermSelectred in ther mainActivity should be true.: return true.
Hello bhaiya on click colour kaise change kare
Pls don't mind this
First of all you have clear your own doubt first watching this video make many confussions 😂
click to back fully close the app how to use addToBackStack click back go to home
This is strangely similar to "Coding In Flow" video. ruclips.net/video/tPV8xA7m-iw/видео.html
Thank you so much for this! It works like a charm.
However, I wanted each fragment to be loaded on app start and not reload every time user switches. I posted it on stack overflow but no one has the solution.
stackoverflow.com/questions/64269625/how-to-load-all-webview-fragments-on-app-start-and-never-reload-when-user-naviga/64269785?noredirect=1#comment113661426_64269785
Can you figure this out? since I've learned fragments in your style so it'd like to keep this style.
Thank you again.
Back kaise kare bro
I didn't understand what are you trying to say??
I have a problem, if I open project and multiple taps on home navigation bottom now press back button multiple times for go back .
Source code please
Source code?