Newer
Older
MethaneInspection / app / src / main / res / layout / fragment_single_settings.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    android:orientation="vertical">

    <include layout="@layout/include_base_title" />

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

        <RelativeLayout style="@style/itemLayoutStyle">

            <TextView
                style="@style/textViewStyle"
                android:text="报警声音/报警震动" />

            <Switch
                android:id="@+id/warningSwitch"
                style="@style/switchStyle"
                android:thumb="@drawable/select_switch_circle"
                android:track="@drawable/select_switch_background"
                tools:ignore="UseSwitchCompatOrMaterialXml" />
        </RelativeLayout>

        <include layout="@layout/include_line_view" />

        <RelativeLayout style="@style/itemLayoutStyle">

            <TextView
                style="@style/textViewStyle"
                android:text="报警事件自动记录" />

            <Switch
                android:id="@+id/autoRecordSwitch"
                style="@style/switchStyle"
                android:thumb="@drawable/select_switch_circle"
                android:track="@drawable/select_switch_background" />
        </RelativeLayout>

        <include layout="@layout/include_line_view" />

        <RelativeLayout style="@style/itemLayoutStyle">

            <TextView
                style="@style/textViewStyle"
                android:text="版本号" />

            <TextView
                android:id="@+id/appVersionView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_centerVertical="true"
                android:text="2.0.0"
                android:textSize="@dimen/sp_16" />
        </RelativeLayout>

        <include layout="@layout/include_line_view" />
    </LinearLayout>

    <Button
        android:id="@+id/backToLoginViewButton"
        style="@style/MainButtonStyle"
        android:layout_margin="30dp"
        android:text="回到登录页" />
</LinearLayout>