Android高手进阶教程 Android Launcher抽屉类SlidingDrawer的使用
2010-07-15 21:07:00 来源:WEB开发网/>
< /LinearLayout>
< /SlidingDrawer>
< /LinearLayout>
4.设置handle 图标的样式,在drawable 里添加handle.xml ,代码如下:
view plaincopy to clipboardprint?
< ?xml version="1.0" encoding="utf-8"?>
< selector xmlns:android="http://schemas.android.com/apk/res/android">
< item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/handle_normal" />
< item android:state_pressed="true" android:drawable="@drawable/handle_pressed" />
< item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/handle_focused" />
< item android:state_enabled="true" android:drawable="@drawable/handle_normal" />
< item android:state_focused="true" android:drawable="@drawable/handle_focused" />
< /selector>
5.运行之。将会得到如下效果:
的比较简单呵呵,如果想深入了解,大家看Launcher 源码吧!
更多精彩
赞助商链接