Newer
Older
SafeTreeController / app / src / main / res / layout / fragment_device_controller.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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.pengxh.kt.lite.widget.SteeringWheelView
        android:id="@+id/steeringWheelView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/dp_10"
        android:background="@drawable/bg_solid_layout_blue_10"
        android:gravity="center"
        android:paddingVertical="@dimen/dp_10"
        app:ctrl_diameter="290dp" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_60"
        android:layout_marginHorizontal="@dimen/dp_10"
        android:background="@drawable/bg_solid_layout_blue_10">

        <androidx.appcompat.widget.AppCompatImageButton
            android:id="@+id/upScaleButton"
            style="@style/ScaleButtonStyle"
            android:src="@drawable/ic_plus" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="焦距"
            android:textColor="@color/mainThemeColor"
            android:textSize="@dimen/sp_16" />

        <androidx.appcompat.widget.AppCompatImageButton
            android:id="@+id/downScaleButton"
            style="@style/ScaleButtonStyle"
            android:layout_alignParentEnd="true"
            android:src="@drawable/ic_minus" />
    </RelativeLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/dp_60"
        android:layout_margin="@dimen/dp_10"
        android:background="@drawable/bg_solid_layout_blue_10">

        <androidx.appcompat.widget.AppCompatImageButton
            android:id="@+id/accelerateButton"
            style="@style/ScaleButtonStyle"
            android:src="@drawable/ic_plus" />

        <TextView
            android:id="@+id/currentSpeedView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="速度:1"
            android:textColor="@color/mainThemeColor"
            android:textSize="@dimen/sp_16" />

        <androidx.appcompat.widget.AppCompatImageButton
            android:id="@+id/decelerationButton"
            style="@style/ScaleButtonStyle"
            android:layout_alignParentEnd="true"
            android:src="@drawable/ic_minus" />
    </RelativeLayout>
</LinearLayout>