activity_main.xml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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:layout_alignParentStart="true"
  57. android:layout_alignParentTop="true"
  58. android:layout_marginStart="0dp"
  59. android:layout_marginTop="0dp"
  60. android:padding="16dp">
  61. <!-- Top bar -->
  62. <RelativeLayout
  63. android:id="@+id/topbar"
  64. android:layout_width="fill_parent"
  65. android:layout_height="wrap_content"
  66. android:layout_alignParentTop="true">
  67. <!-- Indicator / ON/OFF -->
  68. <ImageView
  69. android:id="@+id/Indicator"
  70. android:layout_width="64dp"
  71. android:layout_height="64dp"
  72. android:layout_alignParentTop="true"
  73. android:layout_alignParentRight="true"
  74. android:scaleType="centerInside"
  75. android:src="@drawable/silvia_off" />
  76. <ProgressBar
  77. android:id="@+id/progress"
  78. android:layout_width="wrap_content"
  79. android:layout_height="wrap_content"
  80. android:layout_alignParentTop="true"
  81. android:layout_alignParentRight="true"
  82. android:visibility="gone" >
  83. </ProgressBar>
  84. </RelativeLayout>
  85. <!-- Bottom bar -->
  86. <RelativeLayout
  87. android:id="@+id/bottombar"
  88. android:layout_width="wrap_content"
  89. android:layout_height="wrap_content"
  90. android:layout_alignParentLeft="true"
  91. android:layout_alignParentBottom="true">
  92. <RelativeLayout
  93. android:id="@+id/gauges"
  94. android:layout_width="wrap_content"
  95. android:layout_height="wrap_content"
  96. android:layout_alignParentLeft="true"
  97. android:layout_alignParentBottom="true">
  98. <nl.digitalthings.mebarista.Gauge
  99. android:id="@+id/power"
  100. android:layout_width="200dp"
  101. android:layout_height="200dp"
  102. android:layout_alignParentLeft="true"
  103. android:layout_alignParentBottom="true"
  104. android:layout_marginRight="20dp"
  105. atswidget:incrementPerLargeNotch="20"
  106. atswidget:incrementPerSmallNotch="4"
  107. atswidget:lowerTitle=""
  108. atswidget:rangeErrorColor="0x9fff0000"
  109. atswidget:rangeErrorMaxValue="100"
  110. atswidget:rangeErrorMinValue="25"
  111. atswidget:rangeOkColor="0x9f00ff00"
  112. atswidget:rangeOkMaxValue="10"
  113. atswidget:rangeOkMinValue="0"
  114. atswidget:rangeWarningColor="0x9fff8800"
  115. atswidget:rangeWarningMaxValue="25"
  116. atswidget:rangeWarningMinValue="10"
  117. atswidget:scaleCenterValue="0"
  118. atswidget:scaleColor="0x9f004d0f"
  119. atswidget:scaleMaxValue="100"
  120. atswidget:scaleMinValue="0"
  121. atswidget:showGauge="false"
  122. atswidget:showHand="true"
  123. atswidget:showRange="true"
  124. atswidget:totalNotches="50"
  125. atswidget:unitTitle="Boiler %"
  126. atswidget:upperTitle="" />
  127. <nl.digitalthings.mebarista.Gauge
  128. android:id="@+id/shottimer"
  129. android:layout_width="200dp"
  130. android:layout_height="200dp"
  131. android:layout_alignParentBottom="true"
  132. android:layout_toRightOf="@id/power"
  133. android:visibility="gone"
  134. atswidget:angleMaxValue="270"
  135. atswidget:angleMinValue="0"
  136. atswidget:incrementPerLargeNotch="5"
  137. atswidget:incrementPerSmallNotch="1"
  138. atswidget:lowerTitle=""
  139. atswidget:rangeErrorColor="0x9fff0000"
  140. atswidget:rangeErrorMaxValue="45"
  141. atswidget:rangeErrorMinValue="25"
  142. atswidget:rangeOkColor="0x9fff8800"
  143. atswidget:rangeOkMaxValue="20"
  144. atswidget:rangeOkMinValue="0"
  145. atswidget:rangeWarningColor="0x9f00ff00"
  146. atswidget:rangeWarningMaxValue="25"
  147. atswidget:rangeWarningMinValue="20"
  148. atswidget:scaleCenterValue="0"
  149. atswidget:scaleColor="0x9f004d0f"
  150. atswidget:scaleMaxValue="45"
  151. atswidget:scaleMinValue="0"
  152. atswidget:showGauge="false"
  153. atswidget:showHand="true"
  154. atswidget:showRange="true"
  155. atswidget:totalNotches="45"
  156. atswidget:unitTitle="Shot time"
  157. atswidget:upperTitle="" />
  158. </RelativeLayout>
  159. <!-- Temperature control -->
  160. <LinearLayout
  161. android:id="@+id/tempcontrol"
  162. android:layout_width="wrap_content"
  163. android:layout_height="wrap_content"
  164. android:layout_alignParentRight="true"
  165. android:layout_alignParentBottom="true"
  166. android:gravity="center_horizontal"
  167. android:orientation="vertical">
  168. <ProgressBar
  169. android:id="@+id/TempLoading"
  170. style="?android:attr/progressBarStyle"
  171. android:layout_width="50dp"
  172. android:layout_height="50dp"
  173. android:indeterminate="true"
  174. android:visibility="invisible"/>
  175. <TextView
  176. android:id="@+id/BTemp"
  177. android:layout_width="fill_parent"
  178. android:layout_height="67dp"
  179. android:gravity="center"
  180. android:text="---,-- °"
  181. android:textColor="#FFFFFF"
  182. android:textSize="24sp"
  183. android:textStyle="bold" />
  184. <RelativeLayout
  185. android:id="@+id/tempcontrolctrls"
  186. android:layout_width="wrap_content"
  187. android:layout_height="wrap_content">
  188. <Button
  189. android:id="@+id/MinButton"
  190. android:layout_width="52dp"
  191. android:layout_height="52dp"
  192. android:background="#B0993300"
  193. android:text="-"
  194. android:textColor="#FFFFFF"
  195. android:textSize="28sp"
  196. android:textStyle="bold" />
  197. <TextView
  198. android:id="@+id/SetPoint"
  199. android:layout_width="70dp"
  200. android:layout_height="wrap_content"
  201. android:layout_centerVertical="true"
  202. android:layout_gravity="center"
  203. android:layout_marginLeft="0dp"
  204. android:layout_toRightOf="@id/MinButton"
  205. android:editable="false"
  206. android:gravity="center"
  207. android:text="---,-- °"
  208. android:textColor="#FFFFFF"
  209. android:textSize="14sp" />
  210. <Button
  211. android:id="@+id/PlusButton"
  212. android:layout_width="52dp"
  213. android:layout_height="52dp"
  214. android:layout_toRightOf="@id/SetPoint"
  215. android:background="#B0993300"
  216. android:text="+"
  217. android:textColor="#FFFFFF"
  218. android:textSize="28sp"
  219. android:textStyle="bold" />
  220. </RelativeLayout>
  221. </LinearLayout>
  222. </RelativeLayout>
  223. </RelativeLayout>
  224. </RelativeLayout>