kanytu / kanytu/android-material-drawer-template

Make Menu Icons Invisable when Navigation Drawer is open (Fragments of ViewPager)

Open
#44 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
664
Forks
208
PR merge metrics
No merged PRs in 30d

Description

Hello! First of all thank you for this great project!

I have some problems and I hope you know solution. I have MainActivity with ViewPager which had 3 Fragment. Each Fragment has there own menu items in toolbar. Inside of my MainActivity I added your beautiful Navigation drawer. I want to make menu icons in toolbar invisable when Navigation Drawer is open. (no matter what fragment open)

In your project you used it:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
if (!mNavigationDrawerFragment.isDrawerOpen()) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return false;
}
return super.onCreateOptionsMenu(menu);
}

Unfortunatly I have 3 menu files for each fragment and I am little bit comfused how to set all of them here. I experemented but I have no results. How I can fix it?

My second question is about customization of Navigation Drawer. Inside of NavigationDrawerFragment we have Navigation items list but how to add dividers between items. I want to make something like sections inside of Navigation drawer. It is little bit problematically with that list.

Thank you again for project! Have a nice day! Gob bless you!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading MainActivity and NavigationDrawerFragment, then trace how the ViewPager fragments provide their three menu files and how the navigation item list is built. Determine the project’s existing menu and drawer entry points before defining the required behavior: all fragment menu icons should be hidden while the drawer is open, and drawer sections should be visibly separated.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.