103_slidingdrawer控件的使用

来源:互联网 发布:绘制流程图的软件 编辑:程序博客网 时间:2024/05/29 16:20

一、布局文件中


    <SlidingDrawer
        android:id="@+id/sd"
        android:layout_width="match_parent"
        android:layout_height="fill_parent"
        android:content="@+id/content"
        android:handle="@+id/handle"

        android:orientation="horizontal" >


        <LinearLayout          <!--  嵌套一个线性布局 ,可以让把手显示在最上方或最左边    -->
            android:id="@id/handle"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent" >


            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/ic_launcher" />
        </LinearLayout>


        <LinearLayout
            android:id="@id/content"
            android:layout_width="match_parent"
            android:layout_height="fill_parent"
            android:background="#66009900" >


            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="我是抽屉里面的内容" />
        </LinearLayout>
    </SlidingDrawer>

0 0
原创粉丝点击