Questions tagged [drawerlayout]

Android's DrawerLayout acts as a top-level container for window content that allows for interactive "drawer" views to be pulled out from the edge of the window.

Android's DrawerLayout acts as a top-level container for window content that allows for interactive "drawer" views to be pulled out from the edge of the window. It is commonly known as Android Navigation Drawer.

As per the Android Design guide, any drawers positioned to the left/start should always contain content for navigating around the application, whereas any drawers positioned to the right/end should always contain actions to take on the current content. This preserves the same navigation left, actions right structure present in the Action Bar and elsewhere.

The DrawerLayout class is available in the Android Support Library (android.support.v4.widget.DrawerLayout).

Some Useful links - Official API Reference and Navigation Drawer Example

Tag Usage:

843 questions
0
votes
1 answer

DrawerLayout + ViewPager when cached

I have made ​​the app in this way: I'm trying to implement a DrawerLayout with ViewPager. Selecting an item from DrawerLayout, enters the method getItem() and according to the position selected calls a Fragment or another. In this Fragment, the…
0
votes
1 answer

Designing The ListView in DrawerLayout

I have a DrawerLayout and its working well. I'd like to have this design the one highlighted by orange. The selected item on the ListView will have this background effect. What are good approaches to attain this one. Is it a background image or is a…
rahstame
  • 2,148
  • 4
  • 23
  • 53
0
votes
1 answer

onSwipe Event is not Triggered inside a ViewPager

Please see update below I have a ViewPager, the first page(fragment) of it has a DrawerLayout that implements a SimpleOnGestureListener that listens to onSwipe event. The purpose of the onSwipe event inside the DrawerLayout(fragment) is to listen if…
rahstame
  • 2,148
  • 4
  • 23
  • 53
0
votes
1 answer

Use DrawerLayout and FlyOutContainer

I have a problem, I would like to put in my Layout the Drawer Layout and the FlyOutContainer but in the error Log it shows an error:that DrawerLayout cannot be cast to FlyOutContainer what can I do to fix this problem. I need the Drawer Layout to go…
user2286261
  • 83
  • 3
  • 10
0
votes
1 answer

Android Navigation Drawer on deeper activities

I make an app that use navigation drawer layout.I need deeper navigations which are activities. So,I make main activity that implements drawer and other activities extend that main activity.But i have a problem is that other activites does not have…
Kate
  • 11
  • 3
0
votes
2 answers

DrawerLayout on click disabled after first event

I'm trying to implement a drawer layout in my app. I follow the tutorial on android developer site and all goes fine. I have only a "little" problem: I lunch the app, open the drawer layout and click on an element of the list view and all goes…
0
votes
1 answer

Best way to hide action items related to the content view using the DrawerLayout on sub-pages

I have implemented the new DrawerLayout and want to follow the guidelines and hide menu items related to the content view when opening the menu. How can this be done on pages that are not using the ActionBarDrawerToggle? I didn't see an easy…
Christer Nordvik
  • 2,518
  • 3
  • 35
  • 52
-1
votes
1 answer

Navigation Drawer not working in Android Studio

I'm really confused about how can I implement the navigation sidebar in my app, yet I already tried it but it conflicts and it tears down my design XML if I've implemented it. The conflict is when I change my constraintLayout to DrawLayout under…
-1
votes
1 answer

Add OnClickListener to elements inside headerLayout

I am trying to make an app where you can toggle the drawer using by clicking onto an imageview, however it seems I get a nasty error everytime I set an onClickListener in the OnCreate of the main activity E/AndroidRuntime: FATAL EXCEPTION: main …
Brady Gho
  • 51
  • 5
-1
votes
1 answer

i have bottom navigation and navigation drawer and i set home screen fragment as default

i have bottom navigation and navigation drawer and i set home screen fragment as default now problem is when i run my app on Emulator hamburger icon and bottom navigation is showing and home Fragment by default when i click to hamburger icon its not…
Ankur
  • 27
  • 1
  • 7
-1
votes
1 answer

Why is my TextView not displayed correctly?

I'm explaining my problem. First of all, I wanted to let you know that I am a beginner in coding ;) I am currently creating a calculation application. The application is functional and error-free. I would now like to refine the home screen…
Matof35
  • 1
  • 1
-1
votes
1 answer

Click on DrawerLayout cause Click on Main layout

I have Activity with DrawerLayout, I implements the Click ClickListener. The problem is when the DrawerLayer is open and user click on empty area on the darwerlayout, OnClick called as if he clicked the object behind it in the main layout. I…
user93865
  • 147
  • 2
  • 15
-1
votes
1 answer

Drawer and Toolbar not showing when I add a fragment

When I add the fragment into the content_frame - I can't see the drawer (swiping doesn't help) and toolbar. When I DON'T add the fragment I can see them. What is wrong with my implementation? MainActivity…
Yosi199
  • 1,745
  • 4
  • 22
  • 47
-1
votes
1 answer

XML and NavigationView Positioning

I have made a layout in which I have created a toolbar of my own in XML and I have set the Navigation View according to my requirement. I want that after clicking the hamburger icon the topleft , navigationView content should be displayed along…
Love Babbar
  • 161
  • 4
  • 12
-1
votes
1 answer

Clash Of Clan like NavigationView Pull Arrow

I want to create a custom view which stays visible while side drawer is closed, but by pulling that, the drawer will slide. I had seen like this in very popular game Clash Of Clan like shown in below images: Now I wonder if there is any way to…
Meet Vora
  • 2,783
  • 1
  • 16
  • 33