i have a main class in which i have define navigation view and framlayout and i have included bottom navigation view but the bottom icon color is not changing
Hi Dear Please Don't Ignore My Comment please Your All Android Project And Video Source Code Upload on your Github Account Very Helpful for us and all learner..... Don't Ignore my comment please i am so thankful for you because you are so great teacher.. 👌👌👌👌✌✌👏👏
Hi. I am doing navigation drawer and bottom navigation bar. I tried using your navigation drawer only code to implement its functionality but I can 't make it work. Please help!
This was an UI video hence it's not fully functional. I have recreated a fully functional navigation drawer + bottom navigation in the below video: th-cam.com/video/HIBO5lgsKU8/w-d-xo.html
Hi. I followed everything you did until the end of the video when compiling throw Error inflating class com.google.android.material.bottomappbar.BottomAppBar. exception and crash. Any idea how to fix this?
Hi brother Could You Please Start Series of React Native (CLI) in which All topics will be covered with explanation in Easy Wording ? Eagerly Waiting for your Kind reply :)
Dear Sister, Hope you are well. I follow every of your videos and I really like them. in this video I follow every step but nav drawer link is not working. Even you did not click them to change each of them. please review all settings. Many many thanks for your hard working.
I don't know why it is showing error at my mainactivity.java in switch case part at "R.id.home" and at other id's also it is telling error: constant expression required case R.id.home: in main activity.java can you please help me I am stuck there..
@@android_knowledge I have tried making the navigation drawer functional by seeing your youtube series video but its not working can you help me by any means
mam plz reply i want a help i have learned all the android from this channel but today i stucked i want to implement slider where user upload image and text mean record and that text and image will be shown in slider and records user enter that number of sliders automatically created plz help mam i will be very thank full to you
I have created only ui design in the above video :-) To implement logic, you can refer the below link: stackoverflow.com/questions/53941123/how-to-make-navigation-drawer-and-bottom-navigation-with-the-same-app
@@android_knowledge everything worked but this part about the floating btn it's still not working it just keep on the right end side of the bottom, is there another solution?
@@android_knowledge this is the code I add for that part , should i change android:src="@drawable/baseline_add_24" to android:src="@drawable/ic_baseline_add_24" or it won't change anything? ...other code
@@juliancastiblanco4924 pelo o que pude observar todos tiveram o mesmo problema em `navigationView.setNavigationItemSelectedListener()` onde nao ha resposta ao click, apenas fecha a gaveta de navegação, seria muito util um video que mostrasse a resolução, dessa implementação junto ao do menu inferior
Because the author make the bottom menu as top layer which overlay it, supposed the slide menu and bottom menu should be the same layer. Refer the code I share below on zahidashraf8610 comment to fix. 1 month ago
Hii, I am having multiple errors for 'constant expression required' for switch case statement IDs ' plz provide me solution I am trying to solve it for past 7 days. Plz... it would so nice of you
eu acho que foi tipo pegadinha, nao vai funcionar os itens do navigationView de jeito nenhum, ja tentei de tudo, mas vou fazer mais alguns testes até conseguir, se alguém conseguir por favor salva ai
I have not added OnNavigationItemSelectedListener code, hence item won't be clickable. In my upcoming video, I'll show how to add the above code and make them clickable. Stay tuned :-)
Hi, thanks for the video. I want to ask something. At the switch case part I am having an error and it says "Constant expression required" Like public static abstract int home How can ı fix this on I searched a lot but couldn't solved please help me :) case R.id.home: replaceFragment(new HomeFragment()); break; case R.id.shorts: replaceFragment(new ShortsFragment()); break; case R.id.subscriptions: replaceFragment(new SubscriptionsFragment()); break; case R.id.library: replaceFragment(new LibraryFragment()); break; This part of the code those all id 's make error library subscriptions shorts and home
Issues: - statusbar cover the top of the app /examle cannot see the toolbar/ - FloatingActionButton not centered Could you help me please to fix these issues?
Sir others video take 20 to 30 minutes for just 1 navigation but you did all 3 in 18 minutes really sir thank you❤
Helped me a lot. Very useful integration tutorial. Thanks a lot ❤
How can there be a chat between the client and the admin
i have a main class in which i have define navigation view and framlayout and i have included bottom navigation view but the bottom icon color is not changing
the best tutorial I've ever seen if the navigation drawer was working
Please do the video for nearby search in map like schools, hospitals.
hi my name is gerald why is that it always error in the case line?
Hi Dear Please Don't Ignore My Comment
please Your All Android Project And Video Source Code Upload on your Github Account Very Helpful for us and all learner..... Don't Ignore my comment please i am so thankful for you because you are so great teacher.. 👌👌👌👌✌✌👏👏
How can I change the color of the currently selected item in the drawer (change that light blue to something else)?
Please try to explain also...bit hard to catch up.....aswm tutorial.... help a lot 👍... thanks ....
Buenas no tienes un totorial de como colocarlo en un proyecto ya creado para integrar ese menu
please provide the actual code of this video...because the code you shared in the description has a lot of changes
Cool. Super. Please, you can do the same in kotlin ?
Sure :-)
Everything will be same, only MainActivity java will converted to MainActivity kt.
@@android_knowledge and add SEARCH, TITLE . Thank you.
Hi. I am doing navigation drawer and bottom navigation bar. I tried using your navigation drawer only code to implement its functionality but I can 't make it work. Please help!
This was an UI video hence it's not fully functional.
I have recreated a fully functional navigation drawer + bottom navigation in the below video:
th-cam.com/video/HIBO5lgsKU8/w-d-xo.html
same problem, navigation drawer won't work :(
Can you do the same in kotlin
Hi. I followed everything you did until the end of the video when compiling throw Error inflating class com.google.android.material.bottomappbar.BottomAppBar. exception and crash. Any idea how to fix this?
Hi brother Could You Please Start Series of React Native (CLI) in which All topics will be covered with explanation in Easy Wording ?
Eagerly Waiting for your Kind reply :)
Dear Sister, Hope you are well. I follow every of your videos and I really like them.
in this video I follow every step but nav drawer link is not working. Even you did not click them to change each of them. please review all settings.
Many many thanks for your hard working.
You have to set item onClick listener on navigation drawer.
I don't know why it is showing error at my mainactivity.java in switch case part at "R.id.home" and at other id's also it is telling error: constant expression required
case R.id.home: in main activity.java can you please help me I am stuck there..
Try if else instead of switch case.
thanks it worked! thanks for replying@@android_knowledge
@@android_knowledge I have tried making the navigation drawer functional by seeing your youtube series video but its not working can you help me by any means
Can you please help me , I’m getting a error, fragments aren’t changing when I converted Java to kotlin , it’s stuck on home fragment
também não funcionou na navigationView, apenas na BottonNavigationView
my floating button didn't go to center, why is that?
mam plz reply i want a help i have learned all the android from this channel but today i stucked i want to implement slider where user upload image and text mean record and that text and image will be shown in slider and records user enter that number of sliders automatically created plz help mam i will be very thank full to you
how do i add functions to the navigation drawer. Doesnt seem to work for me
I have created only ui design in the above video :-)
To implement logic, you can refer the below link:
stackoverflow.com/questions/53941123/how-to-make-navigation-drawer-and-bottom-navigation-with-the-same-app
@@android_knowledge
this is not easy, can you make a video on it?
you might want to refer the code I posted on zahidashraf8610 comment
sir i am getting error in lamda item line can u help me please
Sir please reply ,I follow the all step what you do but the app is shows keep stopping or close app why
Any error captured in logcat?
Why my toolbar is error? and in case R.id i already put id from bottom menu but still error. Can you help me, please🙏
Checkpoints:
1. Make sure theme is set to no action bar.
2. Make sure you are using correct import for toolbar.
3. Try rebuild or invalidate caches.
hi may i know on which class did you call the R.id?@@android_knowledge
Hey when I press back being present in a fragment the item selected in navigation drawer is not updating please reply
Yes. me too
Do you have KOTLIN for this?
Check the below video:
th-cam.com/video/3VIzc_uhUCQ/w-d-xo.html
How to make bottom sheet above navigation bar?😢😢
This example, bottom sheet above bottom..
Thank you
plzzz upload video of nav drawer how to use that activites
please helpp my floatingactionbutton doesnt come to center everything are same
Add the below line:
app:fabAlignmentMode="center"
@@android_knowledge so thanks i tried now but it's still same
@@android_knowledge everything worked but this part about the floating btn it's still not working it just keep on the right end side of the bottom, is there another solution?
@@android_knowledge this is the code I add for that part , should i change android:src="@drawable/baseline_add_24" to android:src="@drawable/ic_baseline_add_24" or it won't change anything?
...other code
very nice job
thanks
Thank you 😊👍🏻
repository please!
Love from Bangladesh
bro the drawer menu wont work except if i remove the bottom menu why?
Same problem, only the bottom menu seems to work with the fragments. But really nice video, it was very helpful.
@@juliancastiblanco4924 pelo o que pude observar todos tiveram o mesmo problema em `navigationView.setNavigationItemSelectedListener()` onde nao ha resposta ao click, apenas fecha a gaveta de navegação, seria muito util um video que mostrasse a resolução, dessa implementação junto ao do menu inferior
Because the author make the bottom menu as top layer which overlay it, supposed the slide menu and bottom menu should be the same layer. Refer the code I share below on zahidashraf8610 comment to fix.
1 month ago
Xml is dead it would be a good idea to show it in compose.
Yes, next series will be all about jetpack compose :-)
Hii, I am having multiple errors for 'constant expression required' for switch case statement IDs ' plz provide me solution I am trying to solve it for past 7 days.
Plz... it would so nice of you
Use if else instead of switch case :-)
src, please
This is so awesome, but I would appreciate if you explain what you are doing. Thank you soo much for this tutorials!
Sure, soon :-)
Thanks Sir ❤
Pls help T.T I've got an error in switch statements in all cases, it says that constant expression required. How to fix it?? T.T
Replace switch case with if statement.
I have created a new video for it:
th-cam.com/video/HIBO5lgsKU8/w-d-xo.html
Looks amazing!
Thanks :-)
👍
Imagine using xml for UI
Is it not acceptable?
🎉🎉🎉🎉
Nioceeeeee
Thanks :-)
🤩🤩😘😘😘
Thanks a lot
Not kotlin?
Check the below video in kotlin:
th-cam.com/video/KkJb6rx0gC4/w-d-xo.html
Drawer menu options not working
eu acho que foi tipo pegadinha, nao vai funcionar os itens do navigationView de jeito nenhum, ja tentei de tudo, mas vou fazer mais alguns testes até conseguir, se alguém conseguir por favor salva ai
change your mainActivity with this, remember to rename HomepageActivity to your Activity name
package com.example.YOURAPPNAME;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import android.app.Dialog;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.Gravity;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.navigation.NavigationView;
public class HomepageActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
FloatingActionButton fab;
private DrawerLayout drawerLayout;
BottomNavigationView bottomNavigationView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_homepage);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
drawerLayout = findViewById(R.id.drawer_layout);
NavigationView navigationView = findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.open_nav,
R.string.close_nav);
drawerLayout.addDrawerListener(toggle);
toggle.syncState();
bottomNavigationView = findViewById(R.id.bottomNavigationView);
fab = findViewById(R.id.fab);
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new HomeFragment()).commit();
navigationView.setCheckedItem(R.id.nav_home);
}
replaceFragment(new HomeFragment());
bottomNavigationView.setBackground(null);
bottomNavigationView.setOnNavigationItemSelectedListener(item -> {
switch (item.getItemId()) {
case R.id.home:
replaceFragment(new HomeFragment());
break;
case R.id.shorts:
replaceFragment(new ShortsFragment());
break;
case R.id.subscriptions:
replaceFragment(new SubscriptionFragment());
break;
case R.id.library:
replaceFragment(new LibraryFragment());
break;
}
return true;
});
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showBottomDialog();
}
});
} //outside onCreate
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.nav_home:
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new HomeFragment()).commit();
break;
case R.id.nav_settings:
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new SettingFragment()).commit();
break;
case R.id.nav_share:
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new ShareFragment()).commit();
break;
case R.id.nav_about:
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new AboutFragment()).commit();
break;
case R.id.nav_logout:
Toast.makeText(this, "Logout!", Toast.LENGTH_SHORT).show();
break;
}
drawerLayout.closeDrawer(GravityCompat.START);
return true;
}
@Override
public void onBackPressed() {
if (drawerLayout.isDrawerOpen(GravityCompat.START)) {
drawerLayout.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}
private void replaceFragment(Fragment fragment) {
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.fragment_container, fragment);
fragmentTransaction.commit();
}
private void showBottomDialog() {
final Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.bottomsheetlayout);
LinearLayout videoLayout = dialog.findViewById(R.id.layoutVideo);
LinearLayout shortsLayout = dialog.findViewById(R.id.layoutShorts);
LinearLayout liveLayout = dialog.findViewById(R.id.layoutLive);
ImageView cancelButton = dialog.findViewById(R.id.cancelButton);
videoLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
Toast.makeText(HomepageActivity.this, "Upload a Video is clicked", Toast.LENGTH_SHORT).show();
}
});
shortsLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
Toast.makeText(HomepageActivity.this, "Create a short is Clicked", Toast.LENGTH_SHORT).show();
}
});
liveLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
Toast.makeText(HomepageActivity.this, "Go live is Clicked", Toast.LENGTH_SHORT).show();
}
});
cancelButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dialog.dismiss();
}
});
dialog.show();
dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation;
dialog.getWindow().setGravity(Gravity.BOTTOM);
}
}
Many steps have been omitted, and the code posted has been changed over and over again.very bad.
There are three codes combined, which is causing confusion. I'll take care of it next time :-)
searching for this in jetpack compose...
the best
Thanks :-)
looks good
imaging...
add voice
Toolbar error
In my code how to do
May I know the exact error captured in the logcat?
In kotlin
Do not make people stupid. Your all items in the navigationview werr not working. So you did not show it in demo. 😂😂😂😂😂
I have not added OnNavigationItemSelectedListener code, hence item won't be clickable.
In my upcoming video, I'll show how to add the above code and make them clickable.
Stay tuned :-)
If possible make a complete video on camera2 api. There is no any recent video on that topic in youtube. And plz use kotlin. (My personal request).
@@amritdemax
@@andresantosribeiro2938 thanks
refer to previous reply on zahidashraf8610 comment
Hi, thanks for the video. I want to ask something. At the switch case part I am having an error and it says "Constant expression required"
Like public static abstract int home How can ı fix this on I searched a lot but couldn't solved please help me :)
case R.id.home:
replaceFragment(new HomeFragment());
break;
case R.id.shorts:
replaceFragment(new ShortsFragment());
break;
case R.id.subscriptions:
replaceFragment(new SubscriptionsFragment());
break;
case R.id.library:
replaceFragment(new LibraryFragment());
break;
This part of the code those all id 's make error library subscriptions shorts and home
Instead of using switch case, use if else.
You can watch the below video for more clear instructions:
th-cam.com/video/HIBO5lgsKU8/w-d-xo.html
@@android_knowledge So thanks for the response I fixed it thank you very much subbed and liked
XML in 2023! wow!
How can there be a chat between the client and the admin | Java
Cool. Super. Please, you can do the same in kotlin ?
Sure :-)
Everything will be same, only MainActivity java will converted to MainActivity kt.
@@android_knowledge can you please share code in kotlin for the main activity ? I’m getting errors and it’s not running
When I convert 🙏🏻🙏🏻🙏🏻
Issues:
- statusbar cover the top of the app /examle cannot see the toolbar/
- FloatingActionButton not centered
Could you help me please to fix these issues?