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
16
votes
4 answers

Remove scrollbar from android support design navigation drawer?

I just updated the support design library from 22.2.1 to 23.0.1 and immediately noticed the presence of a scrollbar in the navigation drawer. I tried to use android:scrollbars="none" But that didn't fix it. Is there any other way to remove the…
16
votes
3 answers

How to remove the delay when opening an Activity with a DrawerLayout?

I have an activity with a DrawerLayout but whenever it opens there is a delay like a split-second where the screen is white then my screen is drawn. This happens after the Transition finishes. So it sort of looks like the screen animation…
John Ernest Guadalupe
  • 6,379
  • 11
  • 38
  • 71
16
votes
6 answers

Change Navigation View Item Color Dynamically Android

I'd like to build a navigation drawer where each item has a different selection color (the icon tint and text color) as the google play store has: I'm not sure how they've solved this, I think they use different activities with different drawers. I…
vigonotion
  • 1,164
  • 2
  • 10
  • 21
16
votes
2 answers
14
votes
2 answers

Moving and resizing DrawerLayout's content on sliding

I just came across this app and saw this custom animation for a DrawerLayout. I'm guessing it has to take a screenshot first, then draw a custom View in the Activity, but I'm not sure about that, nor the details. Does anyone know how to do this?
Andy Strife
  • 729
  • 1
  • 8
  • 27
14
votes
3 answers

ActionBarActivity with ActionBarDrawerToggle - Not using drawerImageRes

Working from this android example, I've attempted to create an app that uses the support version (android.support.v4 and android.support.v7). The example creates a menu drawer that looks like this and my code gets this Notice the icon is…
Ne0
  • 2,688
  • 3
  • 35
  • 49
13
votes
3 answers

Cannot resolve symbol DrawerLayout

I'm trying to implement the Navigation Drawer as shown here: http://developer.android.com/training/implementing-navigation/nav-drawer.html#top My code seems to be ok, and My minimum and target levels in my manifest match the example, but it's…
Jhorra
  • 6,233
  • 21
  • 69
  • 123
12
votes
5 answers

what should be the size of Drawer Header Image?

public DrawerProfile(Context context) { super(context); HeaderImageView = new ImageView(context); HeaderImageView.setVisibility(VISIBLE); HeaderImageView.setScaleType(ImageView.ScaleType.CENTER); …
12
votes
1 answer

Android MapView overlaps DrawerLayout

I have simple layout structure: DrawerLayout \-- FrameLayout // @+id/fragment_container \-- ListView // @+id/drawer_list By clicking of any drawer item I'm inserting/replacing fragment via FragmentTransaction.replace() into…
Oleksii K.
  • 5,359
  • 6
  • 44
  • 72
11
votes
2 answers

How to add footer buttons in NavigationView

I'm following the post "Android design library NavigationView with footer" to add buttons at the bottom of NavigationView. The problem is that only the last NavigationView appears and it's occuping the entire screen height. Here is my…
Sandro Simas
  • 1,268
  • 3
  • 21
  • 35
11
votes
3 answers

How to disable DrawerLayout Shadow

I am trying to disable the DrawerLayout shadow and i am not finding the relevant answer. can anyone please assist thanks in advance i have also tried setDrawerLayout(null,Gravity.Left) but it still does not work
upile
  • 113
  • 1
  • 5
11
votes
5 answers

DrawerLayout - Exception dispatching input event

I recently started using the DrawerLayout in a new project about a week ago and it's all working fine. Apart from the odd times when swiping it in and out with my finger it'll crash. If I use the ActionBar Up/Home MenuItem though, it'll work fine…
10
votes
6 answers

Fullscreen navigation drawer

I have a navigation drawer like this. What I want to do is open my drawer to fullscreen not half screen. How do I make this drawer to open as full screen? This is xml of drawerlayout
Shrikant
  • 579
  • 1
  • 5
  • 21
10
votes
4 answers

See navigation drawer preview

I'm designing a native navigation drawer in Android Studio. I can't see the drawer in my preview because it is sitting left of the activity, out of range of the preview. For now I'm using a testlayout.xml file to see my changes, but a lot of times I…
TomCB
  • 3,983
  • 9
  • 40
  • 66
10
votes
1 answer

Disable animation of drawer icon in double navigation drawer for right drawer

I have a Double Navigation Drawer I have two problems. 1) The navigation drawer icon on the left (3 bars) animate when opening or closing the navigation drawer on the right. 2) I do not know how to add the icon to the right and have it animate only…
clocksmith
  • 6,226
  • 3
  • 32
  • 45
1 2
3
56 57