Navigation Drawer + Bottom Navigation + Bottom Sheet Dialog in Android Studio | All in one app | UI

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ม.ค. 2025

ความคิดเห็น • 116

  • @Thanosbabua
    @Thanosbabua 6 หลายเดือนก่อน +4

    Sir others video take 20 to 30 minutes for just 1 navigation but you did all 3 in 18 minutes really sir thank you❤

  • @adarshnathaniel8520
    @adarshnathaniel8520 ปีที่แล้ว +3

    Helped me a lot. Very useful integration tutorial. Thanks a lot ❤

  • @He_is_23years_old
    @He_is_23years_old ปีที่แล้ว +6

    How can there be a chat between the client and the admin

  • @VishalGupta-zf3vd
    @VishalGupta-zf3vd 16 วันที่ผ่านมา

    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

  • @Amir-xd9le
    @Amir-xd9le 6 หลายเดือนก่อน +1

    the best tutorial I've ever seen if the navigation drawer was working

  • @netaji_subash2539
    @netaji_subash2539 ปีที่แล้ว +4

    Please do the video for nearby search in map like schools, hospitals.

  • @GeraldDelacruz-y9t
    @GeraldDelacruz-y9t ปีที่แล้ว +1

    hi my name is gerald why is that it always error in the case line?

  • @TheSalmanians786
    @TheSalmanians786 ปีที่แล้ว +1

    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.. 👌👌👌👌✌✌👏👏

  • @armxhk08
    @armxhk08 10 หลายเดือนก่อน

    How can I change the color of the currently selected item in the drawer (change that light blue to something else)?

  • @dipjyotigayan7860
    @dipjyotigayan7860 ปีที่แล้ว

    Please try to explain also...bit hard to catch up.....aswm tutorial.... help a lot 👍... thanks ....

  • @Juancito_Oficial
    @Juancito_Oficial ปีที่แล้ว

    Buenas no tienes un totorial de como colocarlo en un proyecto ya creado para integrar ese menu

  • @nielbatman
    @nielbatman 2 หลายเดือนก่อน

    please provide the actual code of this video...because the code you shared in the description has a lot of changes

  • @АльфредАхметгалеев
    @АльфредАхметгалеев ปีที่แล้ว +2

    Cool. Super. Please, you can do the same in kotlin ?

  • @spandanshrestha361
    @spandanshrestha361 ปีที่แล้ว +1

    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!

    • @android_knowledge
      @android_knowledge  ปีที่แล้ว +1

      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

    • @jessamariemangubat406
      @jessamariemangubat406 ปีที่แล้ว

      same problem, navigation drawer won't work :(

  • @kunalmemane
    @kunalmemane ปีที่แล้ว

    Can you do the same in kotlin

  • @MinhDangLe-j7i
    @MinhDangLe-j7i ปีที่แล้ว +1

    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?

  • @babraksohail6965
    @babraksohail6965 ปีที่แล้ว +4

    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 :)

  • @billionbd
    @billionbd ปีที่แล้ว +1

    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.

    • @android_knowledge
      @android_knowledge  ปีที่แล้ว +1

      You have to set item onClick listener on navigation drawer.

  • @sanjana_24
    @sanjana_24 9 หลายเดือนก่อน +1

    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
      @android_knowledge  9 หลายเดือนก่อน

      Try if else instead of switch case.

    • @sanjana_24
      @sanjana_24 9 หลายเดือนก่อน

      thanks it worked! thanks for replying@@android_knowledge

    • @sanjana_24
      @sanjana_24 9 หลายเดือนก่อน

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

  • @ammarahgangat8200
    @ammarahgangat8200 ปีที่แล้ว +1

    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

    • @andresantosribeiro2938
      @andresantosribeiro2938 ปีที่แล้ว

      também não funcionou na navigationView, apenas na BottonNavigationView

  • @kenn_obi
    @kenn_obi 6 หลายเดือนก่อน

    my floating button didn't go to center, why is that?

  • @muhammadasim6590
    @muhammadasim6590 ปีที่แล้ว

    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

  • @SemiiSun
    @SemiiSun ปีที่แล้ว

    how do i add functions to the navigation drawer. Doesnt seem to work for me

    • @android_knowledge
      @android_knowledge  ปีที่แล้ว

      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

    • @1do192
      @1do192 ปีที่แล้ว

      @@android_knowledge
      this is not easy, can you make a video on it?

    • @jaedonlam6119
      @jaedonlam6119 ปีที่แล้ว

      you might want to refer the code I posted on zahidashraf8610 comment

  • @PrakashR-y1i
    @PrakashR-y1i ปีที่แล้ว

    sir i am getting error in lamda item line can u help me please

  • @king404yt2
    @king404yt2 ปีที่แล้ว

    Sir please reply ,I follow the all step what you do but the app is shows keep stopping or close app why

  • @umiiyliabintiismail6573
    @umiiyliabintiismail6573 ปีที่แล้ว

    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🙏

    • @android_knowledge
      @android_knowledge  ปีที่แล้ว

      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.

    • @nursyafiqahmohdnor1068
      @nursyafiqahmohdnor1068 ปีที่แล้ว

      hi may i know on which class did you call the R.id?@@android_knowledge

  • @LUCKY-iq5cp
    @LUCKY-iq5cp ปีที่แล้ว

    Hey when I press back being present in a fragment the item selected in navigation drawer is not updating please reply

    • @Amir-xd9le
      @Amir-xd9le 6 หลายเดือนก่อน

      Yes. me too

  • @ChesterZamoraChelouBulldog
    @ChesterZamoraChelouBulldog 2 หลายเดือนก่อน

    Do you have KOTLIN for this?

    • @android_knowledge
      @android_knowledge  2 หลายเดือนก่อน

      Check the below video:
      th-cam.com/video/3VIzc_uhUCQ/w-d-xo.html

  • @ParkJuni-bf9ju
    @ParkJuni-bf9ju 11 หลายเดือนก่อน

    How to make bottom sheet above navigation bar?😢😢
    This example, bottom sheet above bottom..
    Thank you

  • @warrriorGoku
    @warrriorGoku ปีที่แล้ว

    plzzz upload video of nav drawer how to use that activites

  • @mervebulbul5099
    @mervebulbul5099 ปีที่แล้ว

    please helpp my floatingactionbutton doesnt come to center everything are same

    • @android_knowledge
      @android_knowledge  ปีที่แล้ว

      Add the below line:
      app:fabAlignmentMode="center"

    • @mervebulbul5099
      @mervebulbul5099 ปีที่แล้ว

      @@android_knowledge so thanks i tried now but it's still same

    • @Maverick_x-e1j
      @Maverick_x-e1j 5 หลายเดือนก่อน

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

    • @Maverick_x-e1j
      @Maverick_x-e1j 5 หลายเดือนก่อน

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

  • @zhandosmoldakhan13
    @zhandosmoldakhan13 ปีที่แล้ว +1

    very nice job
    thanks

  • @teofilobetancourt2022
    @teofilobetancourt2022 หลายเดือนก่อน

    repository please!

  • @Naymul_islam71
    @Naymul_islam71 ปีที่แล้ว

    Love from Bangladesh

  • @mohammedchahine6624
    @mohammedchahine6624 ปีที่แล้ว

    bro the drawer menu wont work except if i remove the bottom menu why?

    • @juliancastiblanco4924
      @juliancastiblanco4924 ปีที่แล้ว

      Same problem, only the bottom menu seems to work with the fragments. But really nice video, it was very helpful.

    • @andresantosribeiro2938
      @andresantosribeiro2938 ปีที่แล้ว

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

    • @jaedonlam6119
      @jaedonlam6119 ปีที่แล้ว

      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

  • @marta_na_moto
    @marta_na_moto ปีที่แล้ว

    Xml is dead it would be a good idea to show it in compose.

    • @android_knowledge
      @android_knowledge  ปีที่แล้ว

      Yes, next series will be all about jetpack compose :-)

  • @JaiminSirsath
    @JaiminSirsath 5 หลายเดือนก่อน

    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

    • @android_knowledge
      @android_knowledge  4 หลายเดือนก่อน

      Use if else instead of switch case :-)

  • @KhaiGia-t7u
    @KhaiGia-t7u ปีที่แล้ว

    src, please

  • @dianabookmadness
    @dianabookmadness ปีที่แล้ว +1

    This is so awesome, but I would appreciate if you explain what you are doing. Thank you soo much for this tutorials!

  • @B.k_Cinematic_Universe
    @B.k_Cinematic_Universe 8 หลายเดือนก่อน

    Thanks Sir ❤

  • @emmandizon6348
    @emmandizon6348 ปีที่แล้ว

    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

    • @android_knowledge
      @android_knowledge  ปีที่แล้ว +1

      Replace switch case with if statement.
      I have created a new video for it:
      th-cam.com/video/HIBO5lgsKU8/w-d-xo.html

  • @ezzeldin101
    @ezzeldin101 ปีที่แล้ว +1

    Looks amazing!

  • @nelsonguma4522
    @nelsonguma4522 11 วันที่ผ่านมา

    👍

  • @jrshe3330
    @jrshe3330 10 หลายเดือนก่อน +2

    Imagine using xml for UI

    • @hrithikvish
      @hrithikvish 9 หลายเดือนก่อน +2

      Is it not acceptable?

  • @shama____
    @shama____ 9 หลายเดือนก่อน

    🎉🎉🎉🎉

  • @zareen_kitchen
    @zareen_kitchen ปีที่แล้ว +3

    Nioceeeeee

  • @s.jaguargaming3388
    @s.jaguargaming3388 4 หลายเดือนก่อน

    🤩🤩😘😘😘

  • @kobimalaki
    @kobimalaki 5 หลายเดือนก่อน

    Thanks a lot

  • @aryogmr97
    @aryogmr97 9 หลายเดือนก่อน

    Not kotlin?

    • @android_knowledge
      @android_knowledge  9 หลายเดือนก่อน

      Check the below video in kotlin:
      th-cam.com/video/KkJb6rx0gC4/w-d-xo.html

  • @zahidashraf8610
    @zahidashraf8610 ปีที่แล้ว

    Drawer menu options not working

    • @andresantosribeiro2938
      @andresantosribeiro2938 ปีที่แล้ว +1

      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

    • @jaedonlam6119
      @jaedonlam6119 ปีที่แล้ว

      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);
      }
      }

  • @Bob-q4x6x
    @Bob-q4x6x 5 หลายเดือนก่อน

    Many steps have been omitted, and the code posted has been changed over and over again.very bad.

    • @android_knowledge
      @android_knowledge  5 หลายเดือนก่อน

      There are three codes combined, which is causing confusion. I'll take care of it next time :-)

  • @ParfaitEbohi
    @ParfaitEbohi ปีที่แล้ว

    searching for this in jetpack compose...

  • @INGames23
    @INGames23 ปีที่แล้ว +2

    the best

  • @tongxi1210
    @tongxi1210 ปีที่แล้ว

    looks good

  • @sahabuddinnjsn4431
    @sahabuddinnjsn4431 ปีที่แล้ว +2

    imaging...

  • @dananjayachathuranga7113
    @dananjayachathuranga7113 ปีที่แล้ว +2

    add voice

  • @DK_Digital_Creations
    @DK_Digital_Creations ปีที่แล้ว

    Toolbar error

  • @kevjimenez9809
    @kevjimenez9809 ปีที่แล้ว

    In kotlin

  • @amritdemax
    @amritdemax ปีที่แล้ว

    Do not make people stupid. Your all items in the navigationview werr not working. So you did not show it in demo. 😂😂😂😂😂

    • @android_knowledge
      @android_knowledge  ปีที่แล้ว

      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 :-)

    • @amritdemax
      @amritdemax ปีที่แล้ว

      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).

    • @andresantosribeiro2938
      @andresantosribeiro2938 ปีที่แล้ว +1

      @@amritdemax

    • @amritdemax
      @amritdemax ปีที่แล้ว +1

      @@andresantosribeiro2938 thanks

    • @jaedonlam6119
      @jaedonlam6119 ปีที่แล้ว

      refer to previous reply on zahidashraf8610 comment

  • @gabrielkoc2031
    @gabrielkoc2031 ปีที่แล้ว

    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

    • @android_knowledge
      @android_knowledge  ปีที่แล้ว +1

      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

    • @gabrielkoc2031
      @gabrielkoc2031 ปีที่แล้ว

      @@android_knowledge So thanks for the response I fixed it thank you very much subbed and liked

  • @j2shoes288
    @j2shoes288 6 หลายเดือนก่อน

    XML in 2023! wow!

  • @He_is_23years_old
    @He_is_23years_old ปีที่แล้ว +7

    How can there be a chat between the client and the admin | Java

  • @RonalRomeroVergel
    @RonalRomeroVergel ปีที่แล้ว +2

    Cool. Super. Please, you can do the same in kotlin ?

    • @android_knowledge
      @android_knowledge  ปีที่แล้ว +2

      Sure :-)
      Everything will be same, only MainActivity java will converted to MainActivity kt.

    • @ammarahgangat8200
      @ammarahgangat8200 ปีที่แล้ว

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

  • @semmikozod2797
    @semmikozod2797 3 หลายเดือนก่อน

    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?