定制滑动抽屉手柄的位置

时间:2012-04-23 05:09:16

标签: java android slidingdrawer

我研究了许多来源并试过但仍然无法将手柄的位置从中心移动到右边。

    <SlidingDrawer
        content >

        <ImageButton                                  <-- this is handle
            android:id="@+id/handle"                  <-- i want to customize position
            android:layout_width="50px"
            android:layout_height="60px"
            android:background="@drawable/icon_other" />

        <LinearLayout
            android:id="@+id/content"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/background_others"
            android:orientation="vertical" >

            //content
        </LinearLayout>
    </SlidingDrawer>

那么如何自定义位置?

请发表意见。感谢

1 个答案:

答案 0 :(得分:0)

使用TableLayout。这类似于HTML表概念,允许您定义行和列,以放置按钮和其他组件。

如果您不想在整个屏幕上使用表格布局,您应该能够将布局嵌套在另一个屏幕内....