/TheElements/res/layout/ui.xml

http://thelements.googlecode.com/ · XML · 107 lines · 82 code · 14 blank · 11 comment · 0 complexity · c149c0871c572cf4165d8ce7c3a5f575 MD5 · raw file

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:orientation="vertical"
  4. android:layout_width="fill_parent"
  5. android:layout_height="fill_parent" >
  6. <!-- Top Menu Bar (Basically moves all menu items here)-->
  7. <sand.falling.opengl.MenuBar
  8. android:id="@+id/menu_bar"
  9. android:layout_width="fill_parent"
  10. android:layout_height="45dip"
  11. android:layout_weight="0"
  12. android:background="@drawable/bg_ui_menubar"
  13. android:paddingTop="2dip">
  14. <!-- Eraser button -->
  15. <ImageButton
  16. android:id="@+id/eraser_button"
  17. android:layout_height="42dip"
  18. android:layout_width="42dip"
  19. android:layout_marginRight="4dip"
  20. android:background="@drawable/btn_mb"/>
  21. <!-- Play/Pause button -->
  22. <ImageButton
  23. android:id="@+id/play_pause_button"
  24. android:layout_height="42dip"
  25. android:layout_width="42dip"
  26. android:layout_marginRight="4dip"
  27. android:gravity="center"
  28. android:background="@drawable/btn_mb"/>
  29. <!-- Save button -->
  30. <ImageButton
  31. android:id="@+id/save_button"
  32. android:src="@+drawable/save"
  33. android:layout_height="42dip"
  34. android:layout_width="42dip"
  35. android:layout_marginRight="4dip"
  36. android:background="@drawable/btn_mb"/>
  37. <!-- Load button -->
  38. <ImageButton
  39. android:id="@+id/load_button"
  40. android:src="@+drawable/load"
  41. android:layout_height="42dip"
  42. android:layout_width="42dip"
  43. android:layout_marginRight="4dip"
  44. android:background="@drawable/btn_mb" />
  45. <!-- Load demo button -->
  46. <ImageButton
  47. android:id="@+id/load_demo_button"
  48. android:src="@+drawable/load_demo"
  49. android:layout_height="42dip"
  50. android:layout_width="42dip"
  51. android:layout_marginRight="4dip"
  52. android:background="@drawable/btn_mb"/>
  53. <!-- Exit button -->
  54. <ImageButton
  55. android:id="@+id/exit_button"
  56. android:src="@+drawable/exit"
  57. android:layout_height="42dip"
  58. android:layout_width="78dip"
  59. android:background="@drawable/btn_mb"/>
  60. </sand.falling.opengl.MenuBar>
  61. <!-- Main viewing section -->
  62. <sand.falling.opengl.SandView
  63. android:id="@+id/sand_view"
  64. android:gravity="center"
  65. android:layout_weight="1"
  66. android:layout_width="fill_parent"
  67. android:layout_height="fill_parent" />
  68. <!-- Control area (on the bottom) with a slider for brush size and button for element picker -->
  69. <sand.falling.opengl.Control
  70. android:id="@+id/control"
  71. android:background="@drawable/bg_ui_control"
  72. android:layout_width="fill_parent"
  73. android:layout_height="46dip"
  74. android:layout_weight="0"
  75. android:paddingRight="3dip">
  76. <!-- Element Picker Button -->
  77. <ImageButton
  78. android:id="@+id/element_picker_button"
  79. android:background="@drawable/btn_ui_element"
  80. android:layout_width="42dip"
  81. android:layout_margin="3dip"
  82. android:layout_gravity="center"
  83. android:layout_height="42dip" />
  84. <!-- Brush Size Seekbar -->
  85. <SeekBar
  86. android:id="@+id/brush_size_slider"
  87. android:layout_gravity="center"
  88. android:layout_weight="1"
  89. android:progressDrawable="@drawable/bg_ui_progress"
  90. android:layout_height="wrap_content"
  91. android:layout_width="wrap_content" />
  92. </sand.falling.opengl.Control>
  93. </LinearLayout>