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

Why does my app force closes after adding a Relativelayout to a DrawerLayout in android?

I am trying to get a shadow effect to slider Listview. I am trying to put a RelativeLayout with the shadow image beneath the ListView. I have done the following in my xml file but I get force closes with the following errors. Please guide me step by…
user3509091
0
votes
1 answer

How to add a shadow effect to the ListView in the DrawerLayout?

I have a slidermenu which is generated using a listView. This Listview is placed inside a DrawerLayout. I want to add a drop shadow effect to the ListView. Can anyone tell me step by step what to do?
anu_r
  • 1,602
  • 7
  • 30
  • 61
0
votes
1 answer

How to make a view visible on clicking a row in the DrawerLayout Sliding menu?

I have generated Sliding ListView using a DrawerLayout. I want to know how to do the following things. 1. How to get the selected row id of the Slider ListView. 2. How to make a view which has some color visible on clicking or selecting the Slider …
anu_r
  • 1,602
  • 7
  • 30
  • 61
0
votes
1 answer

Prevent multiple action bar title changes when navigating with the navigation drawer

As per the Android guidelines, I implemented an ActionBarDrawerToggle that switches to the global context onDrawerOpened and a local context onDrawerClosed. This context switch involves changing the action bar items as well as the action bar title,…
theblang
  • 10,215
  • 9
  • 69
  • 120
0
votes
1 answer

Run code when navigation drawer first begins to open

I am building off of the NavigationDrawerFragment that can be auto-generated by Android Studio. It comes with functionality to show a global title and global menu (for the action bar) when the drawer is opened. It does this in an…
theblang
  • 10,215
  • 9
  • 69
  • 120
0
votes
1 answer

Expandable Navigation Drawer is not moving

I am very new to action bar sherlock and navigation drawer. I have created a simple navigation drawer. The drawer is open by default whenever the app starts, and there is no way to hide the drawer after interacting with it. What should I do, if I…
kittu88
  • 2,451
  • 5
  • 40
  • 80
0
votes
3 answers

Navigation drawer listview transparent

I have an activity with DrawerLayout and Listview as a navigation drawer:
Giorgi
  • 30,270
  • 13
  • 89
  • 125
0
votes
1 answer

Changing to DrawerLayout in Portrait Mode in Android

I've got a question. I have a fragment, which inflates two other fragments (Fragment A is left, Fragment B is right) I want to hide Fragment A when the user changes the mode to portrait-mode. I added in the layout-port/xml a DrawerLayout and added…
0
votes
4 answers

Having errors with R variables

I am getting errors on the R variables. The variables are R.id.drawer_layout, R.id.layout, and R.id.main. There is a red squiggly line under the words after id. These are all errors from R. Is there something wrong with my layout? I'm just beginning…
0
votes
3 answers

Android ListView CHOICE_MODE_SINGLE will not set

Here's an app that targets Android 4.1+. I want an active state on the listview. I am using code in other apps that I hae where this worked properly. Not sure what the difference is here (except for API version is higher). I have this Java: …
TheLettuceMaster
  • 15,594
  • 48
  • 153
  • 259
0
votes
1 answer

calling view ids in shared classe - android

Suppose I have several activities that all inherits from a same BaseActivity. I want to initialize some drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);. Each activity relies on some view as such ...#custom layout When I put…
user1611830
  • 4,749
  • 10
  • 52
  • 89
0
votes
2 answers

Android: DrawerLayout with EditText after keyboard dismissed closes app when pressing back

We have a NavigationDrawer (using DrawerLayout) which slides in from the right, this drawer has an EditText. Normally the drawer would close when the back button is pressed. However when we enter text into the EditText and dismiss the soft keyboard…
Brian
  • 1
  • 1
0
votes
1 answer

Side menu not working in inner fragments

I have drawerlayout in my application. The file structure is as follows: Class A extends ActionBarActivity Class A contains all code required for implementing Navigation Drawer. I have done that based on the link. Side menu contain a list of other…
0
votes
0 answers

Sherlock Side Navigation Drawer - call openDrawer with back button

I'm using the Sherlock Side Navigation Drawer implementation and i'd like to open the side menu by clicking on the back button, so i did: In the main activity, i overrided the onKeyDown event, and i prepared actions when keycode==KEYCODE_BACK I…
Billyjoker
  • 729
  • 1
  • 10
  • 31
0
votes
1 answer

Change Navigation Drawer with Fragments drom android.app.fragment to android.support.v4.app.fragment

Hey guys I have a question because I have implemented a Navigation Drawer in my App but I also want to have Google Maps in my App and the problem is that they use different fragment libraries. The drawer uses the android.app.fragment while maps…