|
|
|
|
@ -0,0 +1,238 @@
|
|
|
|
|
<FrameLayout 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">
|
|
|
|
|
|
|
|
|
|
<!-- 显示无人机回传图像的控件 -->
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/imageView"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_alignParentTop="true"
|
|
|
|
|
android:layout_alignParentBottom="true"
|
|
|
|
|
android:scaleType="centerCrop" />
|
|
|
|
|
|
|
|
|
|
<!-- 左侧竖直轴按钮 -->
|
|
|
|
|
|
|
|
|
|
<RelativeLayout
|
|
|
|
|
android:id="@+id/left_vertical_button_layout"
|
|
|
|
|
android:layout_width="150dp"
|
|
|
|
|
android:layout_height="150dp"
|
|
|
|
|
android:layout_above="@id/imageView"
|
|
|
|
|
android:layout_gravity="left|bottom"
|
|
|
|
|
android:layout_marginLeft="50dp"
|
|
|
|
|
android:layout_marginTop="20dp"
|
|
|
|
|
android:layout_marginBottom="10dp">
|
|
|
|
|
|
|
|
|
|
<!-- 上升按钮 -->
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/up_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_alignParentTop="true"
|
|
|
|
|
android:layout_centerHorizontal="true"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/up_button"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/up" />
|
|
|
|
|
|
|
|
|
|
<!-- 下降按钮 -->
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/down_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_alignParentBottom="true"
|
|
|
|
|
android:layout_centerHorizontal="true"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/down_button"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/down" />
|
|
|
|
|
|
|
|
|
|
<!-- 左旋转按钮 -->
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/rotate_left_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_alignParentStart="true"
|
|
|
|
|
android:layout_centerVertical="true"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/turn_left_button"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/turnleft" />
|
|
|
|
|
|
|
|
|
|
<!-- 右旋转按钮 -->
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/rotate_right_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_alignParentEnd="true"
|
|
|
|
|
android:layout_centerVertical="true"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/turn_right_button"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/turnright" />
|
|
|
|
|
|
|
|
|
|
</RelativeLayout>
|
|
|
|
|
|
|
|
|
|
<RelativeLayout
|
|
|
|
|
android:id="@+id/top_horizontal_button_layout"
|
|
|
|
|
android:layout_width="150dp"
|
|
|
|
|
android:layout_height="150dp"
|
|
|
|
|
android:layout_above="@id/imageView"
|
|
|
|
|
android:layout_alignParentEnd="true"
|
|
|
|
|
android:layout_gravity="right|bottom"
|
|
|
|
|
android:layout_marginRight="50dp"
|
|
|
|
|
android:layout_marginBottom="10dp">
|
|
|
|
|
|
|
|
|
|
<!-- 向左按钮 -->
|
|
|
|
|
<!-- 每一个与image相关,都需要设置contentDescription,对其进行描述-->
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/left_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_alignParentStart="true"
|
|
|
|
|
android:layout_centerVertical="true"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/move_left_button"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/moveleft" />
|
|
|
|
|
|
|
|
|
|
<!-- 向右按钮 -->
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/right_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_alignParentEnd="true"
|
|
|
|
|
android:layout_centerVertical="true"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/move_right_button"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/moveright" />
|
|
|
|
|
|
|
|
|
|
<!-- 向前移动按钮 -->
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/forward_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_centerHorizontal="true"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/move_forward_button"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/moveforward" />
|
|
|
|
|
|
|
|
|
|
<!-- 向后移动按钮 -->
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/backward_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_alignParentEnd="true"
|
|
|
|
|
android:layout_alignParentBottom="true"
|
|
|
|
|
android:layout_marginEnd="50dp"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/move_back_button"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/movebackward" />
|
|
|
|
|
|
|
|
|
|
</RelativeLayout>
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/takeoff_landing_buttons_layout"
|
|
|
|
|
android:layout_width="100dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_alignParentBottom="true"
|
|
|
|
|
android:layout_centerHorizontal="true"
|
|
|
|
|
|
|
|
|
|
android:layout_gravity="center|bottom"
|
|
|
|
|
android:layout_marginBottom="15dp"
|
|
|
|
|
android:orientation="horizontal">
|
|
|
|
|
|
|
|
|
|
<!-- 降落按钮 -->
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/landing_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_gravity="left"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/landing_button123"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/landing" />
|
|
|
|
|
<!-- 起飞按钮 -->
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/takeoff_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_gravity="right"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/takeoff_button"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/takeoff"
|
|
|
|
|
android:text="起飞" />
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 添加三个按钮,用于设置、开始录制和显示当前状态 -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/top_left_buttons_layout"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_gravity="left|top"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:padding="10dp">
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/setting_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/setting_button"
|
|
|
|
|
android:scaleType="centerInside"
|
|
|
|
|
android:src="@drawable/setting" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/start_record_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_marginLeft="20dp"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/start_record_button"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/record"
|
|
|
|
|
android:text="开始录制" />
|
|
|
|
|
|
|
|
|
|
<ImageButton
|
|
|
|
|
android:id="@+id/show_status_button"
|
|
|
|
|
android:layout_width="50dp"
|
|
|
|
|
android:layout_height="50dp"
|
|
|
|
|
android:layout_marginLeft="20dp"
|
|
|
|
|
android:background="@null"
|
|
|
|
|
android:contentDescription="@string/show_status_button"
|
|
|
|
|
android:scaleType="centerCrop"
|
|
|
|
|
android:src="@drawable/status"
|
|
|
|
|
android:text="当前状态" />
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.Guideline
|
|
|
|
|
android:id="@+id/guideline2"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
app:layout_constraintGuide_begin="20dp" />
|
|
|
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.Barrier
|
|
|
|
|
android:id="@+id/barrier2"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
app:barrierDirection="top" />
|
|
|
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.Guideline
|
|
|
|
|
android:id="@+id/guideline3"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
app:layout_constraintGuide_begin="20dp" />
|
|
|
|
|
|
|
|
|
|
</FrameLayout>
|