Android Slidingdrawer from Top

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

Android : sliding drawer from top

Refer to this library: Link

There are instructions about how to make this panel slide from top in the readme file.

Sliding drawer - how to make it pull from above?

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.

How to change android slidingdrawer handle button position

Put your handle in a RelativeLayout, and set android:layout_alignParentRight="true" on the handle.

For example like this:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content">

<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />

<SlidingDrawer android:id="@+id/drawer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:handle="@+id/handle"
android:content="@+id/content">

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/handle">
<ImageView android:src="@drawable/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true" />
</RelativeLayout>

<LinearLayout
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#aaaa00" android:id="@+id/content">
<ImageView android:src="@drawable/icon"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center">
</ImageView>
</LinearLayout>

</SlidingDrawer>

</FrameLayout>

SlidingDrawer doesn't slide over the top of ListView

Make your root a RelativeLayout, and have both the child Linear Layout and the SlidingDrawer fill_parent for height.

A LinearLayout can't have two views that overlap.

Is there a way to implement a top down sliding drawer

You can try umano's https://github.com/umano/AndroidSlidingUpPanel. Just copy it and see if it fits

Android SlidingDrawer on top of the notification bar (or toggle visibility of that one)

You cannot draw Views on top of the notification bar. You can hide it by making your application fullscreen, but that's all.



Related Topics



Leave a reply



Submit