How to Make an Android Slidingdrawer Slide Out from the Left

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



Leave a reply



Submit