android左侧抽屉,android界面 slidingdrawer抽屉 从左侧拉出效果

SlidingDrawer默认vertical效果为从底侧拉出。horizontal默认为从右侧拉出。而我想实现的是在左侧布局的抽屉。最后,我没能找到slidingDrawer的任何属性可以控制其变为左侧拉出。最后在一个高手的程序上做了一定的修改,实现了我想要的效果。

android:id="@+id/slidingdrawer"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="horizontal"

android:handle="@+id/handle"

android:content="@+id/content">

android:id="@id/handle"

android:layout_width="40dip"

android:layout_height="64dip"

android:background="#ff0000FF" />

android:id="@id/content"

android:layout_width="200dip"

android:layout_height="fill_parent"

android:background="#ff00FF00"

>

android:id="@+id/button1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Button"/>

android:id="@+id/editText"

android:layout_width="fill_parent"

android:layout_height="wrap_content"/>

该控件实现了从右向左拉出效果。

从左向右拉出效果,借用这个控件,写一个panel类,在这个类上实现。代码不用搞懂,只要把这个panel类导进去,学会使用就行啦。

fd52fe2c05c8047c15b6e22fe7035575.png

这是界面效果,this有响应事件。

程序下载链接:http://download.csdn.net/source/2724111

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值