android界面 slidingdrawer抽屉 从左侧拉出效果
2010-09-28 15:02
549 查看
SlidingDrawer默认vertical效果为从底侧拉出。horizontal默认为从右侧拉出。而我想实现的是在左侧布局的抽屉。最后,我没能找到slidingDrawer的任何属性可以控制其变为左侧拉出。最后在一个高手的程序上做了一定的修改,实现了我想要的效果。
<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">
<LinearLayout
android:id="@id/handle"
android:layout_width="40dip"
android:layout_height="64dip"
android:background="#ff0000FF" />
<LinearLayout
android:id="@id/content"
android:layout_width="200dip"
android:layout_height="fill_parent"
android:background="#ff00FF00"
>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"/>
<EditText
android:id="@+id/editText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</SlidingDrawer>
该控件实现了从右向左拉出效果。
从左向右拉出效果,借用这个控件,写一个panel类,在这个类上实现。代码不用搞懂,只要把这个panel类导进去,学会使用就行啦。
这是界面效果,this有响应事件。
程序下载链接:http://download.csdn.net/source/2724111
<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">
<LinearLayout
android:id="@id/handle"
android:layout_width="40dip"
android:layout_height="64dip"
android:background="#ff0000FF" />
<LinearLayout
android:id="@id/content"
android:layout_width="200dip"
android:layout_height="fill_parent"
android:background="#ff00FF00"
>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"/>
<EditText
android:id="@+id/editText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</SlidingDrawer>
该控件实现了从右向左拉出效果。
从左向右拉出效果,借用这个控件,写一个panel类,在这个类上实现。代码不用搞懂,只要把这个panel类导进去,学会使用就行啦。
这是界面效果,this有响应事件。
程序下载链接:http://download.csdn.net/source/2724111
相关文章推荐
- android界面 slidingdrawer抽屉 从左侧拉出效果
- 【小功能4】android用SlidingDrawer实现抽拉的滑动效果(也叫抽屉)附源码
- android 抽屉效果 (SlidingDrawer)
- Android UI开发第九篇——SlidingDrawer 抽屉效果
- Android UI开发第九篇——SlidingDrawer 抽屉效果
- Android UI, GridView, ScrollView, SlidingDrawer 抽屉滑动效果
- Android UI开发第九篇——SlidingDrawer 抽屉效果
- Android Apps 滑动式抽屉(SlidingDrawer)效果
- Android UI开发第九篇——SlidingDrawer 抽屉效果
- Android 用SlidingDrawer实现抽屉效果
- Android之抽屉效果(自定义、GridView、SlidingDrawer结合)案例
- Android开发之抽屉效果及ireader书架效果--SlidingDrawer
- Android SlidingDrawer 滑动抽屉效果
- 2015.1.7,第四节课,Android控件SlidingDrawer实现抽屉效果
- Android UI开发第九篇——SlidingDrawer 抽屉效果
- android基于SlidingDrawer实现抽屉效果
- [Android界面2]——侧滑边栏(抽屉效果)
- Android之抽屉效果(自定义、GridView、SlidingDrawer结合)案例
- Android SlidingDrawer 抽屉效果的实现
- 在Android界面特效中如何做出和墨迹天气及UC中左右拖动的效果