<?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"
|
xmlns:tools="http://schemas.android.com/tools"
|
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
android:orientation="vertical"
|
tools:context=".MainActivity">
|
<!-- 状态区域-->
|
<LinearLayout
|
android:background="#334455"
|
android:layout_width="match_parent"
|
android:layout_height="0dp"
|
android:layout_weight="4">
|
</LinearLayout>
|
|
<!-- **************** 底盘 **************** -->
|
<RelativeLayout
|
android:id="@+id/layout_bottom"
|
android:visibility="gone"
|
android:layout_width="match_parent"
|
android:layout_height="0dp"
|
android:layout_weight="6">
|
<Button
|
android:id="@+id/btn_stop"
|
android:layout_width="100sp"
|
android:layout_height="100sp"
|
android:layout_margin="30sp"
|
android:text="STOP"
|
android:textSize="18sp"
|
android:layout_centerInParent="true"
|
android:backgroundTint="#F62727" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_go_forward"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="10sp"
|
android:text="前进"
|
android:layout_centerHorizontal="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:backgroundTint="#2196F3" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_go_backward"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="后退"
|
android:layout_marginBottom="10sp"
|
android:layout_centerHorizontal="true"
|
android:layout_alignParentBottom="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:backgroundTint="#2196F3" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_rotatopn_left"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="左旋转"
|
android:layout_marginLeft="20sp"
|
android:layout_centerVertical="true"
|
android:layout_alignParentLeft="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:backgroundTint="#2196F3" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_rotatopn_right"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="右旋转"
|
android:layout_marginRight="20sp"
|
android:layout_centerVertical="true"
|
android:layout_alignParentRight="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:backgroundTint="#2196F3" />
|
|
</RelativeLayout>
|
|
<!-- **************** 货叉 **************** -->
|
<RelativeLayout
|
android:id="@+id/layout_top"
|
android:layout_width="match_parent"
|
android:layout_height="0dp"
|
android:layout_weight="6"
|
android:visibility="gone">
|
|
<Button
|
android:id="@+id/btn_stop2"
|
android:layout_width="100sp"
|
android:layout_height="100sp"
|
android:layout_centerInParent="true"
|
android:layout_margin="30sp"
|
android:backgroundTint="#F62727"
|
android:text="STOP"
|
android:textSize="18sp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_extend_fork"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_centerHorizontal="true"
|
android:layout_marginTop="10sp"
|
android:backgroundTint="@color/bulue.500"
|
android:minWidth="10dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:text="伸叉"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_collect_fork"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignParentBottom="true"
|
android:layout_centerHorizontal="true"
|
android:layout_marginBottom="10sp"
|
android:backgroundTint="#2196F3"
|
android:minWidth="10dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:text="收叉"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_rise"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignLeft="@+id/btn_front_paddle_extend"
|
android:layout_alignBottom="@+id/btn_turn_left"
|
android:layout_centerVertical="true"
|
android:backgroundTint="#2196F3"
|
android:minWidth="10dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:text="上升"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_drop"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignLeft="@+id/btn_front_paddle_extend"
|
android:layout_alignBottom="@+id/btn_collect_fork"
|
android:layout_marginTop="-24dp"
|
android:backgroundTint="#2196F3"
|
android:minWidth="10dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:text="下降"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_turn_right"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignBottom="@+id/btn_collect_fork"
|
android:layout_alignParentRight="true"
|
android:layout_centerVertical="true"
|
android:layout_marginRight="20sp"
|
android:backgroundTint="#2196F3"
|
android:minWidth="10dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:text="右旋"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_turn_left"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignTop="@+id/btn_stop2"
|
android:layout_alignParentRight="true"
|
android:layout_marginTop="70dp"
|
android:layout_marginRight="20sp"
|
android:backgroundTint="#2196F3"
|
android:minWidth="10dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:text="左旋"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_back_paddle_extend"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginLeft="20sp"
|
android:layout_centerVertical="true"
|
android:layout_alignParentRight="true"
|
android:layout_alignBottom="@+id/btn_extend_fork"
|
android:layout_marginRight="20sp"
|
android:backgroundTint="#2196F3"
|
android:minWidth="10dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:text="后拨杆伸出"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_back_paddle_collect"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginLeft="20sp"
|
android:layout_centerVertical="true"
|
android:layout_alignParentRight="true"
|
android:layout_alignBottom="@+id/btn_front_paddle_collect"
|
android:layout_marginRight="20sp"
|
android:backgroundTint="#2196F3"
|
android:minWidth="10dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:text="后拨杆收起"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_front_paddle_extend"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginLeft="20sp"
|
android:layout_centerVertical="true"
|
android:layout_alignParentLeft="true"
|
android:layout_alignBottom="@+id/btn_extend_fork"
|
android:layout_marginRight="20sp"
|
android:backgroundTint="#2196F3"
|
android:minWidth="10dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:text="前拨杆伸出"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_front_paddle_collect"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginLeft="20sp"
|
android:layout_centerVertical="true"
|
android:layout_alignTop="@+id/btn_stop2"
|
android:layout_alignParentLeft="true"
|
android:layout_marginTop="-24dp"
|
android:backgroundTint="#2196F3"
|
android:minWidth="10dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:text="前拨杆收起"
|
|
app:cornerRadius="5dp" />
|
|
|
</RelativeLayout>
|
|
<!-- **************** 单轴 **************** -->
|
<RelativeLayout
|
android:id="@+id/layout_single"
|
android:layout_width="match_parent"
|
android:layout_height="0dp"
|
android:layout_weight="6"
|
android:visibility="gone">
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_single_1"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignParentLeft="true"
|
android:layout_marginTop="10sp"
|
android:layout_marginLeft="20sp"
|
android:backgroundTint="#2196F3"
|
android:text="轴 - 1"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_single_2"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignLeft="@+id/btn_single_5"
|
android:layout_marginTop="10sp"
|
android:backgroundTint="#2196F3"
|
android:text="轴 - 2"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_single_3"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignParentRight="true"
|
android:layout_marginRight="20sp"
|
android:layout_marginTop="10sp"
|
android:backgroundTint="#2196F3"
|
android:text="轴 - 3"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_single_4"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignLeft="@+id/btn_single_1"
|
android:layout_alignBottom="@+id/btn_single_5"
|
android:backgroundTint="#2196F3"
|
android:text="轴 - 4"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_single_5"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_centerInParent="true"
|
android:backgroundTint="#2196F3"
|
android:text="轴 - 5"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_single_6"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignLeft="@+id/btn_single_3"
|
android:layout_alignBottom="@+id/btn_single_5"
|
android:backgroundTint="#2196F3"
|
android:text="轴 - 6"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_single_7"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignLeft="@+id/btn_single_1"
|
android:layout_alignBottom="@+id/btn_single_8"
|
android:backgroundTint="#2196F3"
|
android:text="轴 - 7"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_single_8"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignParentBottom="true"
|
android:layout_marginBottom="20sp"
|
android:layout_alignLeft="@+id/btn_single_5"
|
android:layout_marginTop="10sp"
|
android:backgroundTint="#2196F3"
|
android:text="轴 - 8"
|
app:cornerRadius="5dp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_single_9"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_alignLeft="@+id/btn_single_3"
|
android:layout_alignBottom="@+id/btn_single_8"
|
android:backgroundTint="#2196F3"
|
android:text="轴 - 9"
|
app:cornerRadius="5dp" />
|
|
</RelativeLayout>
|
|
<!-- **************** 复位 **************** -->
|
<RelativeLayout
|
android:id="@+id/layout_reset"
|
android:layout_width="match_parent"
|
android:layout_height="0dp"
|
android:layout_weight="6"
|
android:visibility="gone">
|
|
<Button
|
android:id="@+id/btn_stop3"
|
android:layout_width="100sp"
|
android:layout_height="100sp"
|
android:layout_centerInParent="true"
|
android:layout_margin="30sp"
|
android:backgroundTint="#F62727"
|
android:text="STOP"
|
android:textSize="18sp" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_camera_reset"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="相机复位"
|
android:layout_marginLeft="20sp"
|
android:layout_marginTop="20sp"
|
android:layout_alignParentLeft="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:backgroundTint="#2196F3" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_load_reset"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="清除路径"
|
android:layout_marginLeft="20sp"
|
android:layout_centerVertical="true"
|
android:layout_alignParentLeft="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:backgroundTint="#2196F3" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_fork_reset"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="货叉归零"
|
android:layout_marginLeft="20sp"
|
android:layout_marginBottom="20sp"
|
android:layout_alignParentBottom="true"
|
android:layout_alignParentLeft="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:backgroundTint="#2196F3" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_gyro_reset"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="陀螺仪复位"
|
android:layout_marginRight="20sp"
|
android:layout_marginTop="20sp"
|
android:layout_alignParentRight="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:backgroundTint="#2196F3" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_lift_reset"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="升降归零"
|
android:layout_marginRight="20sp"
|
android:layout_centerVertical="true"
|
android:layout_alignParentRight="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:backgroundTint="#2196F3" />
|
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_all_reset"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="整机复位"
|
android:layout_marginRight="20sp"
|
android:layout_alignParentRight="true"
|
android:layout_alignParentBottom="true"
|
android:layout_marginBottom="20sp"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:backgroundTint="#2196F3" />
|
|
</RelativeLayout>
|
|
<!-- **************** 18轴 **************** -->
|
<GridLayout
|
android:id="@+id/layout_18"
|
android:visibility="visible"
|
android:layout_width="match_parent"
|
android:layout_height="0dp"
|
android:layout_weight="6"
|
android:columnCount="4"
|
android:rowCount="2"
|
android:padding="5dp">
|
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_1_front"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="前进"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_1_back"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="后退"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_2_front"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="左旋转"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_2_back"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="右旋转"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_3_front"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="左旋转"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_3_back"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="右旋转"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_4_front"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="左旋转"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_4_back"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="右旋转"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_5_front"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="左旋转"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_5_back"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="右旋转"/>
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_6_front"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="左旋转"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_6_back"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="右旋转"/>
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_7_front"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="左旋转"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_7_back"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="右旋转"/>
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_8_front"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="左旋转"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_8_back"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="右旋转"/>
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_9_front"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="左旋转"/>
|
|
<com.example.customBtn.CustomBtn
|
android:id="@+id/btn_axle_9_back"
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_columnWeight="1"
|
style="@style/CustomButtonStyle"
|
android:text="右旋转"/>
|
|
</GridLayout>
|
|
<!-- **************** 底部 **************** -->
|
<LinearLayout
|
android:background="#334455"
|
android:layout_width="match_parent"
|
android:layout_height="0dp"
|
android:layout_weight="1">
|
|
<LinearLayout
|
android:layout_width="0dp"
|
android:layout_height="match_parent"
|
android:layout_weight="1"
|
android:gravity="center">
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_model_switch"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:text="手动模式"
|
android:layout_centerHorizontal="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:textSize="10sp"
|
android:backgroundTint="#2196F3" />
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
android:layout_width="0dp"
|
android:layout_height="match_parent"
|
android:layout_weight="1"
|
android:gravity="center">
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_single_switch"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:text="单轴使能"
|
android:layout_centerHorizontal="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:onClick="switchSingle"
|
android:textSize="10sp"
|
android:backgroundTint="#2196F3" />
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="0dp"
|
android:layout_height="match_parent"
|
android:layout_weight="1"
|
android:gravity="center">
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_body_switch"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:text="底盘"
|
android:layout_centerHorizontal="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:textSize="10sp"
|
android:onClick="switchover"
|
android:backgroundTint="#2196F3" />
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="0dp"
|
android:layout_height="match_parent"
|
android:layout_weight="1"
|
android:gravity="center">
|
<com.google.android.material.button.MaterialButton
|
android:id="@+id/btn_reset"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:text="复位"
|
android:layout_centerHorizontal="true"
|
app:cornerRadius="5dp"
|
android:paddingLeft="10dp"
|
android:paddingRight="10dp"
|
android:minWidth="10dp"
|
android:textSize="10sp"
|
android:onClick="switchRest"
|
android:backgroundTint="#2196F3" />
|
</LinearLayout>
|
|
<!-- <LinearLayout-->
|
<!-- android:layout_width="0dp"-->
|
<!-- android:layout_height="match_parent"-->
|
<!-- android:layout_weight="1"-->
|
<!-- android:gravity="center">-->
|
<!-- <com.google.android.material.button.MaterialButton-->
|
<!-- android:layout_width="wrap_content"-->
|
<!-- android:layout_height="40dp"-->
|
<!-- android:text="功能切换"-->
|
<!-- android:layout_centerHorizontal="true"-->
|
<!-- app:cornerRadius="5dp"-->
|
<!-- android:paddingLeft="10dp"-->
|
<!-- android:paddingRight="10dp"-->
|
<!-- android:minWidth="10dp"-->
|
<!-- android:textSize="10sp"-->
|
<!-- android:backgroundTint="#2196F3" />-->
|
<!-- </LinearLayout>-->
|
|
|
<!-- <LinearLayout-->
|
<!-- android:layout_width="0dp"-->
|
<!-- android:layout_height="match_parent"-->
|
<!-- android:layout_weight="1"-->
|
<!-- android:gravity="center">-->
|
<!-- <com.google.android.material.button.MaterialButton-->
|
<!-- android:id="@+id/btn_force_switch"-->
|
<!-- android:layout_width="wrap_content"-->
|
<!-- android:layout_height="40dp"-->
|
<!-- android:text="开启强制"-->
|
<!-- android:layout_centerHorizontal="true"-->
|
<!-- app:cornerRadius="5dp"-->
|
<!-- android:paddingLeft="10dp"-->
|
<!-- android:paddingRight="10dp"-->
|
<!-- android:minWidth="10dp"-->
|
<!-- android:textSize="10sp"-->
|
<!-- android:backgroundTint="#2196F3" />-->
|
<!-- </LinearLayout>-->
|
|
</LinearLayout>
|
|
|
|
|
</LinearLayout>
|