You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

activity_ble_nutrition.xml 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. xmlns:tools="http://schemas.android.com/tools"
  6. android:orientation="vertical"
  7. tools:context="com.pinwang.ailinkblesdk.modules.ble_nutrition.BleNutritionActivity">
  8. <ScrollView
  9. android:layout_width="match_parent"
  10. android:layout_height="0dp"
  11. android:layout_weight="1">
  12. <LinearLayout
  13. android:layout_width="match_parent"
  14. android:layout_height="wrap_content"
  15. android:orientation="vertical">
  16. <LinearLayout
  17. android:layout_width="match_parent"
  18. android:layout_height="wrap_content"
  19. android:layout_margin="5dp"
  20. android:orientation="horizontal">
  21. <Button
  22. android:id="@+id/btn_clear"
  23. android:layout_width="wrap_content"
  24. android:layout_height="wrap_content"
  25. android:text="清空" />
  26. </LinearLayout>
  27. <View
  28. android:layout_width="match_parent"
  29. android:layout_height="1dp"
  30. android:background="?android:attr/listDivider" />
  31. <LinearLayout
  32. android:layout_width="match_parent"
  33. android:layout_height="wrap_content"
  34. android:layout_margin="5dp"
  35. android:orientation="horizontal">
  36. <Button
  37. android:id="@+id/btn_set_zero"
  38. android:layout_width="wrap_content"
  39. android:layout_height="wrap_content"
  40. android:text="去皮指令" />
  41. <Button
  42. android:id="@+id/btn_set_unit"
  43. android:layout_width="wrap_content"
  44. android:layout_height="wrap_content"
  45. android:text="设置单位" />
  46. <Button
  47. android:id="@+id/btnVoice"
  48. android:layout_width="wrap_content"
  49. android:layout_height="wrap_content"
  50. android:text="蜂鸣器开关" />
  51. </LinearLayout>
  52. <LinearLayout
  53. android:layout_width="match_parent"
  54. android:layout_height="wrap_content"
  55. android:layout_marginStart="5dp"
  56. android:orientation="horizontal">
  57. <RadioButton
  58. android:id="@+id/rb_g"
  59. android:layout_width="wrap_content"
  60. android:layout_height="wrap_content"
  61. android:checked="true"
  62. android:text="g" />
  63. <RadioButton
  64. android:id="@+id/rb_ml"
  65. android:layout_width="wrap_content"
  66. android:layout_height="wrap_content"
  67. android:text="ml" />
  68. <RadioButton
  69. android:id="@+id/rb_lb_oz"
  70. android:layout_width="wrap_content"
  71. android:layout_height="wrap_content"
  72. android:text="lb:oz" />
  73. <RadioButton
  74. android:id="@+id/rb_oz"
  75. android:layout_width="wrap_content"
  76. android:layout_height="wrap_content"
  77. android:text="oz" />
  78. <RadioButton
  79. android:id="@+id/rb_kg"
  80. android:layout_width="wrap_content"
  81. android:layout_height="wrap_content"
  82. android:text="kg" />
  83. <RadioButton
  84. android:id="@+id/rb_jin"
  85. android:layout_width="wrap_content"
  86. android:layout_height="wrap_content"
  87. android:text="斤" />
  88. </LinearLayout>
  89. <LinearLayout
  90. android:layout_width="match_parent"
  91. android:layout_height="wrap_content"
  92. android:layout_marginStart="5dp"
  93. android:orientation="horizontal">
  94. <RadioButton
  95. android:id="@+id/rb_milk_ml"
  96. android:layout_width="wrap_content"
  97. android:layout_height="wrap_content"
  98. android:text="牛奶ml" />
  99. <RadioButton
  100. android:id="@+id/rb_water_ml"
  101. android:layout_width="wrap_content"
  102. android:layout_height="wrap_content"
  103. android:text="水ml" />
  104. <RadioButton
  105. android:id="@+id/rb_milk_fl_oz"
  106. android:layout_width="wrap_content"
  107. android:layout_height="wrap_content"
  108. android:text="牛奶floz" />
  109. <RadioButton
  110. android:id="@+id/rb_water_fl_oz"
  111. android:layout_width="wrap_content"
  112. android:layout_height="wrap_content"
  113. android:text="水floz" />
  114. <RadioButton
  115. android:id="@+id/rb_lb"
  116. android:layout_width="wrap_content"
  117. android:layout_height="wrap_content"
  118. android:text="lb" />
  119. </LinearLayout>
  120. <LinearLayout
  121. android:orientation="horizontal"
  122. android:layout_width="match_parent"
  123. android:layout_height="wrap_content">
  124. <Button
  125. android:id="@+id/btnReadHistory"
  126. android:layout_width="wrap_content"
  127. android:layout_height="wrap_content"
  128. android:text="读取历史"
  129. />
  130. <Button
  131. android:id="@+id/btnClearHistory"
  132. android:layout_width="wrap_content"
  133. android:layout_height="wrap_content"
  134. android:text="清除历史"
  135. />
  136. <Button
  137. android:id="@+id/btnSynTime"
  138. android:layout_width="wrap_content"
  139. android:layout_height="wrap_content"
  140. android:text="同步时间"
  141. />
  142. </LinearLayout>
  143. </LinearLayout>
  144. </ScrollView>
  145. <View
  146. android:layout_width="match_parent"
  147. android:layout_height="1dp"
  148. android:background="?android:attr/listDivider" />
  149. <ListView
  150. android:id="@+id/list_view"
  151. android:layout_width="match_parent"
  152. android:layout_height="0dp"
  153. android:layout_weight="1" />
  154. </LinearLayout>