开发者

Alignment issue of the SlidingDrawer

开发者 https://www.devze.com 2023-03-31 12:27 出处:网络
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

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消