activity_main.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. android:background="#FCFCFC"
  8. tools:context=".ui.activity.MainActivity">
  9. <LinearLayout
  10. android:id="@+id/main"
  11. android:layout_width="match_parent"
  12. android:layout_height="match_parent"
  13. android:background="#FCFCFC"
  14. android:orientation="vertical"
  15. tools:layout_editor_absoluteX="-85dp"
  16. tools:layout_editor_absoluteY="82dp">
  17. <LinearLayout
  18. android:id="@+id/main_top"
  19. android:layout_width="match_parent"
  20. android:layout_height="195dp"
  21. android:orientation="horizontal">
  22. <LinearLayout
  23. android:id="@+id/head_bg"
  24. android:layout_width="match_parent"
  25. android:layout_height="match_parent"
  26. android:layout_weight="1"
  27. android:background="#028FE1"
  28. android:orientation="vertical">
  29. <TextView
  30. android:id="@+id/head_status"
  31. android:layout_width="match_parent"
  32. android:layout_height="58dp"
  33. android:layout_weight="1"
  34. android:gravity="center"
  35. android:text="心率带未连接 电量 0%"
  36. android:textColor="@color/white" />
  37. <LinearLayout
  38. android:layout_width="match_parent"
  39. android:layout_height="match_parent"
  40. android:layout_weight="1"
  41. android:orientation="horizontal">
  42. <LinearLayout
  43. android:layout_width="match_parent"
  44. android:layout_height="match_parent"
  45. android:layout_weight="1"
  46. android:orientation="vertical">
  47. <RelativeLayout
  48. android:layout_width="match_parent"
  49. android:layout_height="105dp">
  50. <TextView
  51. android:id="@+id/activLevel"
  52. android:layout_width="match_parent"
  53. android:layout_height="82dp"
  54. android:layout_weight="1"
  55. android:gravity="center"
  56. android:text="0"
  57. android:textColor="@color/white"
  58. android:textSize="50dp" />
  59. <TextView
  60. android:id="@+id/percentIcon"
  61. android:layout_width="40dp"
  62. android:layout_height="82dp"
  63. android:layout_alignParentTop="true"
  64. android:layout_alignParentRight="true"
  65. android:layout_marginTop="10dp"
  66. android:paddingLeft="10dp"
  67. android:text="%"
  68. android:textColor="@color/white"
  69. android:textSize="20dp" />
  70. </RelativeLayout>
  71. <TextView
  72. android:id="@+id/act_level_text"
  73. android:layout_width="90dp"
  74. android:layout_height="30dp"
  75. android:layout_gravity="center"
  76. android:background="@drawable/circle_btn"
  77. android:gravity="center"
  78. android:text="激活放松"
  79. android:textColor="@color/white" />
  80. </LinearLayout>
  81. <LinearLayout
  82. android:layout_width="match_parent"
  83. android:layout_height="match_parent"
  84. android:layout_weight="1"
  85. android:orientation="vertical">
  86. <ImageView
  87. android:id="@+id/imageView"
  88. android:layout_width="match_parent"
  89. android:layout_height="97dp"
  90. android:layout_centerHorizontal="true"
  91. android:gravity="center"
  92. android:src="@drawable/head" />
  93. <LinearLayout
  94. android:layout_width="match_parent"
  95. android:layout_height="match_parent"
  96. android:layout_weight="1"
  97. android:orientation="horizontal">
  98. <RelativeLayout
  99. android:layout_width="match_parent"
  100. android:layout_height="match_parent">
  101. <TextView
  102. android:id="@+id/textView10"
  103. android:layout_width="match_parent"
  104. android:layout_height="match_parent"
  105. android:layout_gravity="center"
  106. android:layout_weight="1"
  107. android:gravity="center_vertical|center"
  108. android:text="王仪涵"
  109. android:textColor="@color/white" />
  110. <ImageView
  111. android:id="@+id/sex"
  112. android:layout_width="18dp"
  113. android:layout_height="18dp"
  114. android:layout_alignParentRight="true"
  115. android:layout_gravity="center"
  116. android:layout_marginTop="25dp"
  117. android:layout_marginRight="20dp"
  118. android:gravity="center_vertical|left"
  119. android:src="@drawable/male" />
  120. </RelativeLayout>
  121. </LinearLayout>
  122. </LinearLayout>
  123. <LinearLayout
  124. android:layout_width="match_parent"
  125. android:layout_height="match_parent"
  126. android:layout_weight="1"
  127. android:orientation="vertical">
  128. <LinearLayout
  129. android:layout_width="match_parent"
  130. android:layout_height="match_parent"
  131. android:layout_weight="1"
  132. android:orientation="vertical">
  133. <RelativeLayout
  134. android:layout_width="match_parent"
  135. android:layout_height="105dp">
  136. <TextView
  137. android:id="@+id/heartReal"
  138. android:layout_width="match_parent"
  139. android:layout_height="82dp"
  140. android:layout_weight="1"
  141. android:gravity="center"
  142. android:text="0"
  143. android:textColor="@color/white"
  144. android:textSize="50dp" />
  145. <ImageView
  146. android:id="@+id/heart"
  147. android:layout_width="20dp"
  148. android:layout_height="20dp"
  149. android:layout_alignParentTop="true"
  150. android:layout_alignParentRight="true"
  151. android:layout_centerHorizontal="true"
  152. android:layout_marginTop="17dp"
  153. android:layout_marginRight="5dp"
  154. android:gravity="center"
  155. android:src="@drawable/heart" />
  156. </RelativeLayout>
  157. <TextView
  158. android:id="@+id/curentHr"
  159. android:layout_width="90dp"
  160. android:layout_height="30dp"
  161. android:layout_gravity="center"
  162. android:background="@drawable/circle_btn"
  163. android:gravity="center"
  164. android:text="瞬时心率"
  165. android:textColor="@color/white" />
  166. </LinearLayout>
  167. </LinearLayout>
  168. </LinearLayout>
  169. </LinearLayout>
  170. </LinearLayout>
  171. <include
  172. android:layout_width="match_parent"
  173. android:layout_height="match_parent"
  174. android:layout_centerHorizontal="true"
  175. android:layout_weight="1"
  176. android:layout_marginTop="20dp"
  177. layout="@layout/main_basic" />
  178. <include
  179. android:layout_width="match_parent"
  180. android:layout_height="match_parent"
  181. android:layout_centerHorizontal="true"
  182. android:layout_weight="1"
  183. android:layout_marginTop="20dp"
  184. layout="@layout/main_chart_part" />
  185. </LinearLayout>
  186. <com.google.android.material.bottomnavigation.BottomNavigationView
  187. android:id="@+id/bottomNavigation"
  188. android:layout_width="0dp"
  189. android:layout_height="50dp"
  190. android:background="#ccc"
  191. android:paddingTop="0dp"
  192. app:itemIconSize="20dp"
  193. app:labelVisibilityMode="labeled"
  194. app:layout_constraintBottom_toBottomOf="parent"
  195. app:layout_constraintLeft_toLeftOf="parent"
  196. app:layout_constraintRight_toRightOf="parent"
  197. app:menu="@menu/bottom_nav_menu" />
  198. </androidx.constraintlayout.widget.ConstraintLayout>