Android Navigation Drawer Tutorial using Fragments – Updated

Android

Video is ready, Click Here to View ×


In this video we will see how we can create Android Navigation Drawer using Fragments. This is an updated tutorial done with the latest version of android studio.

So this Android Navigation Drawer Example will teach you creating Android Navigation Drawer in your Project.

You can also view the text tutorial and more details from this link

Android Navigation Drawer Example using Fragments

Video is ready, Click Here to View ×

43 thoughts on “Android Navigation Drawer Tutorial using Fragments – Updated

  1. i have 4 items in menu
    home
    eduwize
    ems
    notice

    but when i goto notice the text in bar changes to notice if i goto ems it changes to ems but when i return to home it stays as of last page say if i go from notice back to home it comes to home but the text remains notice

    how do i fix that?

  2. Sir, I am facing a problem while I press back button when I am in any fragment it completely close the app. I searched for the solution and the solution is using backstack implementation for back press button.

  3. Thanks great, work mine was crashing all the time after welcome screen then I saw your code for this part:
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    mine was implemented wrong.

  4. i understand all what you said here, but the one thing I dont get as I am still VERY new to android coding and java is….
    I have an existing app, actually the existing app is your SQL login tutorial. I have added the drawer to that app. How do I link the main app, once the user has logged in, to the drawer? this is what is confusing me. thanks 🙂

  5. Hey Bilal Khan!!
    thanks for sharing tuts.
    One suggestion is here if you don't mind.
    you could also override only one method in the fragment instead of Two, Like this:

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_one, null);

    Button button = view.findViewById(R.id.btn_one);
    button.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
    Toast.makeText(getContext(), "We are in the fragment one..", Toast.LENGTH_SHORT).show();
    }
    });
    return view;
    }

  6. Hello, I want to set a button on the default screen, meaning on the 1st screen after the app starts. How to do it? If I set it in the FrameLayout itself, then other layout does not load.

Leave a Reply

Your email address will not be published. Required fields are marked *