Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

activity_bw05_watch.xml 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. android:orientation="vertical">
  7. <!-- 设置时间、设置阈值范围(心率、血氧、收缩、舒张压、温度)、
  8. 设置检测间隔时间、设置蓝牙名称-->
  9. <LinearLayout
  10. android:layout_width="match_parent"
  11. android:layout_height="wrap_content"
  12. android:orientation="horizontal">
  13. <EditText
  14. android:id="@+id/etMac"
  15. android:layout_width="0dp"
  16. android:layout_height="wrap_content"
  17. android:layout_weight="1"
  18. android:hint="请输入需要连接的设备MAC地址"
  19. android:paddingStart="20dp"
  20. android:inputType="textCapCharacters"
  21. android:digits="0123456789abcdefABCDEF:"
  22. android:maxLength="17"
  23. android:textSize="14dp" />
  24. <Button
  25. android:id="@+id/btnConnect"
  26. android:layout_width="wrap_content"
  27. android:layout_height="match_parent"
  28. android:text="连接" />
  29. </LinearLayout>
  30. <LinearLayout
  31. android:layout_width="match_parent"
  32. android:layout_height="wrap_content"
  33. android:layout_marginStart="10dp"
  34. android:layout_marginTop="10dp"
  35. android:orientation="horizontal">
  36. <Button
  37. android:id="@+id/btnSetTime"
  38. android:layout_width="wrap_content"
  39. android:layout_height="match_parent"
  40. android:text="设置时间" />
  41. <Button
  42. android:id="@+id/btnQueryInfo"
  43. android:layout_width="wrap_content"
  44. android:layout_height="match_parent"
  45. android:text="查询信息" />
  46. <Button
  47. android:id="@+id/btnQueryThreshold"
  48. android:layout_width="wrap_content"
  49. android:layout_height="match_parent"
  50. android:text="获取本地存储数据" />
  51. <Button
  52. android:id="@+id/btnClearLog"
  53. android:layout_width="wrap_content"
  54. android:layout_height="match_parent"
  55. android:text="清空log" />
  56. </LinearLayout>
  57. <androidx.appcompat.widget.LinearLayoutCompat
  58. android:layout_width="match_parent"
  59. android:layout_height="wrap_content"
  60. android:layout_marginTop="10dp"
  61. android:gravity="center_vertical"
  62. android:orientation="horizontal">
  63. <EditText
  64. android:id="@+id/etCheckTime"
  65. android:layout_width="0dp"
  66. android:layout_height="wrap_content"
  67. android:layout_weight="1"
  68. android:hint="检测间隔时间(分)"
  69. android:paddingStart="20dp"
  70. android:inputType="number"
  71. android:maxLength="3"
  72. android:textSize="14dp" />
  73. <CheckBox
  74. android:id="@+id/cbCheckTime"
  75. android:layout_width="wrap_content"
  76. android:layout_height="wrap_content"
  77. android:checked="true"
  78. android:text="开启/关闭测量"/>
  79. <Button
  80. android:id="@+id/btnSetCheckTime"
  81. android:layout_width="wrap_content"
  82. android:layout_height="match_parent"
  83. android:text="设置检测间隔时间" />
  84. </androidx.appcompat.widget.LinearLayoutCompat>
  85. <androidx.appcompat.widget.LinearLayoutCompat
  86. android:layout_width="match_parent"
  87. android:layout_height="wrap_content"
  88. android:layout_marginTop="10dp"
  89. android:gravity="center_vertical"
  90. android:orientation="horizontal">
  91. <EditText
  92. android:id="@+id/etBleName"
  93. android:layout_width="0dp"
  94. android:layout_height="match_parent"
  95. android:layout_weight="1"
  96. android:hint="蓝牙名称"
  97. android:paddingStart="20dp"
  98. android:inputType="text"
  99. android:textSize="14dp" />
  100. <Button
  101. android:id="@+id/btnSetBleName"
  102. android:layout_width="wrap_content"
  103. android:layout_height="match_parent"
  104. android:text="设置检测间隔时间" />
  105. </androidx.appcompat.widget.LinearLayoutCompat>
  106. <LinearLayout
  107. android:layout_width="match_parent"
  108. android:layout_height="wrap_content"
  109. android:layout_marginTop="10dp"
  110. android:gravity="center_vertical"
  111. android:orientation="horizontal">
  112. <TextView
  113. android:layout_width="wrap_content"
  114. android:layout_height="wrap_content"
  115. android:text="心率:低值" />
  116. <EditText
  117. android:id="@+id/etHrMin"
  118. android:layout_width="0dp"
  119. android:layout_height="wrap_content"
  120. android:layout_weight="1"
  121. android:gravity="center"
  122. android:hint="60"
  123. android:inputType="number"
  124. android:maxLength="3"
  125. android:textSize="14dp" />
  126. <TextView
  127. android:layout_width="wrap_content"
  128. android:layout_height="wrap_content"
  129. android:text="高值" />
  130. <EditText
  131. android:id="@+id/etHrMax"
  132. android:layout_width="0dp"
  133. android:layout_height="wrap_content"
  134. android:layout_weight="1"
  135. android:gravity="center"
  136. android:hint="120"
  137. android:inputType="number"
  138. android:maxLength="3"
  139. android:textSize="14dp" />
  140. <TextView
  141. android:layout_width="wrap_content"
  142. android:layout_height="wrap_content"
  143. android:layout_marginStart="10dp"
  144. android:text="血氧:低值" />
  145. <EditText
  146. android:id="@+id/etSpo2Min"
  147. android:layout_width="0dp"
  148. android:layout_height="wrap_content"
  149. android:layout_weight="1"
  150. android:gravity="center"
  151. android:hint="95"
  152. android:inputType="number"
  153. android:maxLength="3"
  154. android:textSize="14dp" />
  155. <TextView
  156. android:layout_width="wrap_content"
  157. android:layout_height="wrap_content"
  158. android:text="高值" />
  159. <EditText
  160. android:id="@+id/etSpo2Max"
  161. android:layout_width="0dp"
  162. android:layout_height="wrap_content"
  163. android:layout_weight="1"
  164. android:gravity="center"
  165. android:hint="100"
  166. android:inputType="number"
  167. android:maxLength="3"
  168. android:textSize="14dp" />
  169. </LinearLayout>
  170. <LinearLayout
  171. android:layout_width="match_parent"
  172. android:layout_height="wrap_content"
  173. android:layout_marginTop="10dp"
  174. android:visibility="gone"
  175. android:gravity="center_vertical"
  176. android:orientation="horizontal">
  177. <TextView
  178. android:layout_width="wrap_content"
  179. android:layout_height="wrap_content"
  180. android:text="收缩压:低值" />
  181. <EditText
  182. android:id="@+id/etSbpMin"
  183. android:layout_width="0dp"
  184. android:layout_height="wrap_content"
  185. android:layout_weight="1"
  186. android:gravity="center"
  187. android:hint="90"
  188. android:inputType="number"
  189. android:maxLength="3"
  190. android:textSize="14dp" />
  191. <TextView
  192. android:layout_width="wrap_content"
  193. android:layout_height="wrap_content"
  194. android:text="高值" />
  195. <EditText
  196. android:id="@+id/etSbpMax"
  197. android:layout_width="0dp"
  198. android:layout_height="wrap_content"
  199. android:layout_weight="1"
  200. android:gravity="center"
  201. android:hint="140"
  202. android:inputType="number"
  203. android:maxLength="3"
  204. android:textSize="14dp" />
  205. <TextView
  206. android:layout_width="wrap_content"
  207. android:layout_height="wrap_content"
  208. android:layout_marginStart="10dp"
  209. android:text="舒张压:低值" />
  210. <EditText
  211. android:id="@+id/etDbpMin"
  212. android:layout_width="0dp"
  213. android:layout_height="wrap_content"
  214. android:layout_weight="1"
  215. android:gravity="center"
  216. android:hint="60"
  217. android:inputType="number"
  218. android:maxLength="3"
  219. android:textSize="14dp" />
  220. <TextView
  221. android:layout_width="wrap_content"
  222. android:layout_height="wrap_content"
  223. android:text="高值" />
  224. <EditText
  225. android:id="@+id/etDbpMax"
  226. android:layout_width="0dp"
  227. android:layout_height="wrap_content"
  228. android:layout_weight="1"
  229. android:gravity="center"
  230. android:hint="90"
  231. android:inputType="number"
  232. android:maxLength="3"
  233. android:textSize="14dp" />
  234. </LinearLayout>
  235. <LinearLayout
  236. android:layout_width="match_parent"
  237. android:layout_height="wrap_content"
  238. android:layout_marginTop="10dp"
  239. android:gravity="center_vertical"
  240. android:orientation="horizontal">
  241. <TextView
  242. android:layout_width="wrap_content"
  243. android:layout_height="wrap_content"
  244. android:text="温度:低值" />
  245. <EditText
  246. android:id="@+id/etTempMin"
  247. android:layout_width="0dp"
  248. android:layout_height="wrap_content"
  249. android:layout_weight="1"
  250. android:gravity="center"
  251. android:hint="36.0"
  252. android:inputType="numberDecimal"
  253. android:maxLength="4"
  254. android:textSize="14dp" />
  255. <TextView
  256. android:layout_width="wrap_content"
  257. android:layout_height="wrap_content"
  258. android:text="高值" />
  259. <EditText
  260. android:id="@+id/etTempMax"
  261. android:layout_width="0dp"
  262. android:layout_height="wrap_content"
  263. android:layout_weight="1"
  264. android:gravity="center"
  265. android:hint="38.0"
  266. android:inputType="numberDecimal"
  267. android:maxLength="4"
  268. android:textSize="14dp" />
  269. <Button
  270. android:id="@+id/btnSetThreshold"
  271. android:layout_width="wrap_content"
  272. android:layout_height="wrap_content"
  273. android:layout_gravity="center"
  274. android:layout_marginStart="10dp"
  275. android:layout_marginEnd="10dp"
  276. android:text="设置阈值" />
  277. </LinearLayout>
  278. <ListView
  279. android:id="@+id/log_list"
  280. android:layout_width="match_parent"
  281. android:layout_height="wrap_content"
  282. android:layout_marginTop="10dp" />
  283. </LinearLayout>