| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613 |
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="#FCFCFC"
- tools:context=".ui.activity.MainActivity">
- <LinearLayout
- android:id="@+id/main"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="#FCFCFC"
- android:orientation="vertical"
- tools:layout_editor_absoluteX="-85dp"
- tools:layout_editor_absoluteY="82dp">
- <LinearLayout
- android:id="@+id/main_top"
- android:layout_width="match_parent"
- android:layout_height="195dp"
- android:orientation="horizontal">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:background="#028FE1"
- android:orientation="vertical">
- <TextView
- android:id="@+id/textView3"
- android:layout_width="match_parent"
- android:layout_height="58dp"
- android:layout_weight="1"
- android:gravity="center"
- android:text="心率带已连接 电量 39%"
- android:textColor="@color/white" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="horizontal">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="105dp">
- <TextView
- android:id="@+id/textView5"
- android:layout_width="match_parent"
- android:layout_height="82dp"
- android:layout_weight="1"
- android:gravity="center"
- android:text="38"
- android:textColor="@color/white"
- android:textSize="50dp" />
- <TextView
- android:id="@+id/percentIcon"
- android:layout_width="40dp"
- android:layout_height="82dp"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:text="%"
- android:textColor="@color/white"
- android:textSize="20dp" />
- </RelativeLayout>
- <TextView
- android:id="@+id/textView8"
- android:layout_width="90dp"
- android:layout_height="30dp"
- android:layout_gravity="center"
- android:background="@drawable/circle_btn"
- android:gravity="center"
- android:text="激活放松"
- android:textColor="@color/white" />
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical">
- <ImageView
- android:id="@+id/imageView"
- android:layout_width="match_parent"
- android:layout_height="97dp"
- android:layout_centerHorizontal="true"
- android:gravity="center"
- android:src="@drawable/head" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="horizontal">
- <TextView
- android:id="@+id/textView10"
- android:layout_width="100dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:gravity="center_vertical|right"
- android:text="王仪涵"
- android:textColor="@color/white" />
- <ImageView
- android:id="@+id/sex"
- android:layout_width="38dp"
- android:layout_height="18dp"
- android:layout_weight="1"
- android:layout_centerHorizontal="true"
- android:gravity="center"
- android:layout_gravity="center"
- android:src="@drawable/male" />
- </LinearLayout>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="105dp">
- <TextView
- android:id="@+id/heartReal"
- android:layout_width="match_parent"
- android:layout_height="82dp"
- android:layout_weight="1"
- android:gravity="center"
- android:text="38"
- android:textColor="@color/white"
- android:textSize="50dp" />
- <ImageView
- android:id="@+id/heart"
- android:layout_width="20dp"
- android:layout_height="20dp"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="17dp"
- android:layout_marginRight="15dp"
- android:gravity="center"
- android:src="@drawable/heart" />
- </RelativeLayout>
- <TextView
- android:id="@+id/curentHr"
- android:layout_width="90dp"
- android:layout_height="30dp"
- android:layout_gravity="center"
- android:background="@drawable/circle_btn"
- android:gravity="center"
- android:text="瞬时心率"
- android:textColor="@color/white" />
- </LinearLayout>
- </LinearLayout>
- </LinearLayout>
- </LinearLayout>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="70dp"
- android:gravity="center"
- android:orientation="vertical">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:background="#fff"
- android:orientation="horizontal">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="horizontal">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
- <TextView
- android:id="@+id/textView13"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:text="0"
- android:textColor="#000"
- android:textSize="29dp" />
- <TextView
- android:id="@+id/textView14"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:text="身高cm"
- android:textColor="#C4C4C4" />
- </LinearLayout>
- </LinearLayout>
- <View
- android:layout_width="1dip"
- android:layout_height="40dp"
- android:layout_gravity="center"
- android:background="#E2E2E2" />
- <LinearLayout
- android:id="@+id/main_middle"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="horizontal">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="131dp"
- android:orientation="vertical">
- <TextView
- android:id="@+id/textView15"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:text="0"
- android:textColor="#000"
- android:textSize="29dp" />
- <TextView
- android:id="@+id/textView16"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:text="年龄"
- android:textColor="#C4C4C4" />
- </LinearLayout>
- </LinearLayout>
- <View
- android:layout_width="1dip"
- android:layout_height="40dp"
- android:layout_gravity="center"
- android:background="#E2E2E2" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="horizontal">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
- <TextView
- android:id="@+id/textView17"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:text="0"
- android:textColor="#000"
- android:textSize="29dp" />
- <TextView
- android:id="@+id/textView18"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:text="体重kg"
- android:textColor="#C4C4C4" />
- </LinearLayout>
- </LinearLayout>
- <View
- android:layout_width="1dip"
- android:layout_height="40dp"
- android:layout_gravity="center"
- android:background="#E2E2E2" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="horizontal">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
- <TextView
- android:id="@+id/textView19"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:text="0"
- android:textColor="#000"
- android:textSize="29dp" />
- <TextView
- android:id="@+id/textView20"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:text="静息心率"
- android:textColor="#C4C4C4" />
- </LinearLayout>
- </LinearLayout>
- </LinearLayout>
- </LinearLayout>
- <LinearLayout
- android:id="@+id/contectPart"
- android:layout_width="wrap_content"
- android:layout_height="49dp"
- android:layout_gravity="center"
- android:orientation="horizontal">
- <ImageView
- android:id="@+id/chain"
- android:layout_width="20dp"
- android:layout_height="20dp"
- android:layout_centerHorizontal="true"
- android:layout_gravity="center"
- android:gravity="center"
- android:src="@drawable/chain" />
- <TextView
- android:id="@+id/unchain"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_marginLeft="15dp"
- android:gravity="center"
- android:text="心率带未连接"
- android:textColor="#FF4040"
- android:textSize="14dp" />
- <Button
- android:id="@+id/chainBtn"
- android:layout_width="90dp"
- android:layout_height="24dp"
- android:layout_gravity="center"
- android:layout_marginLeft="15dp"
- android:layout_weight="1"
- android:background="@drawable/btn_contect"
- android:text="点击连接" />
- </LinearLayout>
- <LinearLayout
- android:id="@+id/main_bottom"
- android:layout_width="match_parent"
- android:layout_height="98dp"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:background="#fff"
- android:orientation="horizontal">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="86dp"
- android:layout_weight="10"
- android:orientation="vertical">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="70dp"
- android:orientation="horizontal">
- <ImageView
- android:id="@+id/fire"
- android:layout_width="match_parent"
- android:layout_height="82dp"
- android:layout_gravity="center"
- android:layout_weight="1"
- android:src="@drawable/icon_sport" />
- <TextView
- android:id="@+id/calNum"
- android:layout_width="match_parent"
- android:layout_height="82dp"
- android:layout_gravity="center"
- android:layout_weight="1"
- android:gravity="center_vertical|left"
- android:text="0"
- android:textColor="#333"
- android:textSize="20dp" />
- <View
- android:layout_width="1dip"
- android:layout_height="40dp"
- android:layout_gravity="center"
- android:background="#E2E2E2" />
- </LinearLayout>
- <TextView
- android:id="@+id/caltext"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:text="卡路里"
- android:textColor="#9A9A9A"
- android:textSize="10dp" />
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="90dp"
- android:layout_weight="10"
- android:orientation="vertical">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="70dp"
- android:orientation="horizontal">
- <ImageView
- android:id="@+id/redfire"
- android:layout_width="match_parent"
- android:layout_height="82dp"
- android:layout_gravity="center"
- android:layout_weight="1"
- android:src="@drawable/icon_redsport" />
- <TextView
- android:id="@+id/sportNum"
- android:layout_width="match_parent"
- android:layout_height="82dp"
- android:layout_gravity="center"
- android:layout_weight="1"
- android:gravity="center_vertical|left"
- android:text="0"
- android:textColor="#333"
- android:textSize="20dp" />
- <View
- android:layout_width="1dip"
- android:layout_height="40dp"
- android:layout_gravity="center"
- android:background="#E2E2E2" />
- </LinearLayout>
- <TextView
- android:id="@+id/sportText"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:text="运动卡路里"
- android:textColor="#9A9A9A"
- android:textSize="10dp" />
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="89dp"
- android:layout_weight="10"
- android:orientation="vertical">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="10"
- android:orientation="horizontal">
- <ImageView
- android:id="@+id/ckIcon"
- android:layout_width="110dp"
- android:layout_height="22dp"
- android:layout_gravity="center"
- android:layout_weight="1"
- android:src="@drawable/ck" />
- <TextView
- android:id="@+id/ckNum"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:layout_weight="1"
- android:gravity="center_vertical|left"
- android:text="0"
- android:textColor="#333"
- android:textSize="20dp" />
- </LinearLayout>
- <TextView
- android:id="@+id/textView11"
- android:layout_width="match_parent"
- android:layout_height="20dp"
- android:layout_weight="1"
- android:gravity="center"
- android:text="CK"
- android:textColor="#9A9A9A"
- android:textSize="10dp" />
- </LinearLayout>
- </LinearLayout>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="10dp"
- android:layout_weight="1"
- android:background="#fff"
- android:layout_gravity="center"
- android:gravity="center"
- android:orientation="horizontal">
- <Button
- android:id="@+id/button"
- android:layout_width="60dp"
- android:layout_height="30dp"
- android:background="@drawable/gary_btn"
- android:gravity="center"
- android:layout_marginLeft="20dp"
- android:text="停止运动" />
- <Button
- android:id="@+id/linkBtn"
- android:layout_width="210dp"
- android:layout_height="30dp"
- android:background="@drawable/round_btn"
- android:gravity="center"
- android:text="运动时间 00:00:00"
- android:layout_marginLeft="15dp"
- android:layout_marginRight="15dp"
- android:textColor="#333" />
- <Button
- android:id="@+id/button3"
- android:layout_width="60dp"
- android:layout_height="30dp"
- android:background="@drawable/gary_btn"
- android:gravity="center"
- android:text="心率上报"
- android:layout_marginRight="20dp"
- android:textColor="#fff" />
- </LinearLayout>
- <TextView
- android:id="@+id/textView12"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="#fff"
- android:gravity="center"
- android:text="5分钟心率趋势图"
- android:textColor="#000"
- android:textSize="20dp" />
- <TextView
- android:id="@+id/textView21"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="#fff"
- android:gravity="center"
- android:text="最大心率 : 0 平均心率 : 0"
- android:textColor="#9A9A9A"
- android:textSize="15dp" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="horizontal">
- <SurfaceView
- android:id="@+id/surfaceView2"
- android:layout_width="wrap_content"
- android:layout_height="73dp"
- android:layout_weight="1" />
- </LinearLayout>
- <com.google.android.material.bottomnavigation.BottomNavigationView
- android:id="@+id/nav_view"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="#fff"
- app:itemIconTint="#333"
- app:itemTextColor="#333"
- app:menu="@menu/bottom_nav_menu"
- tools:ignore="MissingConstraints" />
- </LinearLayout>
- </androidx.constraintlayout.widget.ConstraintLayout>
|