Newer
Older
Endoscope / app / src / main / res / layout / activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/rootView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@mipmap/banner"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/titleViewHeight">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="@dimen/titleViewHeight"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginVertical="@dimen/dp_10"
                android:paddingHorizontal="-10dp"
                android:src="@mipmap/ic_launcher" />

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="内窥辅助设备管理系统"
                android:textColor="@color/white"
                android:textSize="@dimen/sp_18"
                android:textStyle="bold" />

            <ImageButton
                android:id="@+id/openAlbumButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/dp_10"
                android:background="@null"
                android:src="@mipmap/image_button" />
        </LinearLayout>

        <TextView
            android:id="@+id/videoStateView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="视频录制中,长按视频录制按钮,停止录制"
            android:textColor="@color/white"
            android:textSize="@dimen/sp_18"
            android:visibility="invisible" />
    </RelativeLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:background="@color/white"
        android:orientation="horizontal">

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1.5"
            android:orientation="vertical">

            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/dp_10"
                app:cardCornerRadius="@dimen/dp_7">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/backgroundColor">

                    <ImageView
                        android:id="@+id/logo"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerVertical="true"
                        android:layout_margin="@dimen/dp_7"
                        android:src="@mipmap/ic_launcher" />

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerVertical="true"
                        android:layout_toEndOf="@id/logo"
                        android:orientation="vertical">

                        <LinearLayout
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="@dimen/dp_5"
                            android:orientation="horizontal">

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="设备运行时间:"
                                android:textColor="@color/black"
                                android:textSize="@dimen/sp_16" />

                            <TextView
                                android:id="@+id/runningTimeView"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:text="00:00:00"
                                android:textColor="@color/black"
                                android:textSize="@dimen/sp_16" />
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="@dimen/dp_5"
                            android:orientation="horizontal">

                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="激光甲烷状态:"
                                android:textColor="@color/black"
                                android:textSize="@dimen/sp_16" />

                            <TextView
                                android:id="@+id/stateView"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="未启用"
                                android:textColor="@color/black"
                                android:textSize="@dimen/sp_16" />
                        </LinearLayout>
                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_centerVertical="true"
                        android:layout_margin="@dimen/dp_7"
                        android:orientation="horizontal">

                        <ImageButton
                            android:id="@+id/imageButton"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:background="@null"
                            android:src="@mipmap/capture_button" />

                        <ImageButton
                            android:id="@+id/videoButton"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginHorizontal="@dimen/dp_10"
                            android:background="@null"
                            android:src="@mipmap/video_button" />

                        <ImageButton
                            android:id="@+id/multipleImageButton"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginEnd="@dimen/dp_10"
                            android:background="@null"
                            android:src="@mipmap/multiple_capture_button" />
                    </LinearLayout>
                </RelativeLayout>
            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_marginHorizontal="@dimen/dp_10"
                android:layout_weight="3"
                app:cardCornerRadius="@dimen/dp_7">

                <SurfaceView
                    android:id="@+id/surfaceView"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent" />
            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_margin="@dimen/dp_10"
                android:layout_weight="1"
                app:cardCornerRadius="@dimen/dp_7">

                <com.github.mikephil.charting.charts.LineChart
                    android:id="@+id/lineChart"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@color/backgroundColor" />
            </androidx.cardview.widget.CardView>
        </LinearLayout>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:orientation="vertical">

            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_marginVertical="@dimen/dp_10"
                android:layout_marginEnd="@dimen/dp_10"
                android:layout_weight="4"
                app:cardCornerRadius="@dimen/dp_7">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@color/backgroundColor"
                    android:orientation="vertical">

                    <RelativeLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_margin="@dimen/dp_10"
                        android:orientation="horizontal">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_centerVertical="true"
                            android:text="连续拍照"
                            android:textColor="@color/black"
                            android:textSize="@dimen/sp_16" />

                        <LinearLayout
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_alignParentEnd="true"
                            android:layout_centerVertical="true"
                            android:orientation="horizontal">

                            <ImageButton
                                android:id="@+id/addButton"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginEnd="@dimen/dp_10"
                                android:background="@null"
                                android:src="@mipmap/add_button" />

                            <ImageButton
                                android:id="@+id/deleteButton"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:background="@null"
                                android:src="@mipmap/delete_button" />
                        </LinearLayout>
                    </RelativeLayout>

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/recyclerView"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_marginHorizontal="@dimen/dp_10"
                        android:scrollbars="vertical"
                        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
                </LinearLayout>
            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_marginEnd="@dimen/dp_10"
                android:layout_marginBottom="@dimen/dp_10"
                android:layout_weight="3"
                app:cardCornerRadius="@dimen/dp_7">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@color/backgroundColor"
                    android:gravity="center_horizontal"
                    android:orientation="horizontal"
                    android:paddingVertical="@dimen/dp_10">

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:layout_marginEnd="@dimen/dp_30"
                        android:gravity="center"
                        android:orientation="vertical">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="焦距控制"
                            android:textColor="@color/black"
                            android:textSize="@dimen/sp_16" />

                        <RelativeLayout
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:layout_marginVertical="@dimen/dp_15"
                            android:background="@drawable/bg_stroke_layout_blue_10">

                            <LinearLayout
                                android:id="@+id/upScaleButton"
                                android:layout_width="@dimen/dp_70"
                                android:layout_height="@dimen/dp_70"
                                android:layout_margin="@dimen/dp_3"
                                android:background="@drawable/selector_scale_button"
                                android:clickable="true"
                                android:focusable="true"
                                android:gravity="center"
                                android:orientation="vertical">

                                <ImageView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginTop="@dimen/dp_5"
                                    android:src="@drawable/direction_point_selector" />

                                <ImageButton
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginTop="@dimen/dp_5"
                                    android:background="@null"
                                    android:src="@drawable/ic_plus" />
                            </LinearLayout>

                            <LinearLayout
                                android:id="@+id/downScaleButton"
                                android:layout_width="@dimen/dp_70"
                                android:layout_height="@dimen/dp_70"
                                android:layout_alignParentBottom="true"
                                android:layout_margin="@dimen/dp_3"
                                android:background="@drawable/selector_scale_button"
                                android:clickable="true"
                                android:focusable="true"
                                android:gravity="center"
                                android:orientation="vertical">

                                <ImageButton
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginBottom="@dimen/dp_5"
                                    android:background="@null"
                                    android:src="@drawable/ic_minus" />

                                <ImageView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginBottom="@dimen/dp_5"
                                    android:src="@drawable/direction_point_selector" />
                            </LinearLayout>
                        </RelativeLayout>
                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:layout_marginStart="@dimen/dp_30"
                        android:gravity="center_horizontal"
                        android:orientation="vertical">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="方位控制"
                            android:textColor="@color/black"
                            android:textSize="@dimen/sp_16" />

                        <com.pengxh.kt.lite.widget.SteeringWheelView
                            android:id="@+id/steeringWheelView"
                            android:layout_width="@dimen/dp_220"
                            android:layout_height="match_parent"
                            android:background="@color/backgroundColor"
                            android:gravity="center"
                            app:ctrl_backgroundColor="@color/white"
                            app:ctrl_borderColor="#64BFEB"
                            app:ctrl_borderStroke="@dimen/dp_3"
                            app:ctrl_diameter="@dimen/dp_200" />
                    </LinearLayout>
                </LinearLayout>
            </androidx.cardview.widget.CardView>
        </LinearLayout>
    </LinearLayout>
</LinearLayout>