From d5722c5a50829df634f96bff131fb8cc01f6a17c Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期六, 17 八月 2024 16:27:57 +0800
Subject: [PATCH] #
---
app/src/main/java/com/example/agvcontroller/action/RotatopnLeftRight.java | 32 ++++
app/src/main/java/com/example/agvcontroller/protocol/HandleCmdType.java | 8 +
app/src/main/java/com/example/agvcontroller/MainActivity.java | 161 ++++++++++++++++------
app/src/main/java/com/example/agvcontroller/action/ForwardBackAction.java | 32 ++++
app/src/main/java/com/example/agvcontroller/StartActivity.java | 2
app/src/main/res/layout/activity_main.xml | 180 +++++++++++++++----------
6 files changed, 298 insertions(+), 117 deletions(-)
diff --git a/app/src/main/java/com/example/agvcontroller/MainActivity.java b/app/src/main/java/com/example/agvcontroller/MainActivity.java
index 1de3e8a..b77dcb1 100644
--- a/app/src/main/java/com/example/agvcontroller/MainActivity.java
+++ b/app/src/main/java/com/example/agvcontroller/MainActivity.java
@@ -5,6 +5,8 @@
import android.content.Context;
import android.content.Intent;
+import android.content.res.ColorStateList;
+import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
@@ -15,6 +17,9 @@
import android.view.View;
import android.widget.Button;
+import com.example.agvcontroller.action.ForwardBackAction;
+import com.example.agvcontroller.action.HandInAction;
+import com.example.agvcontroller.action.RotatopnLeftRight;
import com.example.agvcontroller.protocol.AgvAction;
import com.example.agvcontroller.action.ForceSwitchAction;
import com.example.agvcontroller.action.HandOutAction;
@@ -32,24 +37,29 @@
public class MainActivity extends AppCompatActivity {
public static final Map<String, Object> map = new ConcurrentHashMap();
+ public static final Map<String, Object> car_num = new ConcurrentHashMap();
private RecyclerView recyclerView;
private ItemAdapter itemAdapter;
private List<Item> itemList;
private Vibrator vibrator;
private Button stopBtn; // 鎬ュ仠鎸夐挳
- private Button forceSwitchBtn; // 鎵嬭嚜鍔ㄥ己鍒跺紑鍏�
- private Button rotatopnRightBtn; // 鍙虫棆杞�
+// private Button forceSwitchBtn; // 鎵嬭嚜鍔ㄥ己鍒跺紑鍏�
private Button rotatopnLeftBtn; // 宸︽棆杞�
+ private Button rotatopnRightBtn; // 鍙虫棆杞�
private Button goForwardBtn; // 鍓嶈繘
private Button goBackwardBtn; // 鍚庨��
private Button modelSwitchBtn; // 杩涘叆銆侀��鍑� 鎵嬪姩
private Socket socket;
-
+ private String AgvNo = "12";
SocketManager socketManager;
- private boolean isDowm = false;
- private boolean isOpen = false;
+ private int autoVal = 1;
+ private boolean isAuto = true;
+ private boolean isGoForward = false;
+ private boolean isGoBackward = false;
+ private boolean isRotatopnRight = false;
+ private boolean isRotatopnLeft = false;
@@ -57,27 +67,43 @@
private Handler handler = new Handler(new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
- if (isDowm) {
+ if (isGoForward) {
String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16);
- AgvAction agvAction = new AgvAction<>(ForceSwitchAction.class)
- .setAgvNo("1")
+ AgvAction agvAction = new AgvAction<>(ForwardBackAction.class)
+ .setAgvNo(AgvNo)
.setSerialNo(substring)
.setVal(1)
- .bodySync((action) -> action.setPwd((short) 21));
-
+ .bodySync((action) -> action.setPwd((short) 10));
nettyServerHandler.sendMessageToClient(clientId, agvAction); // 鍙戦�佹秷鎭埌瀹㈡埛绔�
handler.sendEmptyMessageDelayed(0, 100);
-
-
-
}
- if (isOpen) {
+ if (isGoBackward) {
String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16);
- AgvAction agvAction = new AgvAction<>(ForceSwitchAction.class)
- .setAgvNo("12")
+ AgvAction agvAction = new AgvAction<>(ForwardBackAction.class)
+ .setAgvNo(AgvNo)
.setSerialNo(substring)
.setVal(1)
- .bodySync((action) -> action.setPwd((short) 21));
+ .bodySync((action) -> action.setPwd((short) -10));
+ nettyServerHandler.sendMessageToClient(clientId, agvAction); // 鍙戦�佹秷鎭埌瀹㈡埛绔�
+ handler.sendEmptyMessageDelayed(0, 100);
+ }
+ if (isRotatopnRight) {
+ String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16);
+ AgvAction agvAction = new AgvAction<>(RotatopnLeftRight.class)
+ .setAgvNo(AgvNo)
+ .setSerialNo(substring)
+ .setVal(1)
+ .bodySync((action) -> action.setPwd((short) 10));
+ nettyServerHandler.sendMessageToClient(clientId, agvAction); // 鍙戦�佹秷鎭埌瀹㈡埛绔�
+ handler.sendEmptyMessageDelayed(0, 100);
+ }
+ if (isRotatopnLeft) {
+ String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16);
+ AgvAction agvAction = new AgvAction<>(RotatopnLeftRight.class)
+ .setAgvNo(AgvNo)
+ .setSerialNo(substring)
+ .setVal(1)
+ .bodySync((action) -> action.setPwd((short) -10));
nettyServerHandler.sendMessageToClient(clientId, agvAction); // 鍙戦�佹秷鎭埌瀹㈡埛绔�
handler.sendEmptyMessageDelayed(0, 100);
}
@@ -96,9 +122,11 @@
// 鎸夐挳闇囧姩
vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
stopBtn = findViewById(R.id.btn_stop);
- forceSwitchBtn = findViewById(R.id.btn_force_switch);
+// forceSwitchBtn = findViewById(R.id.btn_force_switch);
goForwardBtn = findViewById(R.id.btn_go_forward);
goBackwardBtn = findViewById(R.id.btn_go_backward);
+ rotatopnLeftBtn = findViewById(R.id.btn_go_backward);
+ rotatopnRightBtn = findViewById(R.id.btn_go_forward);
modelSwitchBtn = findViewById(R.id.btn_model_switch);
Intent intent = getIntent();
@@ -106,23 +134,23 @@
Log.i("message1",clientId);
// 寮哄埗妯″紡寮�鍏�
- forceSwitchBtn.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (vibrator != null && vibrator.hasVibrator()) {
- vibrator.vibrate(500);
- }
- String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16);
- AgvAction agvAction = new AgvAction<>(HandOutAction.class)
- .setAgvNo("12")
- .setSerialNo(substring)
- .setVal(1)
- .bodySync((action) -> action.setPwd((short) 21));
- nettyServerHandler.sendMessageToClient(clientId, agvAction); // 鍙戦�佹秷鎭埌瀹㈡埛绔�
- }
- });
+// forceSwitchBtn.setOnClickListener(new View.OnClickListener() {
+// @Override
+// public void onClick(View v) {
+// if (vibrator != null && vibrator.hasVibrator()) {
+// vibrator.vibrate(500);
+// }
+// String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16);
+// AgvAction agvAction = new AgvAction<>(HandOutAction.class)
+// .setAgvNo(AgvNo)
+// .setSerialNo(substring)
+// .setVal(1)
+// .bodySync((action) -> action.setPwd((short) 21));
+// nettyServerHandler.sendMessageToClient(clientId, agvAction); // 鍙戦�佹秷鎭埌瀹㈡埛绔�
+// }
+// });
- // 寮哄埗妯″紡寮�鍏�
+ // 鎵嬭嚜鍔ㄦā寮忓紑鍏�
modelSwitchBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -130,24 +158,37 @@
vibrator.vibrate(500);
}
String substring = String.valueOf(new SnowflakeIdWorker().nextId()).substring(0,16);
- AgvAction agvAction = new AgvAction<>(HandOutAction.class)
- .setAgvNo("12")
- .setSerialNo(substring)
- .setVal(1)
- .bodySync((action) -> action.setPwd((short) 21));
- nettyServerHandler.sendMessageToClient(clientId, agvAction); // 鍙戦�佹秷鎭埌瀹㈡埛绔�
+ if (isAuto) {
+ AgvAction agvAction = new AgvAction<>(HandInAction.class)
+ .setAgvNo(AgvNo)
+ .setSerialNo(substring)
+ .setVal(autoVal)
+ .bodySync((action) -> action.setPwd((short) 21));
+ nettyServerHandler.sendMessageToClient(clientId, agvAction); // 鍙戦�佹秷鎭埌瀹㈡埛绔�
+ } else {
+ AgvAction agvAction = new AgvAction<>(HandOutAction.class)
+ .setAgvNo(AgvNo)
+ .setSerialNo(substring)
+ .setVal(autoVal)
+ .bodySync((action) -> action.setPwd((short) 21));
+ nettyServerHandler.sendMessageToClient(clientId, agvAction); // 鍙戦�佹秷鎭埌瀹㈡埛绔�
+ }
+
+
+
boolean result = false;
long timestamp = System.currentTimeMillis();
Log.i("substring",substring);
- while (System.currentTimeMillis() - timestamp < 20000) {
+ while (System.currentTimeMillis() - timestamp < 5000) {
Object o = map.get(substring);
if (null != o) {
result = true;
+ isAuto = !isAuto;
map.remove(o);
break;
}
@@ -155,7 +196,15 @@
if (result) {
// alert ok 淇敼鎸夐挳鏍峰紡 鍚嶇О
- modelSwitchBtn.setText("鑷姩妯″紡");
+ if (isAuto) {
+ modelSwitchBtn.setText("鑷姩妯″紡");
+ autoVal = 0;
+// modelSwitchBtn.setBackgroundTintList(ColorStateList.valueOf(Color.RED));
+ } else {
+ autoVal = 1;
+ modelSwitchBtn.setText("鎵嬪姩妯″紡");
+ }
+
} else {
// throw new TimeoutException("瓒呮椂");
DialogUtil.showAlertDialog(MainActivity.this, "鎻愮ず", "璇锋眰搴旂瓟瓒呮椂锛�");
@@ -165,6 +214,8 @@
stopBtn.setOnTouchListener(new CarTouchButton());
goForwardBtn.setOnTouchListener(new CarTouchButton());
goBackwardBtn.setOnTouchListener(new CarTouchButton());
+ rotatopnLeftBtn.setOnTouchListener(new CarTouchButton());
+ rotatopnRightBtn.setOnTouchListener(new CarTouchButton());
}
@@ -173,18 +224,36 @@
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
if (view.getId() == R.id.btn_go_forward) {
+ // 鍓嶈繘
if (motionEvent.getAction() == KeyEvent.ACTION_DOWN) {
- isDowm = true;
+ isGoForward = true;
handler.sendEmptyMessage(0);
} else if (motionEvent.getAction() == KeyEvent.ACTION_UP) {
- isDowm = false;
+ isGoForward = false;
}
} else if (view.getId() == R.id.btn_go_backward) {
+ // 鍚庨��
if (motionEvent.getAction() == KeyEvent.ACTION_DOWN) {
- isOpen = true;
+ isGoBackward = true;
handler.sendEmptyMessage(0);
} else if (motionEvent.getAction() == KeyEvent.ACTION_UP) {
- isOpen = false;
+ isGoBackward = false;
+ }
+ } else if (view.getId() == R.id.btn_rotatopn_left) {
+ // 宸︽棆杞�
+ if (motionEvent.getAction() == KeyEvent.ACTION_DOWN) {
+ isRotatopnLeft = true;
+ handler.sendEmptyMessage(0);
+ } else if (motionEvent.getAction() == KeyEvent.ACTION_UP) {
+ isRotatopnLeft = false;
+ }
+ } else if (view.getId() == R.id.btn_rotatopn_right) {
+ // 鍙虫棆杞�
+ if (motionEvent.getAction() == KeyEvent.ACTION_DOWN) {
+ isRotatopnRight = true;
+ handler.sendEmptyMessage(0);
+ } else if (motionEvent.getAction() == KeyEvent.ACTION_UP) {
+ isRotatopnRight = false;
}
}
return false;
diff --git a/app/src/main/java/com/example/agvcontroller/StartActivity.java b/app/src/main/java/com/example/agvcontroller/StartActivity.java
index 727f99b..adb74d2 100644
--- a/app/src/main/java/com/example/agvcontroller/StartActivity.java
+++ b/app/src/main/java/com/example/agvcontroller/StartActivity.java
@@ -52,7 +52,7 @@
}
});
socketManager = new SocketManager();
- socketManager.startServer(8081);
+ socketManager.startServer(8022);
}
@Subscribe(threadMode = ThreadMode.MAIN)
diff --git a/app/src/main/java/com/example/agvcontroller/action/ForwardBackAction.java b/app/src/main/java/com/example/agvcontroller/action/ForwardBackAction.java
new file mode 100644
index 0000000..19db788
--- /dev/null
+++ b/app/src/main/java/com/example/agvcontroller/action/ForwardBackAction.java
@@ -0,0 +1,32 @@
+package com.example.agvcontroller.action;
+
+import com.example.agvcontroller.protocol.IActionBody;
+import com.example.agvcontroller.socket.RadixTools;
+
+import java.io.Serializable;
+
+public class ForwardBackAction implements IActionBody, Serializable {
+
+ private static final long serialVersionUID = -3250235107705010316L;
+
+ private Short pwd;
+
+ @Override
+ public byte[] writeToBytes() {
+ byte[] bytes = RadixTools.shortToByte(pwd);
+ return bytes;
+ }
+
+ @Override
+ public void readFromBytes(byte[] messageBodyBytes) {
+
+ }
+
+ public Short getPwd() {
+ return pwd;
+ }
+
+ public void setPwd(Short pwd) {
+ this.pwd = pwd;
+ }
+}
diff --git a/app/src/main/java/com/example/agvcontroller/action/RotatopnLeftRight.java b/app/src/main/java/com/example/agvcontroller/action/RotatopnLeftRight.java
new file mode 100644
index 0000000..cf10e03
--- /dev/null
+++ b/app/src/main/java/com/example/agvcontroller/action/RotatopnLeftRight.java
@@ -0,0 +1,32 @@
+package com.example.agvcontroller.action;
+
+import com.example.agvcontroller.protocol.IActionBody;
+import com.example.agvcontroller.socket.RadixTools;
+
+import java.io.Serializable;
+
+public class RotatopnLeftRight implements IActionBody, Serializable {
+
+ private static final long serialVersionUID = -3250235107705010316L;
+
+ private Short pwd;
+
+ @Override
+ public byte[] writeToBytes() {
+ byte[] bytes = RadixTools.shortToByte(pwd);
+ return bytes;
+ }
+
+ @Override
+ public void readFromBytes(byte[] messageBodyBytes) {
+
+ }
+
+ public Short getPwd() {
+ return pwd;
+ }
+
+ public void setPwd(Short pwd) {
+ this.pwd = pwd;
+ }
+}
diff --git a/app/src/main/java/com/example/agvcontroller/protocol/HandleCmdType.java b/app/src/main/java/com/example/agvcontroller/protocol/HandleCmdType.java
index 66682a2..1bc042e 100644
--- a/app/src/main/java/com/example/agvcontroller/protocol/HandleCmdType.java
+++ b/app/src/main/java/com/example/agvcontroller/protocol/HandleCmdType.java
@@ -2,8 +2,10 @@
import com.example.agvcontroller.action.ForceStopAction;
import com.example.agvcontroller.action.ForceSwitchAction;
+import com.example.agvcontroller.action.ForwardBackAction;
import com.example.agvcontroller.action.HandInAction;
import com.example.agvcontroller.action.HandOutAction;
+import com.example.agvcontroller.action.RotatopnLeftRight;
import com.example.agvcontroller.action.SingleSwitchAction;
import com.example.agvcontroller.action.SingleSwitchRunAction;
@@ -20,6 +22,12 @@
SINGLE_SWITCH_RUN(0x8C , "寮哄埗鍗曡酱鐐瑰姩", SingleSwitchRunAction.class),
FORCE_STOP(0xF0, "鎬ュ仠", ForceStopAction.class),
+
+ FORWARD_BACK(0x81, "鐐瑰姩鍓嶈繘锛堝悗閫�锛�", ForwardBackAction.class),
+
+ ROTATOPN_LEFT_RIGHT(0x82, "鐐瑰姩鏃嬭浆锛堝簳鐩橈級", RotatopnLeftRight.class),
+
+
;
public int cmdCode;
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index b74cc54..09d3d11 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -23,7 +23,7 @@
android:layout_height="100sp"
android:layout_margin="30sp"
android:text="STOP"
- android:textSize="20sp"
+ android:textSize="18sp"
android:layout_centerInParent="true"
android:backgroundTint="#F62727" />
@@ -54,30 +54,30 @@
android:minWidth="10dp"
android:backgroundTint="#2196F3" />
- <com.google.android.material.button.MaterialButton
- android:id="@+id/btn_up"
- 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:layout_alignLeft="@+id/btn_rotatopn_left"
- android:layout_alignBottom="@+id/btn_go_backward"
- android:backgroundTint="#2196F3" />
+<!-- <com.google.android.material.button.MaterialButton-->
+<!-- android:id="@+id/btn_up"-->
+<!-- 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:layout_alignLeft="@+id/btn_rotatopn_left"-->
+<!-- android:layout_alignBottom="@+id/btn_go_backward"-->
+<!-- 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_marginRight="20sp"
+ android:layout_marginLeft="20sp"
android:layout_centerVertical="true"
- android:layout_alignParentRight="true"
+ android:layout_alignParentLeft="true"
app:cornerRadius="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
@@ -89,46 +89,46 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="鍙虫棆杞�"
- android:layout_marginLeft="20sp"
+ android:layout_marginRight="20sp"
android:layout_centerVertical="true"
- android:layout_alignParentLeft="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_extend_fork"
- 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:layout_alignLeft="@+id/btn_rotatopn_left"
- android:layout_alignBottom="@+id/btn_go_forward"
- android:backgroundTint="#2196F3" />
+<!-- <com.google.android.material.button.MaterialButton-->
+<!-- android:id="@+id/btn_extend_fork"-->
+<!-- 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:layout_alignLeft="@+id/btn_rotatopn_left"-->
+<!-- android:layout_alignBottom="@+id/btn_go_forward"-->
+<!-- android:backgroundTint="#2196F3" />-->
- <com.google.android.material.button.MaterialButton
- android:id="@+id/btn_collect_fork"
- 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:layout_alignLeft="@+id/btn_rotatopn_left"
- android:layout_alignBottom="@+id/btn_go_backward"
- android:backgroundTint="#2196F3" />
+<!-- <com.google.android.material.button.MaterialButton-->
+<!-- android:id="@+id/btn_collect_fork"-->
+<!-- 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:layout_alignLeft="@+id/btn_rotatopn_right"-->
+<!-- android:layout_alignBottom="@+id/btn_go_backward"-->
+<!-- android:backgroundTint="#2196F3" />-->
</RelativeLayout>
<!-- <LinearLayout-->
@@ -162,24 +162,7 @@
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
android:layout_width="0dp"
@@ -206,10 +189,10 @@
android:layout_weight="1"
android:gravity="center">
<com.google.android.material.button.MaterialButton
- android:id="@+id/btn_function_switch"
+ android:id="@+id/btn_body_switch"
android:layout_width="wrap_content"
android:layout_height="40dp"
- android:text="鍔熻兘鍒囨崲"
+ android:text="搴曠洏"
android:layout_centerHorizontal="true"
app:cornerRadius="5dp"
android:paddingLeft="10dp"
@@ -219,6 +202,63 @@
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: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>
--
Gitblit v1.9.1