How to place toggle button in bottom of screen in navigation drawer? - android

Hi I am working with android navigation drawer.I had created a navigation drawer in my app which handle the action with home button at the top.Now How can I change to my custom button and how can I placed the button at the left bottom of the screen.Please help me I am new to android,Thanks in advance :)

use the following two properties in Button in .xml file
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
First one will align your button to the bottom of your screen and second will set the alignment to left.

Related

is it posible to button constrained with navigation drawer on android?

I want to add button left side of navigation drawer and when navigation drawer animated left the button should be move with navigation button and constained with navigation button
You can do it programmatically with your own logic. Like you can set a listener for your NavigationDrawer and detect position of the drawer, Here is the helping link.
Then you can reposition your button by setting its margins dynamically. You can do it in this way.

Add title under the icon of navigation drawer

I want to add title under the icon that as default appears when i create the navigation drawer .
like in red border
Its not possible if you use normal ActionBarToggle, you can provide your own custom layout in toolbar and add menu icon to it but back animation will not work. Also you will have to handle click events on the menu your self

How to add Sliding Menu button below the Top of screen?

I am using ActionBarSherLock and SlidingMenu liberary to implement sliding menu.
But the problem is I want to add this sliding menu button leaving some space from top. I want the whole actionbar and this button should leave some space above. Is this Possible ? If yes How ?

Sliding drawer - how to make it pull from above?

I'm making a game for 2 players, this is a mockup, the problem is with the sliding drawer on top - purple one. The "handle" button must be exactly the opposite to blue handle below. How do I reverse it?
If the top purple drawer is a RelativeLayout, just set in the button the ALIGN_PARENT_TOP to true. If the drawer is not a RelativeLayout, declare one RelativeLayout(which fills all the purple drawer) inside it and put in it the button with ALIGN_PARENT_TOP to true.
Then, for having the text in the button upside down, just add android:rotation="180" to the button in your XML file or give the button a 180 degree rotation programatically.

Add a small tab on left drawer

I am new to android dev. I have a problem of adding a small tab on my left drawer.
Because it may be hard for user to detect that I have a left drawer so I want to add a tab to let people notice.
Here's the screenshot of my app.enter image description here
I hope it can have a small tab like this
Can you give me some hint to start?
You can just put a view on the left of your layout using relative layout and on click of that view you can just open the drawer by calling:
mDrawerLayout.openDrawer(Gravity.START)
This will open the drawer in the same way it open when action bar icon is clicked.

Categories

Resources