• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Menu drawer didn't work

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created an activity_menu.xml as the following :

the following code is for toolbar.xml :

I want to make a navigator drawer, when i click in icon menu the navigator drawer opened
in my main activity :
   
and the following code for MenuDrawer class :


after all that, still not working the menu navigator drawer, could you please tell me what's wrong in my code
Capture-du-2019-09-09-15-17-32.png
[Thumbnail for Capture-du-2019-09-09-15-17-32.png]
Capture-du-2019-09-09-15-15-53.png
[Thumbnail for Capture-du-2019-09-09-15-15-53.png]
 
Saloon Keeper
Posts: 5765
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first screenshot indicates that the menu is being shown. So what do you mean by "still not working the menu navigator drawer"? Remember that we don't have the app in front of us to experiment.
 
Maha Sakka
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean when i click in ic_menu, the navigator drawer don't display directly, the main activity refresh and then when i click on icon the drawer navigator opened
the pic 1 is the main activity
the pic 2 when i click on icon
the pic 3 when i click another time on icon
Capture-du-2019-09-09-16-25-50.png
[Thumbnail for Capture-du-2019-09-09-16-25-50.png]
pic 1
Capture-du-2019-09-09-16-25-53.png
[Thumbnail for Capture-du-2019-09-09-16-25-53.png]
pic 2
Capture-du-2019-09-09-15-17-32.png
[Thumbnail for Capture-du-2019-09-09-15-17-32.png]
pic 3
 
Maha Sakka
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i would like to ask you if there's some thing which make the main activity fixed
 
Maha Sakka
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I choose to replace the drawer layout by a slide menu library
did you have any idea about this library "com.justkiddingbaby:slidemenu"
How can i use it
 
Tim Moores
Saloon Keeper
Posts: 5765
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personally, I wouldn't use a library that hasn't been updated since 2017. But I also wouldn't use a library just because I can't make non-library code work - I'd rather figure out why that didn't work. But we all have different pain points when it comes to not making progress with a piece of code.

That library (for which you could have posted a link to make it easier for people to help you) seems to have a demo app in the repo, so it should be easy to figure out how it works by examining its code.
 
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!