activity_main.xml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Root: only reason to use relative is background -->
  3. <RelativeLayout
  4. android:id="@+id/root2"
  5. android:layout_width="fill_parent"
  6. android:layout_height="fill_parent"
  7. android:background="#000000"
  8. xmlns:android="http://schemas.android.com/apk/res/android"
  9. xmlns:atswidget="http://schemas.android.com/apk/res-auto"
  10. >
  11. <!-- Picture background -->
  12. <ImageView
  13. android:id="@+id/background"
  14. android:layout_width="wrap_content"
  15. android:layout_height="wrap_content"
  16. android:src="@drawable/coffee"
  17. android:background="#00000000"
  18. android:scaleType="centerCrop" />
  19. <!-- Camera background -->
  20. <SurfaceView
  21. android:id="@+id/video"
  22. android:layout_width="fill_parent"
  23. android:layout_height="fill_parent"
  24. android:visibility="invisible" />
  25. <!-- Main content: for now: graph -->
  26. <RelativeLayout
  27. android:id="@+id/achart"
  28. android:layout_width="match_parent"
  29. android:layout_height="fill_parent"
  30. android:visibility="visible"
  31. android:layout_alignParentTop="true"
  32. android:layout_alignParentBottom="true"
  33. />
  34. <!-- Installation manual
  35. <WebView xmlns:android="http://schemas.android.com/apk/res/android"
  36. android:id="@+id/installation_manual"
  37. android:visibility="invisible"
  38. android:layout_width="fill_parent"
  39. android:layout_height="fill_parent"
  40. />
  41. -->
  42. <TextView
  43. android:id="@+id/logging"
  44. android:layout_width="match_parent"
  45. android:layout_height="fill_parent"
  46. android:visibility="visible"
  47. android:textColor="#FFFFFF"
  48. android:layout_alignParentTop="true"
  49. android:layout_alignParentBottom="true"
  50. />
  51. <!-- Overlay over background ( the actual controls ) -->
  52. <RelativeLayout
  53. android:id="@+id/root"
  54. android:layout_width="fill_parent"
  55. android:layout_height="fill_parent"
  56. android:padding="16dp"
  57. >
  58. <!-- Top bar -->
  59. <RelativeLayout
  60. android:id="@+id/topbar"
  61. android:layout_width="fill_parent"
  62. android:layout_height="wrap_content"
  63. android:layout_alignParentTop="true" >
  64. <!-- Indicator / ON/OFF -->
  65. <ImageView
  66. android:id="@+id/Indicator"
  67. android:layout_width="64dp"
  68. android:layout_height="64dp"
  69. android:layout_alignParentTop="true"
  70. android:layout_alignParentRight="true"
  71. android:src="@drawable/silvia_off"
  72. android:scaleType="centerInside" />
  73. <ProgressBar
  74. android:id="@+id/progress"
  75. android:layout_width="wrap_content"
  76. android:layout_height="wrap_content"
  77. android:layout_alignParentTop="true"
  78. android:layout_alignParentRight="true"
  79. android:visibility="gone" >
  80. </ProgressBar>
  81. </RelativeLayout>
  82. <!-- Bottom bar -->
  83. <RelativeLayout
  84. android:id="@+id/bottombar"
  85. android:layout_width="wrap_content"
  86. android:layout_height="wrap_content"
  87. android:layout_alignParentBottom="true"
  88. android:layout_alignParentLeft="true" >
  89. <RelativeLayout
  90. android:id="@+id/gauges"
  91. android:layout_width="wrap_content"
  92. android:layout_height="wrap_content"
  93. android:layout_alignParentBottom="true"
  94. android:layout_alignParentLeft="true" >
  95. <nl.digitalthings.mebarista.Gauge
  96. android:id="@+id/power"
  97. android:layout_width="200dp"
  98. android:layout_height="200dp"
  99. android:layout_alignParentBottom="true"
  100. android:layout_alignParentLeft="true"
  101. android:layout_marginRight="20dp"
  102. atswidget:totalNotches="50"
  103. atswidget:incrementPerLargeNotch="20"
  104. atswidget:incrementPerSmallNotch="4"
  105. atswidget:scaleCenterValue="0"
  106. atswidget:scaleColor="0x9f004d0f"
  107. atswidget:scaleMinValue="0"
  108. atswidget:scaleMaxValue="100"
  109. atswidget:rangeOkColor="0x9f00ff00"
  110. atswidget:rangeOkMinValue="0"
  111. atswidget:rangeOkMaxValue="10"
  112. atswidget:rangeWarningColor="0x9fff8800"
  113. atswidget:rangeWarningMinValue="10"
  114. atswidget:rangeWarningMaxValue="25"
  115. atswidget:rangeErrorColor="0x9fff0000"
  116. atswidget:rangeErrorMinValue="25"
  117. atswidget:rangeErrorMaxValue="100"
  118. atswidget:unitTitle="Boiler %"
  119. atswidget:lowerTitle=""
  120. atswidget:upperTitle=""
  121. atswidget:showGauge="false"
  122. atswidget:showHand="true"
  123. atswidget:showRange="true"
  124. />
  125. <nl.digitalthings.mebarista.Gauge
  126. android:id="@+id/shottimer"
  127. android:layout_width="200dp"
  128. android:layout_height="200dp"
  129. android:layout_alignParentBottom="true"
  130. android:layout_toRightOf="@id/power"
  131. android:visibility="gone"
  132. atswidget:totalNotches="45"
  133. atswidget:incrementPerLargeNotch="5"
  134. atswidget:incrementPerSmallNotch="1"
  135. atswidget:scaleCenterValue="0"
  136. atswidget:scaleColor="0x9f004d0f"
  137. atswidget:scaleMinValue="0"
  138. atswidget:scaleMaxValue="45"
  139. atswidget:angleMinValue="0"
  140. atswidget:angleMaxValue="270"
  141. atswidget:rangeOkColor="0x9fff8800"
  142. atswidget:rangeOkMinValue="0"
  143. atswidget:rangeOkMaxValue="20"
  144. atswidget:rangeWarningColor="0x9f00ff00"
  145. atswidget:rangeWarningMinValue="20"
  146. atswidget:rangeWarningMaxValue="25"
  147. atswidget:rangeErrorColor="0x9fff0000"
  148. atswidget:rangeErrorMinValue="25"
  149. atswidget:rangeErrorMaxValue="45"
  150. atswidget:unitTitle="Shot time"
  151. atswidget:lowerTitle=""
  152. atswidget:upperTitle=""
  153. atswidget:showGauge="false"
  154. atswidget:showHand="true"
  155. atswidget:showRange="true"
  156. />
  157. </RelativeLayout>
  158. <!-- Temperature control -->
  159. <LinearLayout
  160. android:id="@+id/tempcontrol"
  161. android:orientation="vertical"
  162. android:layout_width="wrap_content"
  163. android:layout_height="wrap_content"
  164. android:layout_alignParentBottom="true"
  165. android:layout_alignParentRight="true" >
  166. <TextView
  167. android:id="@+id/BTemp"
  168. android:layout_width="fill_parent"
  169. android:layout_height="wrap_content"
  170. android:text="---,-- °"
  171. android:textSize="24sp"
  172. android:textStyle="bold"
  173. android:textColor="#FFFFFF"
  174. android:gravity="center"
  175. />
  176. <RelativeLayout
  177. android:id="@+id/tempcontrolctrls"
  178. android:layout_width="wrap_content"
  179. android:layout_height="wrap_content" >
  180. <Button
  181. android:id="@+id/MinButton"
  182. android:layout_width="52dp"
  183. android:layout_height="52dp"
  184. android:text="-"
  185. android:textSize="28sp"
  186. android:textStyle="bold"
  187. android:textColor="#FFFFFF"
  188. android:background="#B0993300"
  189. />
  190. <TextView
  191. android:id="@+id/SetPoint"
  192. android:layout_width="70dp"
  193. android:layout_height="wrap_content"
  194. android:text="---,-- °"
  195. android:textSize="14sp"
  196. android:textColor="#FFFFFF"
  197. android:editable="false"
  198. android:gravity="center"
  199. android:layout_gravity="center"
  200. android:layout_toRightOf="@id/MinButton"
  201. android:layout_centerVertical="true"
  202. android:layout_marginLeft="0dp"
  203. />
  204. <Button
  205. android:id="@+id/PlusButton"
  206. android:layout_width="52dp"
  207. android:layout_height="52dp"
  208. android:text="+"
  209. android:textSize="28sp"
  210. android:textStyle="bold"
  211. android:textColor="#FFFFFF"
  212. android:background="#B0993300"
  213. android:layout_toRightOf="@id/SetPoint"
  214. />
  215. </RelativeLayout>
  216. </LinearLayout>
  217. </RelativeLayout>
  218. </RelativeLayout>
  219. </RelativeLayout>