virtual_joystick.xml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="fill_parent" android:layout_height="fill_parent"
  4. android:id="@+id/virtual_joystick_layout">
  5. <!-- The black backgroud on which all the other images will be displayed. -->
  6. <ImageView android:id="@+id/black_background" android:layout_width="fill_parent"
  7. android:layout_height="fill_parent" android:src="@drawable/black_background"
  8. android:layout_centerInParent="true" />
  9. <!-- Outer ring representing the maximum magnitude. -->
  10. <ImageView android:id="@+id/outer_ring" android:layout_width="fill_parent"
  11. android:layout_height="fill_parent" android:src="@drawable/grey_ring_notched"
  12. android:layout_centerInParent="true"></ImageView>
  13. <!-- The intensity circle representing current magnitude. -->
  14. <ImageView android:id="@+id/intensity" android:src="@drawable/intensity"
  15. android:layout_width="fill_parent" android:layout_height="fill_parent"
  16. android:layout_centerInParent="true" android:antialias="true"></ImageView>
  17. <!-- Magnitude text display -->
  18. <TextView android:id="@+id/magnitude" android:layout_width="wrap_content"
  19. android:layout_height="wrap_content" android:layout_centerInParent="true"
  20. android:textSize="15px" android:text="0%" />
  21. <!-- 0 degree marker -->
  22. <ImageView android:id="@+id/widget_0_degrees" android:src="@drawable/large_d_widget_3"
  23. android:layout_width="fill_parent" android:layout_height="fill_parent"
  24. android:layout_centerInParent="true" android:antialias="true"></ImageView>
  25. <!-- 15 degree marker -->
  26. <ImageView android:id="@+id/widget_15_degrees" android:src="@drawable/small_d_widget_3"
  27. android:layout_width="fill_parent" android:layout_height="fill_parent"
  28. android:layout_centerInParent="true" android:antialias="true"
  29. android:rotation="15.0" />
  30. <!-- 30 degree marker -->
  31. <ImageView android:id="@+id/widget_30_degrees" android:src="@drawable/small_d_widget_3"
  32. android:layout_width="fill_parent" android:layout_height="fill_parent"
  33. android:layout_centerInParent="true" android:antialias="true"
  34. android:rotation="30.0" />
  35. <!-- 45 degree marker -->
  36. <ImageView android:id="@+id/widget_45_degrees" android:src="@drawable/small_d_widget_3"
  37. android:layout_width="fill_parent" android:layout_height="fill_parent"
  38. android:layout_centerInParent="true" android:antialias="true"
  39. android:rotation="45.0" />
  40. <!-- 60 degree marker -->
  41. <ImageView android:id="@+id/widget_60_degrees" android:src="@drawable/small_d_widget_3"
  42. android:layout_width="fill_parent" android:layout_height="fill_parent"
  43. android:layout_centerInParent="true" android:antialias="true"
  44. android:rotation="60.0" />
  45. <!-- 75 degree marker -->
  46. <ImageView android:id="@+id/widget_75_degrees" android:src="@drawable/small_d_widget_3"
  47. android:layout_width="fill_parent" android:layout_height="fill_parent"
  48. android:layout_centerInParent="true" android:antialias="true"
  49. android:rotation="75.0" />
  50. <!-- 90 degree marker -->
  51. <ImageView android:id="@+id/widget_90_degrees" android:src="@drawable/large_d_widget_3"
  52. android:layout_width="fill_parent" android:layout_height="fill_parent"
  53. android:layout_centerInParent="true" android:antialias="true"
  54. android:rotation="90.0" />
  55. <!-- 105 degree marker -->
  56. <ImageView android:id="@+id/widget_105_degrees" android:src="@drawable/small_d_widget_3"
  57. android:layout_width="fill_parent" android:layout_height="fill_parent"
  58. android:layout_centerInParent="true" android:antialias="true"
  59. android:rotation="105.0" />
  60. <!-- 120 degree marker -->
  61. <ImageView android:id="@+id/widget_120_degrees" android:src="@drawable/small_d_widget_3"
  62. android:layout_width="fill_parent" android:layout_height="fill_parent"
  63. android:layout_centerInParent="true" android:antialias="true"
  64. android:rotation="120.0" />
  65. <!-- 135 degree marker -->
  66. <ImageView android:id="@+id/widget_135_degrees" android:src="@drawable/small_d_widget_3"
  67. android:layout_width="fill_parent" android:layout_height="fill_parent"
  68. android:layout_centerInParent="true" android:antialias="true"
  69. android:rotation="135.0" />
  70. <!-- 150 degree marker -->
  71. <ImageView android:id="@+id/widget_150_degrees" android:src="@drawable/small_d_widget_3"
  72. android:layout_width="fill_parent" android:layout_height="fill_parent"
  73. android:layout_centerInParent="true" android:antialias="true"
  74. android:rotation="150.0" />
  75. <!-- 165 degree marker -->
  76. <ImageView android:id="@+id/widget_165_degrees" android:src="@drawable/small_d_widget_3"
  77. android:layout_width="fill_parent" android:layout_height="fill_parent"
  78. android:layout_centerInParent="true" android:antialias="true"
  79. android:rotation="165.0" />
  80. <!-- 180 degree marker -->
  81. <ImageView android:id="@+id/widget_180_degrees" android:src="@drawable/large_d_widget_3"
  82. android:layout_width="fill_parent" android:layout_height="fill_parent"
  83. android:layout_centerInParent="true" android:antialias="true"
  84. android:rotation="180.0" />
  85. <!-- 195 degree marker -->
  86. <ImageView android:id="@+id/widget_195_degrees" android:src="@drawable/small_d_widget_3"
  87. android:layout_width="fill_parent" android:layout_height="fill_parent"
  88. android:layout_centerInParent="true" android:antialias="true"
  89. android:rotation="195.0" />
  90. <!-- 210 degree marker -->
  91. <ImageView android:id="@+id/widget_210_degrees" android:src="@drawable/small_d_widget_3"
  92. android:layout_width="fill_parent" android:layout_height="fill_parent"
  93. android:layout_centerInParent="true" android:antialias="true"
  94. android:rotation="210.0" />
  95. <!-- 225 degree marker -->
  96. <ImageView android:id="@+id/widget_225_degrees" android:src="@drawable/small_d_widget_3"
  97. android:layout_width="fill_parent" android:layout_height="fill_parent"
  98. android:layout_centerInParent="true" android:antialias="true"
  99. android:rotation="225.0" />
  100. <!-- 240 degree marker -->
  101. <ImageView android:id="@+id/widget_240_degrees" android:src="@drawable/small_d_widget_3"
  102. android:layout_width="fill_parent" android:layout_height="fill_parent"
  103. android:layout_centerInParent="true" android:antialias="true"
  104. android:rotation="240.0" />
  105. <!-- 255 degree marker -->
  106. <ImageView android:id="@+id/widget_255_degrees" android:src="@drawable/small_d_widget_3"
  107. android:layout_width="fill_parent" android:layout_height="fill_parent"
  108. android:layout_centerInParent="true" android:antialias="true"
  109. android:rotation="255.0" />
  110. <!-- 270 degree marker -->
  111. <ImageView android:id="@+id/widget_270_degrees" android:src="@drawable/large_d_widget_3"
  112. android:layout_width="fill_parent" android:layout_height="fill_parent"
  113. android:layout_centerInParent="true" android:antialias="true"
  114. android:rotation="270.0" />
  115. <!-- 285 degree marker -->
  116. <ImageView android:id="@+id/widget_285_degrees" android:src="@drawable/small_d_widget_3"
  117. android:layout_width="fill_parent" android:layout_height="fill_parent"
  118. android:layout_centerInParent="true" android:antialias="true"
  119. android:rotation="285.0" />
  120. <!-- 300 degree marker -->
  121. <ImageView android:id="@+id/widget_300_degrees" android:src="@drawable/small_d_widget_3"
  122. android:layout_width="fill_parent" android:layout_height="fill_parent"
  123. android:layout_centerInParent="true" android:antialias="true"
  124. android:rotation="300.0" />
  125. <!-- 315 degree marker -->
  126. <ImageView android:id="@+id/widget_315_degrees" android:src="@drawable/small_d_widget_3"
  127. android:layout_width="fill_parent" android:layout_height="fill_parent"
  128. android:layout_centerInParent="true" android:antialias="true"
  129. android:rotation="315.0" />
  130. <!-- 330 degree marker -->
  131. <ImageView android:id="@+id/widget_330_degrees" android:src="@drawable/small_d_widget_3"
  132. android:layout_width="fill_parent" android:layout_height="fill_parent"
  133. android:layout_centerInParent="true" android:antialias="true"
  134. android:rotation="330.0" />
  135. <!-- 345 degree marker -->
  136. <ImageView android:id="@+id/widget_345_degrees" android:src="@drawable/small_d_widget_3"
  137. android:layout_width="fill_parent" android:layout_height="fill_parent"
  138. android:layout_centerInParent="true" android:antialias="true"
  139. android:rotation="345.0" />
  140. <ImageView android:id="@+id/top_angle_slice" android:layout_height="fill_parent"
  141. android:layout_width="fill_parent" android:src="@drawable/top_angle_slice"
  142. android:layout_centerInParent="true"></ImageView>
  143. <ImageView android:id="@+id/mid_angle_slice" android:layout_height="fill_parent"
  144. android:layout_width="fill_parent" android:src="@drawable/mid_angle_slice"
  145. android:layout_centerInParent="true" android:alpha="0.5"></ImageView>
  146. <!-- Previous velocity divet -->
  147. <ImageView android:id="@+id/previous_velocity_divet" android:src="@drawable/previous_velocity"
  148. android:layout_centerInParent="true" android:layout_width="wrap_content"
  149. android:layout_height="wrap_content" android:antialias="true" />
  150. <!-- The size of the center divet should always remain the same, since it's supposed
  151. to represent a deadzone that is dependent on the size of a human finger. -->
  152. <ImageView android:id="@+id/center_divet" android:layout_height="wrap_content"
  153. android:layout_width="wrap_content" android:src="@drawable/center_widget"
  154. android:layout_centerInParent="true"></ImageView>
  155. <!-- Thumb divet -->
  156. <ImageView android:id="@+id/thumb_divet" android:src="@drawable/directional_arrow"
  157. android:layout_centerInParent="true" android:layout_width="wrap_content"
  158. android:layout_height="wrap_content" android:antialias="true" />
  159. </RelativeLayout>