Alignment issue of the SlidingDrawer
I have created a SlidingDrawer which content the list view i want to align the handle of the SlidingDrawer at the right corner of the screen but it always align at the center ...please suggest me how to solve this problem...
<SlidingDrawer
android:gravity="right"
android:id="@+id/slidingDrawer"
android:handle="@+id/drawerHandle"
android:content="@+id/contentLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/drawerHandle"
android:text="list"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_width="wrap_content">
</Button>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/contentLayout"
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:color/black">
<ListView
android:id="@+id/list"
android:layout_wid开发者_JS百科th="fill_parent" android:layout_height="wrap_content"/>
</LinearLayout>
</SlidingDrawer>
something like this might work
<LinearLayout android:id="@+id/drawerHandle"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:background="@android:color/transparent
android:gravity="right"
>
<Button
android:text="list"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
</Button>
</LinearLayout>
精彩评论