How to make an Android SlidingDrawer slide out from the left?
I don't think you can, other than perhaps by grabbing the SlidingDrawer
source code, making changes to it, and using your modified version. You similarly cannot make a SlidingDrawer
that descends from the top.
Android - Making Sliding Drawer to slide from Left-to-Right
Here is a tutorial on this: link
It seems that there is no positioning for sliding drawer, I can not find any layout attributes provided by the sdk. But like in the tutorial above you could write your own sliding drawer widget and apply layout attributes to position the slider/panel.
You can checkout https://github.com/umano/AndroidSlidingUpPanel
How to show the DrawerLayout when sliding from left to right, no matter where?
SlidingMenu is best sliding library I've ever found, It's very good library.
You can set getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN)
enabling fling for all screen.
Android slide menu that slide from both sides left and right
this is the one I use and does exactly what you want:
SlidingMenu
You will have to implement the button feature yourself but it shouldn't be too hard!
EDIT:
An example:
SlidingMenu menuS = new SlidingMenu(this);
menuS.setMode(SlidingMenu.LEFT_RIGHT);
menuS.setMenu(R.layout.slideout_list);
menuS.setSecondaryMenu(R.layout.slideout_list2);
As the code shows you need to set the mode to LEFT_RIGHT and must specify a layout for both the left menu (setMenu()) and the right menu (setSecondaryMenu()) along with the other options specifying menu size and shadows etc.
How to create sliding drawer in both sides opposite to one another?
I got the answer here statically its not exactly possible to create sliding ,and we cant use android:rotation=180 ,as because it will display error as no resource found, We have to create it programatically.it needs to add view in layout.
In case of single side its simple by using widget only no need any views..But the views are needed when you want to slide in multiple direction.
<SlidingDrawer
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:handle="@+id/handle"
android:content="@+id/content">
<ImageView
android:id="@+id/handle"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:src="@drawable/tag"/>
<LinearLayout
android:id="@+id/content"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="@drawable/slidimage"
android:orientation="vertical"
android:padding="10dp" >
<TextView
android:id="@+id/text1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="15dp"
android:layout_marginLeft="51dp"
android:text="SIGN-UP"
android:textColor="#000000"
android:textSize="28dp"
android:textStyle="bold" />
</LinearLayout>
</SlidingDrawer>
activity.java:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.slider);
}
Left to right and right to left android sliding panel
Your solution lies in ViewPager
. Here are a couple of links for tutorial.
Detailed Tutorial with source code and xml files
Vogella Tutorial for ViewPage
UPDATE
What you are asking about is Navigation Drawer
. You can find tons of tutorial on internet. Here are some good ones.
Android Official Tutorial
Detailed tutorial for Beginers
Hope this helps
Android SlidingDrawer from top?
The default SlidingDrawer
class doesn't allow this. You can use the Panel
class from here to get something very similar though:http://code.google.com/p/android-misc-widgets/
http://www.ohloh.net/p/android-misc-widgets
Related Topics
How to Add Buttons at Top of Map Fragment API V2 Layout
Android M Camera Intent + Permission Bug
Set the Layout Weight of a Textview Programmatically
How to Change a Tab Background Color When Using Tablayout
Actionbar - Custom View with Centered Imageview, Action Items on Sides
Android Fade in and Fade Out with Imageview
How to Add Footer to Navigationview - Android Support Design Library
How to Set Time to Device Programmatically
How to Resolve Target 'Android-Xx'
Removing Unused Strings During Proguard Optimisation
How to Generate an Md5 Checksum for a File in Android