当前位置: 代码迷 >> Android >> Android Launcher屉子类(SlidingDrawer)的使用
  详细解决方案

Android Launcher屉子类(SlidingDrawer)的使用

热度:44   发布时间:2016-05-01 20:42:40.0
Android Launcher抽屉类(SlidingDrawer)的使用



Main.xml代码??收藏代码
  1. <?xml?version="1.0"?encoding="utf-8"?>??
  2. <LinearLayout?xmlns:android="http://schemas.android.com/apk/res/android"??
  3. ????android:layout_width="fill_parent"??
  4. ????android:layout_height="fill_parent"??
  5. ????android:orientation="vertical"??
  6. ????android:background="#808080">??
  7. <SlidingDrawer???
  8. ????android:id="@+id/sliding_drawer"??
  9. ????android:layout_width="fill_parent"??
  10. ????android:layout_height="fill_parent"??
  11. ????android:orientation="vertical"??
  12. ????android:handle="@+id/handle"??
  13. ????android:content="@+id/content"??
  14. ????>??
  15. ????<Button???
  16. ????????android:id="@+id/handle"??
  17. ????????android:layout_width="wrap_content"??
  18. ????????android:layout_height="wrap_content"??
  19. ????????android:background="@drawable/handle"??
  20. ????????/>??
  21. ????<LinearLayout???
  22. ????????android:id="@+id/content"??
  23. ????????android:layout_width="fill_parent"??
  24. ????????android:layout_height="fill_parent"??
  25. ????????android:background="#00ff00"??
  26. ????????>??
  27. ????????<Button??
  28. ????????????android:id="@+id/button"??
  29. ????????????android:layout_width="wrap_content"??
  30. ????????????android:layout_height="wrap_content"??
  31. ????????????android:text="Button"??
  32. ????????????/>??
  33. ????????<EditText???
  34. ????????????android:id="@+id/editText"??
  35. ????????????android:layout_width="fill_parent"??
  36. ????????????android:layout_height="wrap_content"??????????????
  37. ????????????/>??
  38. ????</LinearLayout>??
  39. </SlidingDrawer>??
  40. </LinearLayout>??

  相关解决方案