航线
@ -41,7 +41,6 @@ public class LoginActivity extends AppCompatActivity {
|
||||
// Log.d("myReceiver_HEARTBEAT", Tool.getDecToFirstBin("128"));
|
||||
// Log.d("myReceiver_HEARTBEAT", Tool.getDecToBinFull("128"));
|
||||
|
||||
|
||||
initData();
|
||||
initView();
|
||||
initOnClick();
|
||||
@ -64,9 +63,6 @@ public class LoginActivity extends AppCompatActivity {
|
||||
private void initView() {
|
||||
//所有组件
|
||||
allView = new AllView(this);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -25,6 +25,8 @@ import android.graphics.Outline;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
@ -74,6 +76,8 @@ import com.example.longyi_groundstation.Main.View.DpadView;
|
||||
import com.example.longyi_groundstation.Main.View.ErrorLogDialog;
|
||||
import com.example.longyi_groundstation.Main.View.FPV_Void;
|
||||
import com.example.longyi_groundstation.Main.View.LandDialog;
|
||||
import com.example.longyi_groundstation.Main.View.PointFlyDialog;
|
||||
import com.example.longyi_groundstation.Main.View.SaveLinkNameDialog;
|
||||
import com.example.longyi_groundstation.Main.View.SlideToUnlockView;
|
||||
import com.example.longyi_groundstation.Main.View.StartExecuteDialog;
|
||||
import com.example.longyi_groundstation.Main.View.TakeOffDialog;
|
||||
@ -129,7 +133,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
//广播接收器
|
||||
private MyReceiver myReceiver_ATTITUDE, myReceiver_GPS_RAW_INT, myReceiver_GLOBAL_POSITION_INT,
|
||||
myReceiver_POWER_STATUS, myReceiver_SYS_STATUS, myReceiver_STATUSTEXT,
|
||||
myReceiver_HEARTBEAT, myReceiver_VFR_HUD,myReceiver_MISSION_REQUEST,myReceiver_MISSION_ACK;
|
||||
myReceiver_HEARTBEAT, myReceiver_VFR_HUD, myReceiver_MISSION_REQUEST, myReceiver_MISSION_ACK,
|
||||
myReceiver_MISSION_CURRENT;
|
||||
//所有组件
|
||||
private AllView allView;
|
||||
private ArrayList<Msg> typeList = new ArrayList<>();
|
||||
@ -138,15 +143,15 @@ public class MainActivity extends AppCompatActivity {
|
||||
private TurnBackDialog turnBackDialog;//返航弹窗
|
||||
private LandDialog landDialog;//降落弹窗
|
||||
private BombingDialog bombingDialog;//投弹弹窗
|
||||
private PointFlyDialog pointFlyDialog;//指点飞行弹窗
|
||||
public static StartExecuteDialog startExecuteDialog;//开始执行弹窗
|
||||
|
||||
private SaveLinkNameDialog saveLinkNameDialog;//二次确认路线名称弹窗
|
||||
private ArrayList<LogItem> LogItemList = new ArrayList<>();
|
||||
private LogAdapter adapter;
|
||||
private FPV_Void fpvVoid = new FPV_Void();
|
||||
private int mainDisplay = 1;//1:Map 2:FPV
|
||||
private Intent intent;
|
||||
private Marker mainMarker;
|
||||
private Marker flyMarker;
|
||||
private FlyVoid flyVoid = new FlyVoid();
|
||||
private boolean islocation = true;//是否第一次定位
|
||||
private LatLng homeLatLng = null;
|
||||
@ -161,8 +166,14 @@ public class MainActivity extends AppCompatActivity {
|
||||
// 在成员变量部分添加
|
||||
private CreateLinkAdapter createLinkAdapter;
|
||||
private List<CreateLink> createLinkList = new ArrayList<>();
|
||||
private ArrayList<CreateLink> selectedLinkList = null;//当前选择的航线
|
||||
public boolean isUnlock = false;//是否解锁
|
||||
private ArrayList<CreateLink> selectedLinkList = new ArrayList<>();//当前选择的航线
|
||||
private ArrayList<CreateLink> uploadLinkList = new ArrayList<>();//当前上传的航线
|
||||
public static boolean isUnlock = false;//是否解锁
|
||||
public boolean isAdviseFly = true;//是否可以使用指点飞行
|
||||
// 创建航线列表适配器
|
||||
private AllLinkAdapter allLinkAdapter;
|
||||
private SQLClass sqlClass;
|
||||
private List<SQLClass.LinkListInfo> linkListInfoList;
|
||||
|
||||
|
||||
@Override
|
||||
@ -180,6 +191,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
initView();
|
||||
initReceiver();
|
||||
initOnClick();
|
||||
mapVoid.startFlightTracking();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -290,6 +303,16 @@ public class MainActivity extends AppCompatActivity {
|
||||
registerReceiver(myReceiver_MISSION_ACK, filter10);
|
||||
}
|
||||
|
||||
//目标航点
|
||||
myReceiver_MISSION_CURRENT = new MyReceiver();
|
||||
IntentFilter filter11 = new IntentFilter("Broadcast_MISSION_CURRENT");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
registerReceiver(myReceiver_MISSION_CURRENT, filter11, Context.RECEIVER_EXPORTED);
|
||||
} else {
|
||||
registerReceiver(myReceiver_MISSION_CURRENT, filter11);
|
||||
}
|
||||
|
||||
|
||||
// 初始化数据源
|
||||
typeList = new ArrayList<>();
|
||||
typeList.add(new Msg("relative_alt", "0", true));
|
||||
@ -320,16 +343,10 @@ public class MainActivity extends AppCompatActivity {
|
||||
allView = new AllView(this);
|
||||
//地图全局方法类
|
||||
mapVoid = new MapVoid(MainActivity.this);
|
||||
mainMarker = mapVoid.aMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f) // 设置锚点为图片中心
|
||||
.title("飞机").snippet("型号"));
|
||||
// 更换 Marker 图标
|
||||
mainMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_fly));
|
||||
mainMarker = mapVoid.aMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f)); // 设置锚点为图片中心
|
||||
|
||||
|
||||
flyMarker = mapVoid.aMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f) // 设置锚点为图片中心
|
||||
.title("飞机").snippet("型号"));
|
||||
// 更换 Marker 图标
|
||||
flyMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_fly));
|
||||
mainMarker.setIcon(BitmapDescriptorFactory.fromResource(R.mipmap.icon_fly));
|
||||
|
||||
Intent intents = new Intent(this, MyBoundService.class);
|
||||
intents.putExtra("type", intent.getIntExtra("type", 0));
|
||||
@ -361,13 +378,18 @@ public class MainActivity extends AppCompatActivity {
|
||||
bombingDialog = new BombingDialog(MainActivity.this);
|
||||
//开始执行弹窗
|
||||
startExecuteDialog = new StartExecuteDialog(this, "10");
|
||||
//指点飞行弹窗
|
||||
pointFlyDialog = new PointFlyDialog(this);
|
||||
//保存航线弹窗
|
||||
saveLinkNameDialog = new SaveLinkNameDialog(this);
|
||||
|
||||
|
||||
allView.rv_error_list.setLayoutManager(new LinearLayoutManager(this));
|
||||
adapter = new LogAdapter();
|
||||
allView.rv_error_list.setAdapter(adapter);
|
||||
|
||||
// 初始化路线适配器
|
||||
createLinkAdapter = new CreateLinkAdapter();
|
||||
// 初始化航线适配器
|
||||
createLinkAdapter = new CreateLinkAdapter(this);
|
||||
allView.rv_create_link_list.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
|
||||
allView.rv_create_link_list.setAdapter(createLinkAdapter);
|
||||
|
||||
@ -390,14 +412,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
//拿到数据库里所有的航线
|
||||
setupAllLinkList();
|
||||
|
||||
//设置滑动解锁的view属性
|
||||
allView.unlockView.setText("滑动解锁");
|
||||
// 设置背景圆角弧度为10dp
|
||||
allView.unlockView.setCornerRadius(4);
|
||||
// 设置滑块圆角弧度为5dp
|
||||
allView.unlockView.setThumbCornerRadius(4);
|
||||
// 设置组件半透明(50%透明度)
|
||||
allView.unlockView.setComponentAlpha(128);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -411,17 +425,17 @@ public class MainActivity extends AppCompatActivity {
|
||||
//广播接收-ATTITUDE
|
||||
myReceiver_ATTITUDE.setATTITUDEListener(data -> {
|
||||
// 这里可以更新 UI 或刷新数据
|
||||
// Log.d(TAG, "收到新数据ATTITUDE:" + data.toString());
|
||||
Log.d(TAG, "收到新数据ATTITUDE:" +MyReceiver.ATTITUDE_json.optDouble("yaw"));
|
||||
// allView.tv_connect.setText("已连接");
|
||||
|
||||
// 示例:更新 typeList 数据并刷新 RecyclerView
|
||||
if (data != null) {
|
||||
flyVoid.setAttitude(getApplicationContext(), allView, MyReceiver.ATTITUDE_json.optDouble("roll"), MyReceiver.ATTITUDE_json.optDouble("pitch"), MyReceiver.ATTITUDE_json.optDouble("yaw"));
|
||||
flyVoid.setAttitude(getApplicationContext(), allView, MyReceiver.ATTITUDE_json.optDouble("roll"), MyReceiver.ATTITUDE_json.optDouble("pitch"),(int) Math.round(MyReceiver.ATTITUDE_json.optDouble("yaw") * 57.3));
|
||||
}
|
||||
//地图上飞机的朝向
|
||||
mainMarker.setRotateAngle((int) Math.toDegrees(MyReceiver.ATTITUDE_json.optDouble("yaw")));
|
||||
mainMarker.setRotateAngle( (int) Math.round(MyReceiver.ATTITUDE_json.optDouble("yaw")* 57.3) * -1);
|
||||
|
||||
allView.tv_yaw.setText((int) Math.toDegrees(MyReceiver.ATTITUDE_json.optDouble("yaw")) + "°");
|
||||
allView.tv_yaw.setText((int) Math.round(MyReceiver.ATTITUDE_json.optDouble("yaw") * 57.3) + "°");
|
||||
mainMarker.setVisible(true);
|
||||
});
|
||||
|
||||
@ -445,6 +459,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
(MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lon", 0) / 10000000),
|
||||
(MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000));
|
||||
|
||||
|
||||
if (doubles[1] != 0) {
|
||||
//获取到位置后移动视角到当前位置
|
||||
if (islocation) {
|
||||
@ -475,6 +490,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
typeAdapter.notifyDataSetChanged();
|
||||
if (FlyVoid.parseSerialData != null) {
|
||||
// allView.tv_height.setText(Math.round((MyReceiver.GLOBAL_POSITION_INT_json.optDouble("relative_alt") / 100) / 10.0) + "m");
|
||||
// Toast.makeText(this, flyVoid.parseSerialData[0]+"", Toast.LENGTH_SHORT).show();
|
||||
allView.tv_height.setText(flyVoid.parseSerialData[0] + "m");
|
||||
}
|
||||
}
|
||||
@ -534,20 +550,20 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
isUnlock = Tool.getDecToFirstBin(MyReceiver.HEARTBEAT_json.optString("base_mode")).equals("1");
|
||||
|
||||
if (allView.ll_link_start.getVisibility() == VISIBLE){
|
||||
if (allView.ll_link_start.getVisibility() == VISIBLE) {
|
||||
Log.d(TAG, "myReceiver_HEARTBEAT: " + data.toString());
|
||||
//判断飞控是否解锁
|
||||
if (Tool.getDecToFirstBin(MyReceiver.HEARTBEAT_json.optString("base_mode")).equals("1")){
|
||||
if (Tool.getDecToFirstBin(MyReceiver.HEARTBEAT_json.optString("base_mode")).equals("1")) {
|
||||
//已解锁
|
||||
allView.rl_unlock.setVisibility(View.GONE);
|
||||
allView.ll_link_start_fun2.setVisibility(VISIBLE);
|
||||
}else {
|
||||
if (allView.rl_unlock.getVisibility() == View.GONE){
|
||||
//未解锁
|
||||
allView.rl_unlock.setVisibility(View.VISIBLE);
|
||||
allView.unlockView.resetToInitialState("滑动解锁");
|
||||
allView.ll_link_start_fun2.setVisibility(GONE);
|
||||
}
|
||||
// allView.rl_unlock.setVisibility(View.GONE);
|
||||
// allView.ll_link_start_fun2.setVisibility(VISIBLE);
|
||||
} else {
|
||||
//未解锁
|
||||
// if (allView.rl_unlock.getVisibility() == View.GONE){
|
||||
// allView.rl_unlock.setVisibility(View.VISIBLE);
|
||||
// allView.unlockView.resetToInitialState("滑动解锁");
|
||||
// allView.ll_link_start_fun2.setVisibility(GONE);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@ -607,16 +623,16 @@ public class MainActivity extends AppCompatActivity {
|
||||
// data.optDouble("throttle")/100,
|
||||
// 1
|
||||
// )));
|
||||
if (data.optDouble("throttle") > 0){
|
||||
typeList.set(2, new Msg("throttle", String.format("%.1f", MyTool.getThrottle(
|
||||
if (data.optDouble("throttle") > 0) {
|
||||
typeList.set(2, new Msg("throttle", String.format("%.1f", MyTool.getThrottle(
|
||||
Double.parseDouble(FlyVoid.paramList.get("MOT_SPIN_MIN").getParam_value()),
|
||||
Double.parseDouble(FlyVoid.paramList.get("MOT_SPIN_MAX").getParam_value()),
|
||||
Double.parseDouble(FlyVoid.paramList.get("MOT_THST_EXPO").getParam_value()),
|
||||
data.optDouble("throttle")/100,
|
||||
data.optDouble("throttle") / 100,
|
||||
1
|
||||
)*100) + "%", true));
|
||||
}else {
|
||||
typeList.set(2, new Msg("throttle","0%", true));
|
||||
) * 100) + "%", true));
|
||||
} else {
|
||||
typeList.set(2, new Msg("throttle", "0%", true));
|
||||
}
|
||||
});
|
||||
|
||||
@ -627,9 +643,16 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
//广播接收-setMissionAcklistener
|
||||
myReceiver_MISSION_ACK.setMissionAcklistener(data -> {
|
||||
Log.d(TAG, "myReceiver_MISSION_ACK: "+data.toString());
|
||||
Log.d(TAG, "myReceiver_MISSION_ACK: " + data.toString());
|
||||
});
|
||||
|
||||
//广播接收-setMissionAcklistener
|
||||
myReceiver_MISSION_CURRENT.setMissionCurrentlistener(data -> {
|
||||
Log.d(TAG, "myReceiver_MISSION_CURRENT: " + data.toString());
|
||||
allView.tv_test1.setText(data.optInt("seq") + "");
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -680,7 +703,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//点击异常窗口
|
||||
allView.iv_error.setOnClickListener(v -> {
|
||||
|
||||
@ -692,7 +714,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
});
|
||||
|
||||
//点击定位到当前位置按钮
|
||||
allView.iv_location_me.setOnClickListener(v -> {
|
||||
allView.ll_location_me.setOnClickListener(v -> {
|
||||
if (MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000 != 0) {
|
||||
// 移动视图到Marker点
|
||||
mapVoid.aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000, MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lon", 0) / 10000000), 15)); // 15是缩放级别
|
||||
@ -722,37 +744,27 @@ public class MainActivity extends AppCompatActivity {
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
//路线执行
|
||||
allView.ll_line_fly_layout.setOnClickListener(v -> {
|
||||
|
||||
//清空所有线路,并且退出执行页面
|
||||
refreshLinkList();
|
||||
allView.v_mainDisplay.setVisibility(GONE);
|
||||
allView.ll_open_layout.setVisibility(GONE);
|
||||
allView.ll_text.setVisibility(GONE);
|
||||
allView.ll_link_start.setVisibility(VISIBLE);
|
||||
allView.ll_all_link_layout.setVisibility(VISIBLE);
|
||||
allView.fpvWidget.setVisibility(GONE);
|
||||
});
|
||||
|
||||
//路线执行-上传航线
|
||||
//航线执行-上传航线
|
||||
allView.ll_link_start_fun1.setOnClickListener(v -> {
|
||||
// 添加航线发送功能
|
||||
if (selectedLinkList != null) {
|
||||
if (selectedLinkList.size() > 0) {
|
||||
// 调用FlyVoid中的方法发送航线到飞控
|
||||
flyVoid.sendMissionToFlightController(this,
|
||||
selectedLinkList,
|
||||
allView.et_start_execute_height.getText().toString());
|
||||
|
||||
// 清除当前地图上的所有航点和航线
|
||||
// clearWaypoints();
|
||||
allView.v_mainDisplay.setVisibility(VISIBLE);
|
||||
allView.ll_open_layout.setVisibility(VISIBLE);
|
||||
allView.ll_text.setVisibility(VISIBLE);
|
||||
allView.ll_link_start.setVisibility(GONE);
|
||||
allView.ll_all_link_layout.setVisibility(GONE);
|
||||
allView.fpvWidget.setVisibility(VISIBLE);
|
||||
uploadLinkList.addAll(selectedLinkList);
|
||||
allView.ll_assistance_layout.setVisibility(VISIBLE);
|
||||
} else {
|
||||
Toast.makeText(this, "请选择航线", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
// // 清除当前地图上的所有航点和航线
|
||||
// clearWaypoints();
|
||||
// allView.v_mainDisplay.setVisibility(VISIBLE);
|
||||
// allView.ll_open_layout.setVisibility(VISIBLE);
|
||||
// allView.ll_text.setVisibility(VISIBLE);
|
||||
// allView.ll_link_start.setVisibility(GONE);
|
||||
// allView.ll_all_link_layout.setVisibility(GONE);
|
||||
// allView.fpvWidget.setVisibility(VISIBLE);
|
||||
});
|
||||
//开始执行
|
||||
allView.ll_link_start_fun2.setOnClickListener(v -> {
|
||||
@ -760,29 +772,35 @@ public class MainActivity extends AppCompatActivity {
|
||||
if (selectedLinkList != null) {
|
||||
// 调用FlyVoid中的方法发送航线到飞控
|
||||
//flyVoid.requestMissionStart(0,0);
|
||||
if (isUnlock){
|
||||
if (isUnlock) {
|
||||
startExecuteDialog.show();
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(this, "请先解锁", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(this, "请先选择航线", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//路线执行-退出
|
||||
//航线执行-退出
|
||||
allView.ll_link_start_back.setOnClickListener(v -> {
|
||||
// 清除当前地图上的所有航点和航线
|
||||
clearWaypoints();
|
||||
//判断是否选择了航线
|
||||
if (uploadLinkList != null) {
|
||||
// 清除当前地图上的所有航点和航线
|
||||
clearWaypoints();
|
||||
// 在地图上显示航线-之前上传的航线
|
||||
displayRouteOnMap(uploadLinkList);
|
||||
}
|
||||
allView.v_mainDisplay.setVisibility(VISIBLE);
|
||||
allView.ll_open_layout.setVisibility(VISIBLE);
|
||||
allView.ll_text.setVisibility(VISIBLE);
|
||||
allView.ll_link_start.setVisibility(GONE);
|
||||
allView.ll_all_link_layout.setVisibility(GONE);
|
||||
allView.fpvWidget.setVisibility(VISIBLE);
|
||||
allView.rl_unlock.setVisibility(View.GONE);
|
||||
allView.ll_assistance_layout.setVisibility(VISIBLE);
|
||||
isAdviseFly = true;
|
||||
});
|
||||
|
||||
allView.ll_left_open.setOnClickListener(v -> {
|
||||
@ -793,16 +811,23 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
//清除所有航线的方法
|
||||
allView.ll_clear.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
uploadLinkList.clear();
|
||||
// 清除所有航点和航线
|
||||
clearWaypoints();
|
||||
// 在地图上显示航线-清除选中点在更新地图
|
||||
displayRouteOnMap(uploadLinkList);
|
||||
Toast.makeText(this, "已清除", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
allView.ll_antenna.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
//路线规划
|
||||
allView.ll_map.setOnClickListener(v -> {
|
||||
// Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
|
||||
//添加航线跳转
|
||||
allView.tv_add_link.setOnClickListener(v -> {
|
||||
// 清除所有航点和航线
|
||||
clearWaypoints();
|
||||
isSetLink = true;
|
||||
allView.ll_all_link_layout.setVisibility(GONE);
|
||||
allView.ll_link_start.setVisibility(GONE);
|
||||
allView.v_mainDisplay.setVisibility(GONE);
|
||||
allView.ll_open_layout.setVisibility(GONE);
|
||||
allView.ll_text.setVisibility(GONE);
|
||||
@ -810,34 +835,33 @@ public class MainActivity extends AppCompatActivity {
|
||||
allView.ll_create_link_layout.setVisibility(VISIBLE);
|
||||
allView.fpvWidget.setVisibility(GONE);
|
||||
});
|
||||
//路线规划功能-保存
|
||||
allView.ll_link_save.setOnClickListener(v -> {
|
||||
// 初始化数据库
|
||||
SQLClass sqlClass = new SQLClass(this);
|
||||
// 添加一个CreateLink列表
|
||||
ArrayList<CreateLink> createLinkLists = new ArrayList<>();
|
||||
createLinkLists.addAll(createLinkList);
|
||||
// 添加CreateLink对象到列表中
|
||||
boolean success = sqlClass.addCreateLinkList("路线-"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()), createLinkLists);
|
||||
if (success){
|
||||
// 清除所有航点和航线
|
||||
clearWaypoints();
|
||||
isSetLink = false;
|
||||
allView.v_mainDisplay.setVisibility(VISIBLE);
|
||||
allView.ll_open_layout.setVisibility(VISIBLE);
|
||||
allView.ll_text.setVisibility(VISIBLE);
|
||||
allView.ll_link.setVisibility(GONE);
|
||||
allView.ll_create_link_layout.setVisibility(GONE);
|
||||
allView.fpvWidget.setVisibility(VISIBLE);
|
||||
// 获取列表数量
|
||||
int count = sqlClass.getLinkListCount();
|
||||
Toast.makeText(this, "保存成功-"+count, Toast.LENGTH_SHORT).show();
|
||||
|
||||
//航线规划
|
||||
allView.ll_map.setOnClickListener(v -> {
|
||||
// 清除所有航点和航线
|
||||
clearWaypoints();
|
||||
isAdviseFly = false;
|
||||
allView.ll_all_link_layout.setVisibility(VISIBLE);
|
||||
allView.ll_link_start.setVisibility(VISIBLE);
|
||||
allView.v_mainDisplay.setVisibility(GONE);
|
||||
allView.ll_open_layout.setVisibility(GONE);
|
||||
allView.ll_text.setVisibility(GONE);
|
||||
allView.ll_link.setVisibility(GONE);
|
||||
allView.ll_create_link_layout.setVisibility(GONE);
|
||||
allView.fpvWidget.setVisibility(GONE);
|
||||
allView.ll_assistance_layout.setVisibility(GONE);
|
||||
});
|
||||
//航线规划功能-保存
|
||||
allView.ll_link_save.setOnClickListener(v -> {
|
||||
if (allView.et_link_name.getText().toString().length() != 0){
|
||||
saveLink(null);
|
||||
}else {
|
||||
saveLinkNameDialog.show();
|
||||
}
|
||||
|
||||
});
|
||||
// 路线规划功能-1:反转航点顺序
|
||||
allView.ll_link_fun1.setOnClickListener(v -> {
|
||||
// 航线规划功能-1:反转航点顺序
|
||||
allView.tv_link_fun1.setOnClickListener(v -> {
|
||||
// 创建确认对话框
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("反转航点顺序");
|
||||
@ -850,6 +874,9 @@ public class MainActivity extends AppCompatActivity {
|
||||
// 反转航点标记列表
|
||||
java.util.Collections.reverse(waypointMarkers);
|
||||
|
||||
// 反转createLinkList列表
|
||||
java.util.Collections.reverse(createLinkList);
|
||||
|
||||
// 重新编号航点标记
|
||||
renumberWaypoints();
|
||||
|
||||
@ -866,8 +893,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
});
|
||||
// 路线规划功能-2:清除所有线路
|
||||
allView.ll_link_fun2.setOnClickListener(v -> {
|
||||
// 航线规划功能-2:清除所有线航
|
||||
allView.tv_link_fun2.setOnClickListener(v -> {
|
||||
// 创建确认对话框
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("清除所有航点");
|
||||
@ -886,46 +913,56 @@ public class MainActivity extends AppCompatActivity {
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
});
|
||||
//路线规划功能-退出
|
||||
//航线规划功能-退出
|
||||
allView.ll_link_back.setOnClickListener(v -> {
|
||||
// 创建确认对话框
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("退出");
|
||||
builder.setMessage("确定要退出嘛?退出前的航线不会保存");
|
||||
if (createLinkList.size() > 0) {
|
||||
// 创建确认对话框
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("退出");
|
||||
builder.setMessage("确定要退出嘛?退出前的航线不会保存");
|
||||
|
||||
builder.setPositiveButton("确定", (dialog, which) -> {
|
||||
builder.setPositiveButton("确定", (dialog, which) -> {
|
||||
// 清除所有航点和航线
|
||||
clearWaypoints();
|
||||
isSetLink = false;
|
||||
allView.ll_all_link_layout.setVisibility(VISIBLE);
|
||||
allView.ll_link_start.setVisibility(VISIBLE);
|
||||
allView.v_mainDisplay.setVisibility(GONE);
|
||||
allView.ll_open_layout.setVisibility(GONE);
|
||||
allView.ll_text.setVisibility(GONE);
|
||||
allView.ll_link.setVisibility(GONE);
|
||||
allView.ll_create_link_layout.setVisibility(GONE);
|
||||
allView.fpvWidget.setVisibility(GONE);
|
||||
displayRouteOnMap(selectedLinkList);
|
||||
dialog.dismiss();
|
||||
// 在地图上显示航线-之前上传的航线
|
||||
displayRouteOnMap(selectedLinkList);
|
||||
|
||||
});
|
||||
|
||||
builder.setNegativeButton("取消", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
});
|
||||
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
} else {
|
||||
// 清除所有航点和航线
|
||||
clearWaypoints();
|
||||
isSetLink = false;
|
||||
allView.v_mainDisplay.setVisibility(VISIBLE);
|
||||
allView.ll_open_layout.setVisibility(VISIBLE);
|
||||
allView.ll_text.setVisibility(VISIBLE);
|
||||
allView.ll_all_link_layout.setVisibility(VISIBLE);
|
||||
allView.ll_link_start.setVisibility(VISIBLE);
|
||||
allView.v_mainDisplay.setVisibility(GONE);
|
||||
allView.ll_open_layout.setVisibility(GONE);
|
||||
allView.ll_text.setVisibility(GONE);
|
||||
allView.ll_link.setVisibility(GONE);
|
||||
allView.ll_create_link_layout.setVisibility(GONE);
|
||||
allView.fpvWidget.setVisibility(VISIBLE);
|
||||
dialog.dismiss();
|
||||
});
|
||||
|
||||
builder.setNegativeButton("取消", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
});
|
||||
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
|
||||
allView.fpvWidget.setVisibility(GONE);
|
||||
}
|
||||
});
|
||||
|
||||
allView.ll_one_word.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
allView.ll_execute_line.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
allView.ll_joystick.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
allView.ll_fire.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
startExecuteDialog.show();
|
||||
});
|
||||
allView.ll_bombing.setOnClickListener(v -> {
|
||||
bombingDialog.show();
|
||||
@ -934,18 +971,12 @@ public class MainActivity extends AppCompatActivity {
|
||||
allView.ll_shout.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
allView.ll_thoroughfare.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
allView.ll_hook.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
allView.ll_searchlight.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
allView.ll_mode_select.setOnClickListener(v -> {
|
||||
Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
//初始化FPV手势处理
|
||||
fpvGestureHandler = new FpvGestureHandler(allView.fpvWidget);
|
||||
fpvGestureHandler.setOnFpvGestureListener(new FpvGestureHandler.OnFpvGestureListener() {
|
||||
@ -1257,6 +1288,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
byte[] testData = new byte[]{(byte) 0xFF, 0x01, 0x13, 0x03, 0x00, 0x00, 0x17};
|
||||
tcpClient.sendBytes(testData);
|
||||
});
|
||||
|
||||
//一键向下
|
||||
allView.ll_PTZ_one_bottom.setOnClickListener(v -> {
|
||||
// 发送左转数据
|
||||
@ -1327,9 +1359,19 @@ public class MainActivity extends AppCompatActivity {
|
||||
// 设置地图点击监听器以添加航点
|
||||
allView.map.getMap().setOnMapClickListener(latLng -> {
|
||||
if (isSetLink) {
|
||||
// Log.d("setOnMapClickListener", latLng.toString()+"++"+isSetLink);
|
||||
addWaypoint(latLng);
|
||||
}
|
||||
});
|
||||
|
||||
//地图长按
|
||||
allView.map.getMap().setOnMapLongClickListener(latLng -> {
|
||||
if (isAdviseFly) {
|
||||
pointFlyDialog.setLatLng(latLng);
|
||||
pointFlyDialog.show();
|
||||
}
|
||||
});
|
||||
|
||||
// 设置标记点击监听器以删除航点
|
||||
allView.map.getMap().setOnMarkerClickListener(marker -> {
|
||||
if (isSetLink) {
|
||||
@ -1365,16 +1407,120 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
allView.unlockView.setOnUnlockListener(new SlideToUnlockView.OnUnlockListener() {
|
||||
//根据输入的文字模糊查询(名字)搜索框
|
||||
allView.et_link_search.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void onUnlock() {
|
||||
// 解锁飞机
|
||||
flyVoid.requestArm();
|
||||
allView.rl_unlock.setVisibility(View.GONE);
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
// 不需要实现
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
// 实时查询
|
||||
filterLinkList(s.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
// 不需要实现
|
||||
}
|
||||
});
|
||||
|
||||
//清除飞行轨迹
|
||||
allView.ll_clear_fly_line.setOnClickListener(v -> {
|
||||
if (mapVoid.isTracking){
|
||||
mapVoid.isTracking = false;
|
||||
mapVoid.clearFlightTrack();
|
||||
mapVoid.stopFlightTracking();
|
||||
}else {
|
||||
mapVoid.startFlightTracking();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//开启|关闭航线点位
|
||||
allView.iv_open_link_list.setOnClickListener(v -> {
|
||||
if (allView.ll_create_link_item_layout.getVisibility() == View.GONE){
|
||||
allView.ll_create_link_item_layout.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
allView.ll_create_link_item_layout.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法:保存航线
|
||||
*
|
||||
* @cuijingzhou
|
||||
*/
|
||||
public void saveLink( String linkName) {
|
||||
// 初始化数据库
|
||||
SQLClass sqlClass = new SQLClass(this);
|
||||
// 添加一个CreateLink列表
|
||||
ArrayList<CreateLink> createLinkLists = new ArrayList<>();
|
||||
if (createLinkList.size() > 0) {
|
||||
createLinkLists.addAll(createLinkList);
|
||||
boolean success;
|
||||
if (linkName == null){
|
||||
// 添加CreateLink对象到列表中
|
||||
if (allView.et_link_name.getText().toString().length() != 0) {
|
||||
success = sqlClass.addCreateLinkList(allView.et_link_name.getText().toString(), createLinkLists);
|
||||
} else {
|
||||
success = sqlClass.addCreateLinkList("航线-" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()), createLinkLists);
|
||||
}
|
||||
}else {
|
||||
success = sqlClass.addCreateLinkList(linkName, createLinkLists);
|
||||
}
|
||||
|
||||
if (success) {
|
||||
// 清除所有航点和航线
|
||||
clearWaypoints();
|
||||
isSetLink = false;
|
||||
allView.ll_all_link_layout.setVisibility(VISIBLE);
|
||||
allView.ll_link_start.setVisibility(VISIBLE);
|
||||
allView.v_mainDisplay.setVisibility(GONE);
|
||||
allView.ll_open_layout.setVisibility(GONE);
|
||||
allView.ll_text.setVisibility(GONE);
|
||||
allView.ll_link.setVisibility(GONE);
|
||||
allView.ll_create_link_layout.setVisibility(GONE);
|
||||
allView.fpvWidget.setVisibility(GONE);
|
||||
allView.et_link_name.setText("");
|
||||
// 在地图上显示航线-之前选中的航线
|
||||
displayRouteOnMap(selectedLinkList);
|
||||
refreshLinkList();//刷新航线列表
|
||||
Toast.makeText(this, "航线保存成功", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(this, "请先添加航点", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 添加过滤方法
|
||||
private void filterLinkList(String query) {
|
||||
if (sqlClass != null && allLinkAdapter != null) {
|
||||
if (query.isEmpty()) {
|
||||
// 如果查询为空,显示所有数据
|
||||
List<SQLClass.LinkListInfo> allList = sqlClass.getAllLinkListInfo();
|
||||
allLinkAdapter.updateDataList(allList);
|
||||
} else {
|
||||
// 根据输入文字模糊查询
|
||||
List<SQLClass.LinkListInfo> filteredList = new ArrayList<>();
|
||||
List<SQLClass.LinkListInfo> fullList = sqlClass.getAllLinkListInfo();
|
||||
|
||||
for (SQLClass.LinkListInfo item : fullList) {
|
||||
// 模糊匹配航线名称
|
||||
if (item.getListName().toLowerCase().contains(query.toLowerCase())) {
|
||||
filteredList.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
allLinkAdapter.updateDataList(filteredList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1387,7 +1533,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
// 创建自定义对话框
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle("删除航点");
|
||||
builder.setMessage("确定要删除点位" +(index+1) + "吗?");
|
||||
builder.setMessage("确定要删除航点" + (index + 1) + "吗?");
|
||||
|
||||
builder.setPositiveButton("确定", (dialog, which) -> {
|
||||
// 删除航点时同时删除对应的列表项
|
||||
@ -1409,7 +1555,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
// 创建自定义标记视图
|
||||
View markerView = getLayoutInflater().inflate(R.layout.custom_marker_layout, null);
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"}) TextView markerText = markerView.findViewById(R.id.marker_text);
|
||||
markerText.setText("点位" + (waypointMarkers.size() + 1));
|
||||
markerText.setText( "" + (waypointMarkers.size() + 1));
|
||||
|
||||
// 将视图转换为Bitmap
|
||||
markerView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
|
||||
@ -1430,7 +1576,15 @@ public class MainActivity extends AppCompatActivity {
|
||||
waypointPositions.add(latLng);
|
||||
|
||||
// 添加到列表
|
||||
CreateLink createLink = new CreateLink("点位" + waypointMarkers.size(), 30, 10, waypointMarkers.size() - 1, latLng);
|
||||
CreateLink createLink = new CreateLink(
|
||||
waypointMarkers.size()+"",
|
||||
30,
|
||||
10,
|
||||
waypointMarkers.size() - 1,
|
||||
latLng,
|
||||
true,
|
||||
true
|
||||
);
|
||||
createLinkList.add(createLink);
|
||||
createLinkAdapter.setCreateLinkList(createLinkList);
|
||||
|
||||
@ -1462,20 +1616,22 @@ public class MainActivity extends AppCompatActivity {
|
||||
private void renumberWaypoints() {
|
||||
for (int i = 0; i < waypointMarkers.size(); i++) {
|
||||
// 创建新的自定义标记Bitmap
|
||||
Bitmap markerBitmap = createCustomMarkerBitmap("点位" + (i + 1));
|
||||
Bitmap markerBitmap = createCustomMarkerBitmap( (i + 1)+"");
|
||||
// 更新标记图标
|
||||
waypointMarkers.get(i).setIcon(BitmapDescriptorFactory.fromBitmap(markerBitmap));
|
||||
|
||||
// 更新列表项名称
|
||||
if (i < createLinkList.size()) {
|
||||
createLinkList.get(i).setName("点位" + (i + 1));
|
||||
createLinkList.get(i).setName( (i + 1)+"");
|
||||
}
|
||||
}
|
||||
|
||||
createLinkAdapter.setCreateLinkList(createLinkList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建自定义标记Bitmap
|
||||
*
|
||||
* @param text 标记文字
|
||||
* @return Bitmap
|
||||
*/
|
||||
@ -1502,6 +1658,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
waypointMarkers.clear();
|
||||
waypointPositions.clear();
|
||||
createLinkList.clear();
|
||||
selectedLinkList.clear();
|
||||
createLinkAdapter.setCreateLinkList(createLinkList);
|
||||
|
||||
// 移除航线
|
||||
@ -1523,7 +1680,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 更新航线显示
|
||||
*/
|
||||
@ -1538,8 +1694,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
if (waypointPositions.size() > 1) {
|
||||
flightPathPolyline = allView.map.getMap().addPolyline(new PolylineOptions()
|
||||
.addAll(waypointPositions)
|
||||
.width(8)
|
||||
.color(Color.BLACK));
|
||||
.width(6)
|
||||
.color(Color.parseColor("#FFEB3B")));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1553,10 +1709,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
|
||||
// 创建航线列表适配器
|
||||
private AllLinkAdapter allLinkAdapter;
|
||||
private SQLClass sqlClass;
|
||||
private List<SQLClass.LinkListInfo> linkListInfoList;
|
||||
private void setupAllLinkList() {
|
||||
// 初始化数据库
|
||||
sqlClass = new SQLClass(this);
|
||||
@ -1573,14 +1725,13 @@ public class MainActivity extends AppCompatActivity {
|
||||
allLinkAdapter.setOnItemClickListener(new AllLinkAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(int listId, int position) {
|
||||
// 清除当前地图上的所有航点和航线
|
||||
// 清除所有航点和航线
|
||||
clearWaypoints();
|
||||
selectedLinkList = null;
|
||||
// 从数据库中获取选中的航线数据
|
||||
selectedLinkList = sqlClass.getCreateLinkList(listId);
|
||||
if (selectedLinkList != null) {
|
||||
Toast.makeText(MainActivity.this, "已加载航线: " + linkListInfoList.get(position).getListName(),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
if (selectedLinkList.size() > 0) {
|
||||
// Toast.makeText(MainActivity.this, "已加载航线: " + linkListInfoList.get(position).getListName(),
|
||||
// Toast.LENGTH_SHORT).show();
|
||||
// 在地图上显示航线
|
||||
displayRouteOnMap(selectedLinkList);
|
||||
} else {
|
||||
@ -1601,11 +1752,10 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
/**
|
||||
* 在地图上显示航线
|
||||
*
|
||||
* @param createLinkList 航线数据列表
|
||||
*/
|
||||
private void displayRouteOnMap(ArrayList<CreateLink> createLinkList) {
|
||||
// 清除现有的航点和航线
|
||||
clearWaypoints();
|
||||
|
||||
// 遍历航线数据并在地图上显示
|
||||
for (int i = 0; i < createLinkList.size(); i++) {
|
||||
@ -1645,7 +1795,9 @@ public class MainActivity extends AppCompatActivity {
|
||||
createLink.getHeight(),
|
||||
createLink.getSpeed(),
|
||||
createLink.getWaypointIndex(),
|
||||
latLng
|
||||
latLng,
|
||||
createLink.isBom1_show(),
|
||||
createLink.isBom2_show()
|
||||
);
|
||||
this.createLinkList.add(newCreateLink);
|
||||
}
|
||||
@ -1663,8 +1815,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
@ -1726,9 +1876,10 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
fpvVoid.Fstop(allView.fpvWidget);
|
||||
//关闭航线
|
||||
mapVoid.stopFlightTracking();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
@ -6,6 +6,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@ -47,6 +48,12 @@ public class AllLinkAdapter extends RecyclerView.Adapter<AllLinkAdapter.AllLinkV
|
||||
public void onBindViewHolder(@NonNull AllLinkViewHolder holder, int position) {
|
||||
SQLClass.LinkListInfo linkListInfo = linkListInfoList.get(position);
|
||||
|
||||
if (linkListInfo.isSelect()){
|
||||
holder.ll_main.setBackgroundResource(R.drawable.ff029a45_4round_1stroke_bg);
|
||||
}else {
|
||||
holder.ll_main.setBackgroundResource(R.drawable.x80000000_4round_1stroke_bg);
|
||||
}
|
||||
|
||||
// 显示航线名称
|
||||
holder.tv_title.setText(linkListInfo.getListName());
|
||||
|
||||
@ -70,11 +77,28 @@ public class AllLinkAdapter extends RecyclerView.Adapter<AllLinkAdapter.AllLinkV
|
||||
// 设置整个item的点击事件
|
||||
holder.itemView.setOnClickListener(v -> {
|
||||
if (onItemClickListener != null) {
|
||||
setSelects(position);
|
||||
onItemClickListener.onItemClick(linkListInfo.getListId(), position);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法:选择其中一个航线列表
|
||||
*
|
||||
* @cuijingzhou
|
||||
*/
|
||||
public void setSelects(int position){
|
||||
for (int i = 0; i < linkListInfoList.size(); i++){
|
||||
if (i != position){
|
||||
linkListInfoList.get(i).setSelect(false);
|
||||
} else {
|
||||
linkListInfoList.get(i).setSelect(true);
|
||||
}
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return linkListInfoList != null ? linkListInfoList.size() : 0;
|
||||
@ -127,6 +151,7 @@ public class AllLinkAdapter extends RecyclerView.Adapter<AllLinkAdapter.AllLinkV
|
||||
}
|
||||
|
||||
static class AllLinkViewHolder extends RecyclerView.ViewHolder {
|
||||
LinearLayout ll_main;
|
||||
TextView tv_title;
|
||||
TextView tv_time;
|
||||
TextView tv_number;
|
||||
@ -138,6 +163,7 @@ public class AllLinkAdapter extends RecyclerView.Adapter<AllLinkAdapter.AllLinkV
|
||||
tv_time = itemView.findViewById(R.id.tv_time);
|
||||
tv_number = itemView.findViewById(R.id.tv_number);
|
||||
tv_del = itemView.findViewById(R.id.tv_del);
|
||||
ll_main = itemView.findViewById(R.id.ll_main);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,19 @@
|
||||
// 文件: CreateLinkAdapter.java
|
||||
package com.example.longyi_groundstation.Main.Adapter;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -19,13 +28,18 @@ import java.util.List;
|
||||
public class CreateLinkAdapter extends RecyclerView.Adapter<CreateLinkAdapter.ViewHolder> {
|
||||
private List<CreateLink> createLinkList;
|
||||
private OnItemClickListener onItemClickListener;
|
||||
private Activity content;
|
||||
public static ArrayList<Boolean> isExpand = new ArrayList<>();//当前两个弹舱是否可以使用 0=弹舱1 1=弹舱2
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onDeleteClick(int position);
|
||||
}
|
||||
|
||||
public CreateLinkAdapter() {
|
||||
public CreateLinkAdapter(Activity content) {
|
||||
this.createLinkList = new ArrayList<>();
|
||||
this.content = content;
|
||||
isExpand.add(true);
|
||||
isExpand.add(true);
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener listener) {
|
||||
@ -60,22 +74,111 @@ public class CreateLinkAdapter extends RecyclerView.Adapter<CreateLinkAdapter.Vi
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
private TextView tvDel,tv_title;
|
||||
private EditText etHeight;
|
||||
private EditText etSpeed;
|
||||
private LinearLayout ll_item;
|
||||
private LinearLayout ll_expand;
|
||||
private TextView tvDel, tv_title;
|
||||
private EditText etHeight, et_lat, et_lon;
|
||||
private RelativeLayout rl_turn;
|
||||
private TextView tv_turn;
|
||||
private Spinner sp_turn;
|
||||
private TextView tv_expand;
|
||||
private LinearLayout ll_bom_layout1, ll_bom_layout2;
|
||||
private TextView tv_bom_text1, tv_bom_text2;
|
||||
private ImageView iv_bom1, iv_bom2;
|
||||
private EditText et_bom1, et_bom2;
|
||||
private LinearLayout ll_turn;
|
||||
private EditText et_turn_time;
|
||||
private TextView tv_null_data;
|
||||
|
||||
// private LinearLayout ll_bom_height_layout1, ll_bom_height_layout2;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
ll_item = itemView.findViewById(R.id.ll_item);
|
||||
tvDel = itemView.findViewById(R.id.tv_del);
|
||||
tv_title = itemView.findViewById(R.id.tv_title);
|
||||
etHeight = itemView.findViewById(R.id.et_height);
|
||||
etSpeed = itemView.findViewById(R.id.et_speed);
|
||||
et_lat = itemView.findViewById(R.id.et_lat);
|
||||
et_lon = itemView.findViewById(R.id.et_lon);
|
||||
rl_turn = itemView.findViewById(R.id.rl_turn);
|
||||
tv_turn = itemView.findViewById(R.id.tv_turn);
|
||||
sp_turn = itemView.findViewById(R.id.sp_turn);
|
||||
ll_expand = itemView.findViewById(R.id.ll_expand);
|
||||
tv_expand = itemView.findViewById(R.id.tv_expand);
|
||||
ll_bom_layout1 = itemView.findViewById(R.id.ll_bom_layout1);
|
||||
tv_bom_text1 = itemView.findViewById(R.id.tv_bom_text1);
|
||||
iv_bom1 = itemView.findViewById(R.id.iv_bom1);
|
||||
et_bom1 = itemView.findViewById(R.id.et_bom1);
|
||||
ll_bom_layout2 = itemView.findViewById(R.id.ll_bom_layout2);
|
||||
tv_bom_text2 = itemView.findViewById(R.id.tv_bom_text2);
|
||||
iv_bom2 = itemView.findViewById(R.id.iv_bom2);
|
||||
et_bom2 = itemView.findViewById(R.id.et_bom2);
|
||||
ll_turn = itemView.findViewById(R.id.ll_turn);
|
||||
et_turn_time = itemView.findViewById(R.id.et_turn_time);
|
||||
tv_null_data = itemView.findViewById(R.id.tv_null_data);
|
||||
// ll_bom_height_layout1 = itemView.findViewById(R.id.ll_bom_height_layout1);
|
||||
// ll_bom_height_layout2 = itemView.findViewById(R.id.ll_bom_height_layout2);
|
||||
}
|
||||
|
||||
public void bind(CreateLink createLink, int position) {
|
||||
etHeight.setText(String.valueOf((int) createLink.getHeight()));
|
||||
etSpeed.setText(String.valueOf((int) createLink.getSpeed()));
|
||||
tv_title.setText(createLink.getName());
|
||||
// 修改为保留7位小数
|
||||
et_lat.setText(String.format("%.7f", createLink.getLatLng().latitude));
|
||||
et_lon.setText(String.format("%.7f", createLink.getLatLng().longitude));
|
||||
|
||||
// 链路保护动作Spinner
|
||||
String[] linkOptions = {"协调转弯", "到点转弯"};
|
||||
ArrayAdapter<String> linkAdapter = new ArrayAdapter<>(content,
|
||||
android.R.layout.simple_spinner_item, linkOptions);
|
||||
linkAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
sp_turn.setAdapter(linkAdapter);
|
||||
|
||||
|
||||
|
||||
//投弹是否显示
|
||||
if (createLink.isBom1_show()){
|
||||
ll_bom_layout1.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
ll_bom_layout1.setVisibility(View.GONE);
|
||||
}
|
||||
if (createLink.isBom2_show()){
|
||||
ll_bom_layout2.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
ll_bom_layout2.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
//投弹高度
|
||||
et_bom1.setText(createLink.getBom1_height() + "");
|
||||
et_bom2.setText(createLink.getBom2_height() + "");
|
||||
|
||||
if (!createLink.isBom1_show() && !createLink.isBom2_show()){
|
||||
tv_null_data.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
tv_null_data.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
if (createLink.isBom1_select()) {
|
||||
tv_bom_text1.setBackgroundResource(R.drawable.ff029a45_2round_1stroke_bg);
|
||||
iv_bom1.setImageResource(R.mipmap.icon_select_link_yes);
|
||||
// ll_bom_height_layout1.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
tv_bom_text1.setBackgroundResource(R.drawable.b2101010_4round_1stroke_bg);
|
||||
iv_bom1.setImageResource(R.mipmap.icon_select_link_no);
|
||||
// ll_bom_height_layout1.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
if (createLink.isBom2_select()) {
|
||||
tv_bom_text2.setBackgroundResource(R.drawable.ff029a45_2round_1stroke_bg);
|
||||
iv_bom2.setImageResource(R.mipmap.icon_select_link_yes);
|
||||
// ll_bom_height_layout2.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
tv_bom_text2.setBackgroundResource(R.drawable.b2101010_4round_1stroke_bg);
|
||||
iv_bom2.setImageResource(R.mipmap.icon_select_link_no);
|
||||
// ll_bom_height_layout2.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
|
||||
tvDel.setOnClickListener(v -> {
|
||||
if (onItemClickListener != null) {
|
||||
@ -94,15 +197,147 @@ public class CreateLinkAdapter extends RecyclerView.Adapter<CreateLinkAdapter.Vi
|
||||
}
|
||||
});
|
||||
|
||||
etSpeed.setOnFocusChangeListener((v, hasFocus) -> {
|
||||
if (!hasFocus) {
|
||||
try {
|
||||
createLink.setSpeed(Double.parseDouble(etSpeed.getText().toString()));
|
||||
} catch (NumberFormatException e) {
|
||||
etSpeed.setText(String.valueOf((int) createLink.getSpeed()));
|
||||
}
|
||||
// 为Spinner设置选择监听器
|
||||
sp_turn.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
tv_turn.setText(parent.getItemAtPosition(position).toString());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
// 什么都不做
|
||||
}
|
||||
});
|
||||
|
||||
rl_turn.setOnClickListener(v -> {
|
||||
showCustomDropdown(rl_turn, tv_turn,ll_turn);
|
||||
});
|
||||
|
||||
//长按弹出窗口
|
||||
tv_expand.setOnClickListener(v -> {
|
||||
if (ll_expand.getVisibility() == View.VISIBLE) {
|
||||
ll_expand.setVisibility(View.GONE);
|
||||
tv_expand.setText("展开");
|
||||
} else {
|
||||
ll_expand.setVisibility(View.VISIBLE);
|
||||
tv_expand.setText("收起");
|
||||
}
|
||||
});
|
||||
|
||||
//投弹选中1
|
||||
ll_bom_layout1.setOnClickListener(v -> {
|
||||
if (createLink.isBom1_select()) {
|
||||
// 取消选中状态
|
||||
tv_bom_text1.setBackgroundResource(R.drawable.b2101010_4round_1stroke_bg);
|
||||
iv_bom1.setImageResource(R.mipmap.icon_select_link_no);
|
||||
} else {
|
||||
// 设置当前项为选中状态
|
||||
tv_bom_text1.setBackgroundResource(R.drawable.ff029a45_2round_1stroke_bg);
|
||||
iv_bom1.setImageResource(R.mipmap.icon_select_link_yes);
|
||||
}
|
||||
// 选中状态 - 先取消其他所有项的选中状态
|
||||
clearAllSelectionsExcept(position, 1); // 1表示bom1
|
||||
});
|
||||
|
||||
//投弹选中2
|
||||
ll_bom_layout2.setOnClickListener(v -> {
|
||||
if (createLink.isBom2_select()) {
|
||||
// 取消选中状态
|
||||
tv_bom_text2.setBackgroundResource(R.drawable.b2101010_4round_1stroke_bg);
|
||||
iv_bom2.setImageResource(R.mipmap.icon_select_link_no);
|
||||
|
||||
} else {
|
||||
// 设置当前项为选中状态
|
||||
tv_bom_text2.setBackgroundResource(R.drawable.ff029a45_2round_1stroke_bg);
|
||||
iv_bom2.setImageResource(R.mipmap.icon_select_link_yes);
|
||||
}
|
||||
// 选中状态 - 先取消其他所有项的选中状态
|
||||
clearAllSelectionsExcept(position, 2); // 2表示bom2
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除除指定位置和类型外的所有显示状态
|
||||
* @param currentPosition 当前项的位置
|
||||
* @param type 1表示bom1,2表示bom2
|
||||
*/
|
||||
private void clearAllSelectionsExcept(int currentPosition, int type) {
|
||||
// bom1
|
||||
if (type == 1){
|
||||
//如果当前项是选中状态,则取消所有bom1的选中状态并显示出来
|
||||
if (createLinkList.get(currentPosition).isBom1_select()){
|
||||
for (int i = 0; i < createLinkList.size(); i++) {
|
||||
CreateLink link = createLinkList.get(i);
|
||||
link.setBom1_show(true);
|
||||
link.setBom1_select(false);
|
||||
}
|
||||
isExpand.set(0,true);
|
||||
}
|
||||
//如果当前项不是选中状态,则取消除了当前项其它所有bom1的选中状态并隐藏
|
||||
else {
|
||||
for (int i = 0; i < createLinkList.size(); i++) {
|
||||
CreateLink link = createLinkList.get(i);
|
||||
if (i == currentPosition){
|
||||
link.setBom1_show(true);
|
||||
link.setBom1_select(true);
|
||||
}else {
|
||||
link.setBom1_show(false);
|
||||
link.setBom1_select(false);
|
||||
}
|
||||
}
|
||||
isExpand.set(0,false);
|
||||
}
|
||||
|
||||
}
|
||||
//bom2
|
||||
else {
|
||||
if (createLinkList.get(currentPosition).isBom2_select()){
|
||||
for (int i = 0; i < createLinkList.size(); i++) {
|
||||
CreateLink link = createLinkList.get(i);
|
||||
link.setBom2_show(true);
|
||||
link.setBom2_select(false);
|
||||
}
|
||||
isExpand.set(1,true);
|
||||
}
|
||||
//如果当前项不是选中状态,则取消除了当前项其它所有bom2的选中状态并隐藏
|
||||
else {
|
||||
for ( int i = 0; i < createLinkList.size(); i++) {
|
||||
CreateLink link = createLinkList.get(i);
|
||||
if (i == currentPosition){
|
||||
link.setBom2_show(true);
|
||||
link.setBom2_select(true);
|
||||
}else {
|
||||
link.setBom2_show(false);
|
||||
link.setBom2_select(false);
|
||||
}
|
||||
}
|
||||
isExpand.set(1,false);
|
||||
}
|
||||
}
|
||||
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
//转弯方式选择弹窗
|
||||
private void showCustomDropdown(RelativeLayout anchor, TextView tv_turn,LinearLayout ll_turn) {
|
||||
String[] options = {"协调转弯", "到点转弯"};
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(content);
|
||||
builder.setItems(options, (dialog, which) -> {
|
||||
tv_turn.setText(options[which]);
|
||||
if (which == 1){
|
||||
ll_turn.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
ll_turn.setVisibility(View.GONE);
|
||||
}
|
||||
// 更新选中状态
|
||||
});
|
||||
builder.show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ public class TypeAdapter extends RecyclerView.Adapter<TypeAdapter.TypeViewHolder
|
||||
default:
|
||||
holder.textView.setText("距家距离:"+item.getMsg());
|
||||
holder.textView.setMaxWidth(Integer.MAX_VALUE); // 移除最大宽度限制
|
||||
holder.textView.setMinimumWidth(0); // 移除最小宽度限制
|
||||
holder.textView.setMinimumWidth(50); // 移除最小宽度限制
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@ -5,10 +5,28 @@ import com.amap.api.maps.model.LatLng;
|
||||
|
||||
public class CreateLink {
|
||||
private String name;
|
||||
private double height;
|
||||
private double speed;
|
||||
private int waypointIndex;
|
||||
private LatLng latLng;
|
||||
private double height;//高度
|
||||
private double speed;//速度
|
||||
private int waypointIndex;//航点索引
|
||||
private LatLng latLng;//点经纬度
|
||||
private boolean bom1_select;//弹道1选择
|
||||
private boolean bom1_show;//弹道1是否显示
|
||||
private int bom1_height;//弹道1投弹高度
|
||||
private boolean bom2_select;//弹道2选择
|
||||
private boolean bom2_show;//弹道2是否显示
|
||||
private int bom2_height;//弹道2投弹高度
|
||||
|
||||
|
||||
public CreateLink(String name, double height, double speed, int waypointIndex, LatLng latLng
|
||||
,boolean bom1_show,boolean bom2_show) {
|
||||
this.name = name;
|
||||
this.height = height;
|
||||
this.speed = speed;
|
||||
this.waypointIndex = waypointIndex;
|
||||
this.latLng = latLng;
|
||||
this.bom1_show = bom1_show;
|
||||
this.bom2_show = bom2_show;
|
||||
}
|
||||
|
||||
public CreateLink(String name, double height, double speed, int waypointIndex, LatLng latLng) {
|
||||
this.name = name;
|
||||
@ -57,4 +75,52 @@ public class CreateLink {
|
||||
public void setLatLng(LatLng latLng) {
|
||||
this.latLng = latLng;
|
||||
}
|
||||
|
||||
public boolean isBom1_select() {
|
||||
return bom1_select;
|
||||
}
|
||||
|
||||
public void setBom1_select(boolean bom1_select) {
|
||||
this.bom1_select = bom1_select;
|
||||
}
|
||||
|
||||
public int getBom1_height() {
|
||||
return bom1_height;
|
||||
}
|
||||
|
||||
public void setBom1_height(int bom1_height) {
|
||||
this.bom1_height = bom1_height;
|
||||
}
|
||||
|
||||
public boolean isBom2_select() {
|
||||
return bom2_select;
|
||||
}
|
||||
|
||||
public void setBom2_select(boolean bom2_select) {
|
||||
this.bom2_select = bom2_select;
|
||||
}
|
||||
|
||||
public int getBom2_height() {
|
||||
return bom2_height;
|
||||
}
|
||||
|
||||
public void setBom2_height(int bom2_height) {
|
||||
this.bom2_height = bom2_height;
|
||||
}
|
||||
|
||||
public boolean isBom1_show() {
|
||||
return bom1_show;
|
||||
}
|
||||
|
||||
public void setBom1_show(boolean bom1_show) {
|
||||
this.bom1_show = bom1_show;
|
||||
}
|
||||
|
||||
public boolean isBom2_show() {
|
||||
return bom2_show;
|
||||
}
|
||||
|
||||
public void setBom2_show(boolean bom2_show) {
|
||||
this.bom2_show = bom2_show;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import static com.example.longyi_groundstation.MAVLink.common.msg_global_positio
|
||||
import static com.example.longyi_groundstation.MAVLink.common.msg_gps_raw_int.MAVLINK_MSG_ID_GPS_RAW_INT;
|
||||
import static com.example.longyi_groundstation.MAVLink.common.msg_mission_ack.MAVLINK_MSG_ID_MISSION_ACK;
|
||||
import static com.example.longyi_groundstation.MAVLink.common.msg_mission_count.MAVLINK_MSG_ID_MISSION_COUNT;
|
||||
import static com.example.longyi_groundstation.MAVLink.common.msg_mission_current.MAVLINK_MSG_ID_MISSION_CURRENT;
|
||||
import static com.example.longyi_groundstation.MAVLink.common.msg_mission_request.MAVLINK_MSG_ID_MISSION_REQUEST;
|
||||
import static com.example.longyi_groundstation.MAVLink.common.msg_param_request_list.MAVLINK_MSG_ID_PARAM_REQUEST_LIST;
|
||||
import static com.example.longyi_groundstation.MAVLink.common.msg_param_request_read.MAVLINK_MSG_ID_PARAM_REQUEST_READ;
|
||||
@ -396,6 +397,11 @@ public class MyBoundService extends Service {
|
||||
if (MsgList.get(MAVLINK_MSG_ID_VFR_HUD) != null) {
|
||||
BroadcastUtil.Broadcast_VFR_HUD(getApplication(), MsgList.get(MAVLINK_MSG_ID_VFR_HUD));
|
||||
}
|
||||
if (MsgList.get(MAVLINK_MSG_ID_MISSION_CURRENT) != null) {
|
||||
BroadcastUtil.Broadcast_MISSION_CURRENT(getApplication(), MsgList.get(MAVLINK_MSG_ID_MISSION_CURRENT));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -26,7 +26,6 @@ import com.example.longyi_groundstation.Main.Setting.Fragment.SensorFragment;
|
||||
import com.example.longyi_groundstation.Main.Setting.Fragment.SettingsFragment;
|
||||
import com.example.longyi_groundstation.Main.Setting.Void.AllView;
|
||||
import com.example.longyi_groundstation.Main.Void.FlyVoid;
|
||||
import com.example.longyi_groundstation.Main.Void.MyTool;
|
||||
import com.example.longyi_groundstation.R;
|
||||
|
||||
public class SettingActivity extends AppCompatActivity {
|
||||
@ -60,7 +59,7 @@ public class SettingActivity extends AppCompatActivity {
|
||||
initOnClick();
|
||||
} else {
|
||||
// 参数未更新完成,继续等待并定期检查
|
||||
uiHandler.postDelayed(this, 500); // 500毫秒后再次检查
|
||||
uiHandler.postDelayed(this, 300); // 500毫秒后再次检查
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -154,7 +153,7 @@ public class SettingActivity extends AppCompatActivity {
|
||||
private void selectItem(int index) {
|
||||
for (int i = 0; i < allView.views.size(); i++) {
|
||||
if (index == i) {
|
||||
allView.views.get(i).setBackgroundResource(R.drawable.ff62a7f0_2round_1stroke_bg);
|
||||
allView.views.get(i).setBackgroundResource(R.drawable.ff029a45_2round_1stroke_bg);
|
||||
allView.views.get(i).setTextColor(Color.parseColor("#ffffff"));
|
||||
} else {
|
||||
allView.views.get(i).setBackgroundResource(R.drawable.b2303030_4round_1stroke_bg);
|
||||
@ -276,11 +275,22 @@ public class SettingActivity extends AppCompatActivity {
|
||||
private void showParamLoadingDialog() {
|
||||
paramLoadingDialog = new ProgressDialog(this);
|
||||
paramLoadingDialog.setMessage("参数加载中,请稍候...");
|
||||
paramLoadingDialog.setCancelable(false); // 设置为不可取消
|
||||
paramLoadingDialog.setCancelable(true); // 设置为可取消
|
||||
paramLoadingDialog.setIndeterminate(true); // 设置为不确定进度
|
||||
|
||||
// 添加取消监听器,用于返回主页
|
||||
paramLoadingDialog.setOnCancelListener(dialog -> {
|
||||
// 移除参数更新检查的回调
|
||||
if (uiHandler != null) {
|
||||
uiHandler.removeCallbacks(paramUpdateChecker);
|
||||
}
|
||||
// 返回主页
|
||||
finish();
|
||||
});
|
||||
paramLoadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
||||
@ -5,7 +5,6 @@ import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -41,7 +40,7 @@ public class MultiSelectAdapter extends RecyclerView.Adapter<MultiSelectAdapter.
|
||||
|
||||
// 设置背景
|
||||
if (data.isSelect) {
|
||||
holder.tv_item.setBackgroundResource(R.drawable.ff62a7f0_2round_1stroke_bg);
|
||||
holder.tv_item.setBackgroundResource(R.drawable.ff029a45_2round_1stroke_bg);
|
||||
holder.tv_item.setTextColor(Color.parseColor("#ffffff"));
|
||||
} else {
|
||||
holder.tv_item.setBackgroundResource(R.drawable.b2303030_4round_1stroke_bg);
|
||||
|
||||
@ -57,7 +57,7 @@ public class ParamGridAdapter extends RecyclerView.Adapter<ParamGridAdapter.Para
|
||||
holder.rightProgress.setLayoutParams(rightParams);
|
||||
|
||||
// 设置颜色
|
||||
holder.leftProgress.setBackgroundColor(Color.parseColor("#62a7f0")); // 蓝色
|
||||
holder.leftProgress.setBackgroundColor(Color.parseColor("#029a45")); // 蓝色
|
||||
holder.rightProgress.setBackgroundColor(Color.parseColor("#cccccc")); // 灰色
|
||||
} else {
|
||||
// 值在右侧范围(1500-2000)
|
||||
@ -75,7 +75,7 @@ public class ParamGridAdapter extends RecyclerView.Adapter<ParamGridAdapter.Para
|
||||
holder.rightProgress.setLayoutParams(rightParams);
|
||||
|
||||
// 设置颜色
|
||||
holder.leftProgress.setBackgroundColor(Color.parseColor("#62a7f0")); // 蓝色
|
||||
holder.leftProgress.setBackgroundColor(Color.parseColor("#029a45")); // 蓝色
|
||||
holder.rightProgress.setBackgroundColor(Color.parseColor("#cccccc")); // 灰色
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
package com.example.longyi_groundstation.Main.Setting.Base;
|
||||
|
||||
public class ModeItem {
|
||||
|
||||
private String text;
|
||||
private int value;
|
||||
|
||||
public ModeItem(String text, int value) {
|
||||
this.text = text;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return text; // Spinner显示的内容
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,25 +1,42 @@
|
||||
package com.example.longyi_groundstation.Main.Setting.Fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.example.longyi_groundstation.Main.Setting.Adapter.SecurePagerAdapter;
|
||||
import com.example.longyi_groundstation.Main.Setting.Base.ChannelItem;
|
||||
import com.example.longyi_groundstation.Main.Setting.Base.ModeItem;
|
||||
import com.example.longyi_groundstation.Main.Void.FlyVoid;
|
||||
import com.example.longyi_groundstation.R;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
import com.google.android.material.tabs.TabLayoutMediator;
|
||||
import com.example.longyi_groundstation.Main.Setting.Adapter.FoundationPagerAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FoundationFragment extends Fragment {
|
||||
|
||||
private View view;
|
||||
private TabLayout tabLayout;
|
||||
private ViewPager2 viewPager;
|
||||
private TabLayoutMediator tabLayoutMediator;
|
||||
private RelativeLayout rl_low_end,rl_mid_range,rl_high_end;
|
||||
private Spinner sp_low_end,sp_mid_range,sp_high_end;
|
||||
private TextView tv_low_end_text,tv_mid_range_text,tv_high_end_text,tv_save;
|
||||
|
||||
private FlyVoid flyVoid = new FlyVoid();
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
@ -49,48 +66,18 @@ public class FoundationFragment extends Fragment {
|
||||
* @cuijingzhou
|
||||
*/
|
||||
private void initView() {
|
||||
viewPager = view.findViewById(R.id.view_pager);
|
||||
tabLayout = view.findViewById(R.id.tab_layout);
|
||||
|
||||
|
||||
// if (getActivity() != null) {
|
||||
// viewPager.setAdapter(new FoundationPagerAdapter(getActivity()));
|
||||
//
|
||||
// // 先释放之前的TabLayoutMediator(如果存在)
|
||||
// if (tabLayoutMediator != null) {
|
||||
// tabLayoutMediator.detach();
|
||||
// }
|
||||
//
|
||||
// tabLayoutMediator = new TabLayoutMediator(tabLayout, viewPager,
|
||||
// (tab, position) -> {
|
||||
// switch (position) {
|
||||
// case 0:
|
||||
// tab.setText("机型设置");
|
||||
// break;
|
||||
// case 1:
|
||||
// tab.setText("安装设置");
|
||||
// break;
|
||||
// case 2:
|
||||
// tab.setText("加速度计");
|
||||
// break;
|
||||
// case 3:
|
||||
// tab.setText("磁力计");
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
// tabLayoutMediator.attach();
|
||||
//
|
||||
// // 为Tab之间添加间距
|
||||
// for (int i = 0; i < tabLayout.getTabCount(); i++) {
|
||||
// View tab = (((ViewGroup) tabLayout.getChildAt(0)).getChildAt(i));
|
||||
// ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) tab.getLayoutParams();
|
||||
// layoutParams.setMargins(6, 0, 6, 0); // 左右各16dp的间距
|
||||
// tab.setLayoutParams(layoutParams);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
rl_low_end = view.findViewById(R.id.rl_low_end);
|
||||
rl_mid_range = view.findViewById(R.id.rl_mid_range);
|
||||
rl_high_end = view.findViewById(R.id.rl_high_end);
|
||||
sp_low_end = view.findViewById(R.id.sp_low_end);
|
||||
sp_mid_range = view.findViewById(R.id.sp_mid_range);
|
||||
sp_high_end = view.findViewById(R.id.sp_high_end);
|
||||
tv_low_end_text = view.findViewById(R.id.tv_low_end_text);
|
||||
tv_mid_range_text = view.findViewById(R.id.tv_mid_range_text);
|
||||
tv_high_end_text = view.findViewById(R.id.tv_high_end_text);
|
||||
tv_save = view.findViewById(R.id.tv_save);
|
||||
initSpinnerData();
|
||||
initText();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,30 +86,181 @@ public class FoundationFragment extends Fragment {
|
||||
* @cuijingzhou
|
||||
*/
|
||||
private void initOnClick() {
|
||||
rl_low_end.setOnClickListener(v -> {
|
||||
// 点击TextView后打开对应的Spinner
|
||||
sp_low_end.performClick();
|
||||
});
|
||||
rl_mid_range.setOnClickListener(v -> {
|
||||
// 点击TextView后打开对应的Spinner
|
||||
sp_mid_range.performClick();
|
||||
});
|
||||
rl_high_end.setOnClickListener(v -> {
|
||||
// 点击TextView后打开对应的Spinner
|
||||
sp_high_end.performClick();
|
||||
});
|
||||
|
||||
// 修改所有的Spinner监听器
|
||||
sp_low_end.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
Log.d("无事发生", "onItemSelected: sp_m7");
|
||||
tv_low_end_text.setText( parent.getSelectedItem().toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
Log.d("无事发生", "onNothingSelected: sp_m7");
|
||||
}
|
||||
});
|
||||
|
||||
// 修改所有的Spinner监听器
|
||||
sp_mid_range.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
Log.d("无事发生", "onItemSelected: sp_m7");
|
||||
tv_mid_range_text.setText( parent.getSelectedItem().toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
Log.d("无事发生", "onNothingSelected: sp_m7");
|
||||
}
|
||||
});
|
||||
|
||||
// 修改所有的Spinner监听器
|
||||
sp_high_end.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
Log.d("无事发生", "onItemSelected: sp_m7");
|
||||
tv_high_end_text.setText( parent.getSelectedItem().toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
Log.d("无事发生", "onNothingSelected: sp_m7");
|
||||
}
|
||||
});
|
||||
|
||||
//保存
|
||||
tv_save.setOnClickListener(v -> {
|
||||
save();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法:保存
|
||||
*
|
||||
* @cuijingzhou
|
||||
*/
|
||||
private void save() {
|
||||
try {
|
||||
flyVoid.requestParamSet("FLTMODE1",
|
||||
getSelectedChannelValue(sp_low_end) + "",
|
||||
FlyVoid.paramList.get("FLTMODE1").getParam_type());
|
||||
flyVoid.requestParamSet("FLTMODE2",
|
||||
getSelectedChannelValue(sp_low_end) + "");
|
||||
|
||||
Thread.sleep(100);
|
||||
|
||||
flyVoid.requestParamSet("FLTMODE3",
|
||||
getSelectedChannelValue(sp_mid_range) + "",
|
||||
FlyVoid.paramList.get("FLTMODE3").getParam_type());
|
||||
flyVoid.requestParamSet("FLTMODE4",
|
||||
getSelectedChannelValue(sp_mid_range) + "");
|
||||
|
||||
Thread.sleep(100);
|
||||
|
||||
flyVoid.requestParamSet("FLTMODE5",
|
||||
getSelectedChannelValue(sp_high_end) + "",
|
||||
FlyVoid.paramList.get("FLTMODE5").getParam_type());
|
||||
flyVoid.requestParamSet("FLTMODE6",
|
||||
getSelectedChannelValue(sp_high_end) + "");
|
||||
|
||||
Toast.makeText(requireContext(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||
}catch (Exception e){
|
||||
Log.d("FLTMODE-save", e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法:初始化文字
|
||||
*
|
||||
* @cuijingzhou
|
||||
*/
|
||||
private void initText() {
|
||||
setSelectedChannel(sp_low_end, Integer.parseInt(FlyVoid.paramList.get("FLTMODE1").getParam_value()));
|
||||
setSelectedChannel(sp_mid_range, Integer.parseInt(FlyVoid.paramList.get("FLTMODE3").getParam_value()));
|
||||
setSelectedChannel(sp_high_end, Integer.parseInt(FlyVoid.paramList.get("FLTMODE5").getParam_value()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法:初始化Spinner数据
|
||||
*
|
||||
* @cuijingzhou
|
||||
*/
|
||||
private void initSpinnerData() {
|
||||
// 创建通道数据列表
|
||||
List<ModeItem> channelList = new ArrayList<>();
|
||||
channelList.add(new ModeItem("姿态", 0));
|
||||
channelList.add(new ModeItem("定高", 2));
|
||||
channelList.add(new ModeItem("航线", 3));
|
||||
channelList.add(new ModeItem("定点", 5));
|
||||
channelList.add(new ModeItem("返航", 6));
|
||||
channelList.add(new ModeItem("降落", 9));
|
||||
|
||||
// 创建适配器
|
||||
ArrayAdapter<ModeItem> adapter = new ArrayAdapter<>(requireContext(),
|
||||
android.R.layout.simple_spinner_item, channelList);
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
|
||||
// 为所有Spinner设置适配器
|
||||
Spinner[] spinners = {sp_low_end, sp_mid_range, sp_high_end};
|
||||
for (Spinner spinner : spinners) {
|
||||
if (spinner != null) {
|
||||
spinner.setAdapter(adapter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 示例:设置Spinner选中项
|
||||
private void setSelectedChannel(Spinner spinner, int value) {
|
||||
ArrayAdapter<ModeItem> adapter = (ArrayAdapter<ModeItem>) spinner.getAdapter();
|
||||
for (int i = 0; i < adapter.getCount(); i++) {
|
||||
ModeItem item = adapter.getItem(i);
|
||||
if (item != null && item.getValue() == value) {
|
||||
spinner.setSelection(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 示例:获取选中的值
|
||||
private int getSelectedChannelValue(Spinner spinner) {
|
||||
if (spinner.getSelectedItem() instanceof ModeItem) {
|
||||
ModeItem item = (ModeItem) spinner.getSelectedItem();
|
||||
return item.getValue();
|
||||
}
|
||||
return 0; // 默认值
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
// // 使用post方法将initData()推迟到下一个UI循环执行,避免FragmentManager冲突
|
||||
// getView().post(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// initData();
|
||||
// initView();
|
||||
// initOnClick();
|
||||
// }
|
||||
// });
|
||||
// 使用post方法将initData()推迟到下一个UI循环执行,避免FragmentManager冲突
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
// 清理TabLayoutMediator资源
|
||||
if (tabLayoutMediator != null) {
|
||||
tabLayoutMediator.detach();
|
||||
tabLayoutMediator = null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -423,7 +423,7 @@ public class LoadFragment extends Fragment {
|
||||
et_off_m13.setText("1900");
|
||||
}
|
||||
});
|
||||
// 修改所有的Spinner监听器,以sp_m7为例:
|
||||
// 修改所有的Spinner监听器,以sp_m7为例:
|
||||
sp_m7.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
@Override
|
||||
|
||||
@ -0,0 +1,115 @@
|
||||
package com.example.longyi_groundstation.Main.View;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.example.longyi_groundstation.Main.Void.FlyVoid;
|
||||
import com.example.longyi_groundstation.Main.Void.MyTool;
|
||||
import com.example.longyi_groundstation.R;
|
||||
|
||||
public class PointFlyDialog {
|
||||
|
||||
private final Activity context;
|
||||
private String title;
|
||||
private String message;
|
||||
private String positiveButtonText;
|
||||
private LatLng latLng;
|
||||
|
||||
private FlyVoid flyVoid = new FlyVoid();
|
||||
|
||||
|
||||
public PointFlyDialog(Activity context) {
|
||||
this.context = context;
|
||||
this.title = "错误日志";
|
||||
this.message = "";
|
||||
this.positiveButtonText = "确定";
|
||||
this.latLng = latLng;
|
||||
|
||||
}
|
||||
|
||||
// 设置弹窗标题
|
||||
public PointFlyDialog setLatLng(LatLng latLng) {
|
||||
this.latLng = latLng;
|
||||
return this;
|
||||
}
|
||||
|
||||
// 设置弹窗标题
|
||||
public PointFlyDialog setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
// 设置弹窗内容
|
||||
public PointFlyDialog setMessage(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
// 设置确认按钮文字
|
||||
public PointFlyDialog setPositiveButtonText(String text) {
|
||||
this.positiveButtonText = text;
|
||||
return this;
|
||||
}
|
||||
|
||||
// 显示弹窗
|
||||
public void show() {
|
||||
MyTool.hideBottomNavigationBar( context);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
|
||||
// 使用自定义布局
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.dialog_point_fly, null);
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"}) TextView tvMessage = view.findViewById(R.id.tv_message);
|
||||
// 滑动模块
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"}) SlideToUnlockView unlockView = view.findViewById(R.id.unlockView);
|
||||
|
||||
if (latLng != null){
|
||||
tvMessage.setText("经度:" + latLng.latitude + "\n纬度:" + latLng.latitude);
|
||||
}
|
||||
|
||||
// 添加日志
|
||||
builder.setView(view);
|
||||
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
|
||||
// 设置宽高
|
||||
Window window = dialog.getWindow();
|
||||
if (window != null) {
|
||||
WindowManager.LayoutParams layoutParams = window.getAttributes();
|
||||
layoutParams.width = MyTool.dpToPx(context, 300); // 或具体像素值
|
||||
layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT; // 或具体像素值
|
||||
window.setAttributes(layoutParams);
|
||||
window.setBackgroundDrawableResource(R.drawable.ffffffff_4round_bg);
|
||||
}
|
||||
|
||||
unlockView.setText("滑动执行");
|
||||
unlockView.setOnUnlockListener(new SlideToUnlockView.OnUnlockListener() {
|
||||
@Override
|
||||
public void onUnlock() {
|
||||
// // 发送命令
|
||||
|
||||
MyTool.hideBottomNavigationBar( context);
|
||||
dialog.dismiss();
|
||||
// 滑动到阈值后触发(如关闭对话框或执行操作)
|
||||
Toast.makeText(context, "操作已确认", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
//取消按钮
|
||||
tvMessage.setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
MyTool.hideBottomNavigationBar(context);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,113 @@
|
||||
package com.example.longyi_groundstation.Main.View;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.longyi_groundstation.Main.Activity.MainActivity;
|
||||
import com.example.longyi_groundstation.Main.Void.FlyVoid;
|
||||
import com.example.longyi_groundstation.Main.Void.MyTool;
|
||||
import com.example.longyi_groundstation.R;
|
||||
|
||||
public class SaveLinkNameDialog {
|
||||
|
||||
private final MainActivity context;
|
||||
private String title;
|
||||
private String message;
|
||||
private String positiveButtonText;
|
||||
|
||||
private FlyVoid flyVoid = new FlyVoid();
|
||||
|
||||
|
||||
public SaveLinkNameDialog(MainActivity context) {
|
||||
this.context = context;
|
||||
this.title = "错误日志";
|
||||
this.message = "";
|
||||
this.positiveButtonText = "确定";
|
||||
}
|
||||
|
||||
// 设置弹窗标题
|
||||
public SaveLinkNameDialog setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
// 设置弹窗内容
|
||||
public SaveLinkNameDialog setMessage(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
// 设置确认按钮文字
|
||||
public SaveLinkNameDialog setPositiveButtonText(String text) {
|
||||
this.positiveButtonText = text;
|
||||
return this;
|
||||
}
|
||||
|
||||
// 显示弹窗
|
||||
public void show() {
|
||||
MyTool.hideBottomNavigationBar( context);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
|
||||
// 使用自定义布局
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.dialog_link_name, null);
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"}) TextView tvMessage = view.findViewById(R.id.tv_message);
|
||||
// 滑动模块
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"}) SlideToUnlockView unlockView = view.findViewById(R.id.unlockView);
|
||||
// 高度输入
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"}) EditText et_name = view.findViewById(R.id.et_name);
|
||||
|
||||
|
||||
// 添加日志
|
||||
builder.setView(view);
|
||||
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog.show();
|
||||
|
||||
// 设置宽高
|
||||
Window window = dialog.getWindow();
|
||||
if (window != null) {
|
||||
WindowManager.LayoutParams layoutParams = window.getAttributes();
|
||||
layoutParams.width = MyTool.dpToPx(context, 300); // 或具体像素值
|
||||
layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT; // 或具体像素值
|
||||
window.setAttributes(layoutParams);
|
||||
window.setBackgroundDrawableResource(R.drawable.ffffffff_4round_bg);
|
||||
}
|
||||
|
||||
unlockView.setText("滑动确认");
|
||||
unlockView.setOnUnlockListener(new SlideToUnlockView.OnUnlockListener() {
|
||||
@Override
|
||||
public void onUnlock() {
|
||||
|
||||
if (et_name.getText().toString().length() > 0){
|
||||
context.saveLink(et_name.getText().toString());
|
||||
}else {
|
||||
context.saveLink(null);
|
||||
}
|
||||
|
||||
|
||||
MyTool.hideBottomNavigationBar( context);
|
||||
dialog.dismiss();
|
||||
// 滑动到阈值后触发(如关闭对话框或执行操作)
|
||||
Toast.makeText(context, "操作已确认", Toast.LENGTH_SHORT).show();
|
||||
MyTool.hideBottomNavigationBar(context);
|
||||
}
|
||||
});
|
||||
|
||||
;
|
||||
//取消按钮
|
||||
tvMessage.setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
MyTool.hideBottomNavigationBar(context);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -8,7 +8,7 @@ import android.view.*;
|
||||
import android.view.animation.OvershootInterpolator;
|
||||
|
||||
public class SlideToUnlockView extends View {
|
||||
private static String DEFAULT_TEXT = "滑动执行";
|
||||
private String defaultText = "滑动执行"; //
|
||||
private float progress = 0f;
|
||||
private Paint paint;
|
||||
private Paint textPaint;
|
||||
@ -23,7 +23,7 @@ public class SlideToUnlockView extends View {
|
||||
private float cornerRadius; // 背景圆角弧度
|
||||
private float thumbCornerRadius; // 滑块圆角弧度
|
||||
private int componentAlpha = 255; // 组件透明度,默认为完全不透明
|
||||
|
||||
public boolean isSlide = true;//是否可以滑动
|
||||
|
||||
public interface OnUnlockListener {
|
||||
void onUnlock();
|
||||
@ -94,8 +94,7 @@ public class SlideToUnlockView extends View {
|
||||
canvas.drawRoundRect(thumbRect, thumbCornerRadius, thumbCornerRadius, paint);
|
||||
|
||||
// 3. 绘制文本(始终可见)
|
||||
textPaint.setAlpha(componentAlpha); // 固定不透明度
|
||||
canvas.drawText(DEFAULT_TEXT,
|
||||
canvas.drawText(defaultText,
|
||||
getWidth()/2f,
|
||||
getHeight()/2f + textPaint.getTextSize()/3,
|
||||
textPaint);
|
||||
@ -109,38 +108,45 @@ public class SlideToUnlockView extends View {
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
float eventX = event.getX();
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
// 检查是否点击在滑块上
|
||||
return thumbRect.contains(eventX, event.getY());
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
// 计算进度(限制在0-1)
|
||||
progress = Math.max(0f, Math.min(1f, (eventX - minX) / (maxX - minX)));
|
||||
invalidate();
|
||||
return true;
|
||||
case MotionEvent.ACTION_UP:
|
||||
if (progress > 0.7f) {
|
||||
reboundAnimator.start();
|
||||
if (listener != null) listener.onUnlock();
|
||||
} else {
|
||||
resetProgress();
|
||||
}
|
||||
return true;
|
||||
if (isSlide){
|
||||
float eventX = event.getX();
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
// 检查是否点击在滑块上
|
||||
return thumbRect.contains(eventX, event.getY());
|
||||
case MotionEvent.ACTION_MOVE:
|
||||
// 计算进度(限制在0-1)
|
||||
progress = Math.max(0f, Math.min(1f, (eventX - minX) / (maxX - minX)));
|
||||
invalidate();
|
||||
return true;
|
||||
case MotionEvent.ACTION_UP:
|
||||
if (progress > 0.7f) {
|
||||
// reboundAnimator.start();
|
||||
isSlide = false;
|
||||
if (listener != null) listener.onUnlock();
|
||||
} else {
|
||||
resetProgress();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
}else {
|
||||
return true;
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
|
||||
}
|
||||
|
||||
// 其他方法保持不变...
|
||||
private void setProgress(float progress) {
|
||||
// 设置进度
|
||||
public void setProgress(float progress) {
|
||||
this.progress = progress;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setText(String s) {
|
||||
DEFAULT_TEXT = s;
|
||||
this.defaultText = s;
|
||||
}
|
||||
|
||||
|
||||
public void resetProgress() {
|
||||
ValueAnimator animator = ValueAnimator.ofFloat(progress, 0);
|
||||
animator.setDuration(300);
|
||||
@ -169,18 +175,17 @@ public class SlideToUnlockView extends View {
|
||||
/**
|
||||
* 恢复到初始化状态
|
||||
*/
|
||||
public void resetToInitialState(String text) {
|
||||
public void resetToInitialState(String text) {
|
||||
// 重置进度为0
|
||||
progress = 0f;
|
||||
|
||||
if (text != null){
|
||||
setText(text);
|
||||
}else {
|
||||
} else {
|
||||
// 重置默认文本
|
||||
DEFAULT_TEXT = "滑动执行";
|
||||
this.defaultText = "滑动执行";
|
||||
}
|
||||
|
||||
|
||||
// 重置颜色为默认值
|
||||
bgColor = Color.parseColor("#cfcfcf");
|
||||
activeColor = Color.parseColor("#029A45");
|
||||
|
||||
@ -3,6 +3,7 @@ package com.example.longyi_groundstation.Main.View;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.os.CountDownTimer;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -15,6 +16,7 @@ import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.longyi_groundstation.Main.Activity.MainActivity;
|
||||
import com.example.longyi_groundstation.Main.Void.FlyVoid;
|
||||
import com.example.longyi_groundstation.Main.Void.MyTool;
|
||||
import com.example.longyi_groundstation.R;
|
||||
@ -26,9 +28,11 @@ public class StartExecuteDialog {
|
||||
private String message;
|
||||
private String positiveButtonText;
|
||||
private String height = "10";
|
||||
|
||||
private FlyVoid flyVoid = new FlyVoid();
|
||||
|
||||
private CountDownTimer countDownTimer;
|
||||
private AlertDialog dialog;
|
||||
private TextView tvStartCountdown;
|
||||
private TextView tvStartCancel;
|
||||
|
||||
public StartExecuteDialog(Activity context, String height) {
|
||||
this.context = context;
|
||||
@ -57,13 +61,16 @@ public class StartExecuteDialog {
|
||||
}
|
||||
|
||||
// 显示弹窗
|
||||
@SuppressLint("MissingInflatedId")
|
||||
public void show() {
|
||||
MyTool.hideBottomNavigationBar( context);
|
||||
MyTool.hideBottomNavigationBar(context);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
|
||||
// 使用自定义布局
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.dialog_start_execute, null);
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"}) TextView tvMessage = view.findViewById(R.id.tv_message);
|
||||
// 滑动模块-解锁
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"}) SlideToUnlockView unlockView_unlock = view.findViewById(R.id.unlockView_unlock);
|
||||
// 滑动模块
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"}) SlideToUnlockView unlockView = view.findViewById(R.id.unlockView);
|
||||
// 高度
|
||||
@ -72,6 +79,10 @@ public class StartExecuteDialog {
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"}) Spinner sp_protect = view.findViewById(R.id.sp_protect);
|
||||
// 完成文字
|
||||
@SuppressLint({"MissingInflatedId", "LocalSuppress"}) TextView tv_protect = view.findViewById(R.id.tv_protect);
|
||||
// 取消执行
|
||||
tvStartCancel = view.findViewById(R.id.tv_start_cancel);
|
||||
// 倒计时文字
|
||||
tvStartCountdown = view.findViewById(R.id.tv_start_countdown);
|
||||
|
||||
//初始化下拉
|
||||
String[] onePowerOptions = {"返航", "降落", "继续飞行"};
|
||||
@ -98,7 +109,7 @@ public class StartExecuteDialog {
|
||||
|
||||
builder.setView(view);
|
||||
|
||||
AlertDialog dialog = builder.create();
|
||||
dialog = builder.create();
|
||||
dialog.show();
|
||||
|
||||
// 设置宽高
|
||||
@ -111,27 +122,120 @@ public class StartExecuteDialog {
|
||||
window.setBackgroundDrawableResource(R.drawable.ffffffff_4round_bg);
|
||||
}
|
||||
|
||||
//判断是否解锁
|
||||
if (MainActivity.isUnlock){
|
||||
unlockView_unlock.setProgress(1f);
|
||||
unlockView_unlock.isSlide = false;
|
||||
}
|
||||
unlockView_unlock.setText("滑动解锁");
|
||||
unlockView_unlock.setOnUnlockListener(new SlideToUnlockView.OnUnlockListener() {
|
||||
@Override
|
||||
public void onUnlock() {
|
||||
//解锁飞机
|
||||
flyVoid.requestArm();
|
||||
new Thread(() -> {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
try {
|
||||
Thread.sleep(490);
|
||||
if (i == 5){
|
||||
context.runOnUiThread(() -> {
|
||||
unlockView_unlock.setProgress(0f);
|
||||
unlockView_unlock.resetProgress();
|
||||
Toast.makeText(context, "解锁失败", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
if (MainActivity.isUnlock){
|
||||
// 滑动到阈值后触发(如关闭对话框或执行操作)
|
||||
context.runOnUiThread(() -> {
|
||||
Toast.makeText(context, "解锁成功", Toast.LENGTH_SHORT).show();
|
||||
unlockView_unlock.setProgress(1f);
|
||||
unlockView_unlock.isSlide = false;
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
});
|
||||
|
||||
unlockView.setText("滑动执行");
|
||||
unlockView.setOnUnlockListener(new SlideToUnlockView.OnUnlockListener() {
|
||||
@Override
|
||||
public void onUnlock() {
|
||||
// // 发送命令
|
||||
// 调用FlyVoid中的方法发送航线到飞控
|
||||
flyVoid.requestMissionStart(0,0);
|
||||
MyTool.hideBottomNavigationBar( context);
|
||||
dialog.dismiss();
|
||||
// 滑动到阈值后触发(如关闭对话框或执行操作)
|
||||
Toast.makeText(context, "开始执行航线", Toast.LENGTH_SHORT).show();
|
||||
if (MainActivity.isUnlock){
|
||||
// 开始5秒倒计时
|
||||
startCountdown();
|
||||
}else {
|
||||
Toast.makeText(context, "请先解锁", Toast.LENGTH_SHORT).show();
|
||||
unlockView.isSlide = true;
|
||||
unlockView.resetProgress();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
;
|
||||
//取消按钮
|
||||
tvMessage.setOnClickListener(v -> {
|
||||
cancelCountdown();
|
||||
dialog.dismiss();
|
||||
MyTool.hideBottomNavigationBar(context);
|
||||
});
|
||||
|
||||
// 取消执行按钮
|
||||
tvStartCancel.setOnClickListener(v -> {
|
||||
cancelCountdown();
|
||||
// 隐藏倒计时和取消按钮
|
||||
tvStartCountdown.setVisibility(View.GONE);
|
||||
tvStartCancel.setVisibility(View.GONE);
|
||||
// 重置滑动条
|
||||
unlockView.isSlide = true;
|
||||
unlockView.resetProgress();
|
||||
});
|
||||
}
|
||||
|
||||
// 开始5秒倒计时
|
||||
private void startCountdown() {
|
||||
// 显示倒计时和取消按钮
|
||||
tvStartCountdown.setVisibility(View.VISIBLE);
|
||||
tvStartCancel.setVisibility(View.VISIBLE);
|
||||
tvStartCountdown.setText("执行倒计时 5");
|
||||
|
||||
// 创建倒计时器
|
||||
countDownTimer = new CountDownTimer(3000, 1000) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
int seconds = (int) (millisUntilFinished / 1000);
|
||||
tvStartCountdown.setText("执行倒计时 " + seconds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
// 倒计时结束,执行任务
|
||||
if (dialog != null && dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
MyTool.hideBottomNavigationBar(context);
|
||||
flyVoid.requestMissionStart(0, 0);
|
||||
Toast.makeText(context, "开始执行航线", Toast.LENGTH_SHORT).show();
|
||||
|
||||
// 隐藏倒计时和取消按钮
|
||||
tvStartCountdown.setVisibility(View.GONE);
|
||||
tvStartCancel.setVisibility(View.GONE);
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
// 取消倒计时
|
||||
private void cancelCountdown() {
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
countDownTimer = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void initSpinners() {
|
||||
|
||||
@ -35,19 +35,15 @@ public class AllView {
|
||||
public TextView tv_power;
|
||||
public TextView tv_connect;
|
||||
public ImageView iv_error;
|
||||
public LinearLayout ll_line_fly_layout;
|
||||
public LinearLayout ll_pitch;
|
||||
public CircularLinearLayout cll_layout;
|
||||
public ImageView iv_yaw;
|
||||
public View v_welkin;
|
||||
public TextView tv_yaw;
|
||||
public View v_mainDisplay;
|
||||
public ImageView iv_location_me;
|
||||
// public ImageView iv_line_fly;
|
||||
public LinearLayout ll_turn_back;
|
||||
public LinearLayout ll_lift_off;
|
||||
public LinearLayout ll_icon_land;
|
||||
public LinearLayout ll_mode_select;
|
||||
public RecyclerView rv_error_list;
|
||||
public LinearLayout ll_left_error_layout;
|
||||
public LinearLayout ll_setting;
|
||||
@ -56,16 +52,11 @@ public class AllView {
|
||||
public LinearLayout ll_left_open;
|
||||
public LinearLayout ll_function_layout;
|
||||
public LinearLayout ll_clear;
|
||||
public LinearLayout ll_antenna;
|
||||
public LinearLayout ll_map;
|
||||
public LinearLayout ll_one_word;
|
||||
public LinearLayout ll_execute_line;
|
||||
public LinearLayout ll_joystick;
|
||||
public LinearLayout ll_fire;
|
||||
public LinearLayout ll_bombing;
|
||||
public LinearLayout ll_shout;
|
||||
public LinearLayout ll_searchlight;
|
||||
public LinearLayout ll_thoroughfare;
|
||||
public LinearLayout ll_hook;
|
||||
public ImageView iv_ptz_top;
|
||||
public ImageView iv_ptz_left;
|
||||
@ -83,8 +74,8 @@ public class AllView {
|
||||
public LinearLayout ll_text;
|
||||
public LinearLayout ll_link;
|
||||
public LinearLayout ll_link_save;
|
||||
public LinearLayout ll_link_fun1;
|
||||
public LinearLayout ll_link_fun2;
|
||||
public TextView tv_link_fun1;
|
||||
public TextView tv_link_fun2;
|
||||
public LinearLayout ll_link_back;
|
||||
public LinearLayout ll_create_link_layout;
|
||||
public RecyclerView rv_create_link_list;
|
||||
@ -94,9 +85,19 @@ public class AllView {
|
||||
public LinearLayout ll_link_start_fun1;
|
||||
public LinearLayout ll_link_start_fun2;
|
||||
public LinearLayout ll_link_start_back;
|
||||
public TextView tv_add_link;
|
||||
public LinearLayout ll_assistance_layout;
|
||||
public EditText et_link_name;
|
||||
public LinearLayout ll_location_me;
|
||||
public EditText et_link_search;
|
||||
public TextView tv_test1;
|
||||
public ImageView iv_open_link_list;
|
||||
public LinearLayout ll_clear_fly_line;
|
||||
public LinearLayout ll_create_link_item_layout;
|
||||
|
||||
public SlideToUnlockView unlockView;
|
||||
public RelativeLayout rl_unlock;
|
||||
|
||||
// public SlideToUnlockView unlockView;
|
||||
// public RelativeLayout rl_unlock;
|
||||
public EditText et_start_execute_height;
|
||||
|
||||
|
||||
@ -119,18 +120,15 @@ public class AllView {
|
||||
tv_power = activity.findViewById(R.id.tv_power);
|
||||
tv_connect = activity.findViewById(R.id.tv_connect);
|
||||
iv_error = activity.findViewById(R.id.iv_error);
|
||||
ll_line_fly_layout = activity.findViewById(R.id.ll_line_fly_layout);
|
||||
ll_pitch = activity.findViewById(R.id.ll_pitch);
|
||||
cll_layout = activity.findViewById(R.id.cll_layout);
|
||||
iv_yaw = activity.findViewById(R.id.iv_yaw);
|
||||
v_welkin = activity.findViewById(R.id.v_welkin);
|
||||
tv_yaw = activity.findViewById(R.id.tv_yaw);
|
||||
v_mainDisplay = activity.findViewById(R.id.v_mainDisplay);
|
||||
iv_location_me = activity.findViewById(R.id.iv_location_me);
|
||||
ll_turn_back = activity.findViewById(R.id.ll_turn_back);
|
||||
ll_lift_off = activity.findViewById(R.id.ll_lift_off);
|
||||
ll_icon_land = activity.findViewById(R.id.ll_icon_land);
|
||||
ll_mode_select = activity.findViewById(R.id.ll_mode_select);
|
||||
rv_error_list = activity.findViewById(R.id.rv_error_list);
|
||||
ll_left_error_layout = activity.findViewById(R.id.ll_left_error_layout);
|
||||
ll_setting = activity.findViewById(R.id.ll_setting);
|
||||
@ -139,16 +137,11 @@ public class AllView {
|
||||
ll_left_open = activity.findViewById(R.id.ll_left_open);
|
||||
ll_function_layout = activity.findViewById(R.id.ll_function_layout);
|
||||
ll_clear = activity.findViewById(R.id.ll_clear);
|
||||
ll_antenna = activity.findViewById(R.id.ll_antenna);
|
||||
ll_map = activity.findViewById(R.id.ll_map);
|
||||
ll_one_word = activity.findViewById(R.id.ll_one_word);
|
||||
ll_execute_line = activity.findViewById(R.id.ll_execute_line);
|
||||
ll_joystick = activity.findViewById(R.id.ll_joystick);
|
||||
ll_fire = activity.findViewById(R.id.ll_fire);
|
||||
ll_bombing = activity.findViewById(R.id.ll_bombing);
|
||||
ll_shout = activity.findViewById(R.id.ll_shout);
|
||||
ll_searchlight = activity.findViewById(R.id.ll_searchlight);
|
||||
ll_thoroughfare = activity.findViewById(R.id.ll_thoroughfare);
|
||||
ll_hook = activity.findViewById(R.id.ll_hook);
|
||||
iv_ptz_top = activity.findViewById(R.id.iv_ptz_top);
|
||||
iv_ptz_left = activity.findViewById(R.id.iv_ptz_left);
|
||||
@ -166,8 +159,8 @@ public class AllView {
|
||||
ll_text= activity.findViewById(R.id.ll_text);
|
||||
ll_link = activity.findViewById(R.id.ll_link);
|
||||
ll_link_save = activity.findViewById(R.id.ll_link_save);
|
||||
ll_link_fun1 = activity.findViewById(R.id.ll_link_fun1);
|
||||
ll_link_fun2 = activity.findViewById(R.id.ll_link_fun2);
|
||||
tv_link_fun1 = activity.findViewById(R.id.tv_link_fun1);
|
||||
tv_link_fun2 = activity.findViewById(R.id.tv_link_fun2);
|
||||
ll_link_back = activity.findViewById(R.id.ll_link_back);
|
||||
ll_create_link_layout = activity.findViewById(R.id.ll_create_link_layout);
|
||||
rv_create_link_list = activity.findViewById(R.id.rv_create_link_list);
|
||||
@ -177,9 +170,18 @@ public class AllView {
|
||||
ll_link_start_fun1 = activity.findViewById(R.id.ll_link_start_fun1);
|
||||
ll_link_start_fun2 = activity.findViewById(R.id.ll_link_start_fun2);
|
||||
ll_link_start_back = activity.findViewById(R.id.ll_link_start_back);
|
||||
unlockView = activity.findViewById(R.id.unlockView);
|
||||
rl_unlock = activity.findViewById(R.id.rl_unlock);
|
||||
// unlockView = activity.findViewById(R.id.unlockView);
|
||||
// rl_unlock = activity.findViewById(R.id.rl_unlock);
|
||||
ll_location_me = activity.findViewById(R.id.ll_location_me);
|
||||
et_start_execute_height = activity.findViewById(R.id.et_start_execute_height);
|
||||
tv_add_link = activity.findViewById(R.id.tv_add_link);
|
||||
ll_assistance_layout = activity.findViewById(R.id.ll_assistance_layout);
|
||||
et_link_name = activity.findViewById(R.id.et_link_name);
|
||||
et_link_search = activity.findViewById(R.id.et_link_search);
|
||||
tv_test1 = activity.findViewById(R.id.tv_test1);
|
||||
ll_clear_fly_line = activity.findViewById(R.id.ll_clear_fly_line);
|
||||
ll_create_link_item_layout = activity.findViewById(R.id.ll_create_link_item_layout);
|
||||
iv_open_link_list = activity.findViewById(R.id.iv_open_link_list);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,10 +80,10 @@ public class FlyVoid {
|
||||
isParamUpdateComplete = isComplete;
|
||||
}
|
||||
|
||||
public void setAttitude(Context content, AllView allView, double roll, double pitch, double yaw) {
|
||||
public void setAttitude(Context content, AllView allView, double roll, double pitch, int yaw) {
|
||||
//设置偏航
|
||||
// allView.iv_yaw.setRotation((int) Math.round(yaw * 57.2));
|
||||
allView.iv_yaw.setRotation((int) Math.toDegrees(yaw * -1));
|
||||
allView.iv_yaw.setRotation((yaw + 360) * -1);
|
||||
|
||||
//设置翻滚
|
||||
allView.cll_layout.setPivotX((float) allView.cll_layout.getWidth() / 2);
|
||||
@ -375,7 +375,7 @@ public class FlyVoid {
|
||||
|
||||
// 创建 ProgressDialog
|
||||
android.app.ProgressDialog progressDialog = new android.app.ProgressDialog(context);
|
||||
progressDialog.setTitle("任务执行中");
|
||||
progressDialog.setTitle("任务上传中");
|
||||
progressDialog.setMessage("正在发送航线到飞控...");
|
||||
progressDialog.setProgressStyle(android.app.ProgressDialog.STYLE_HORIZONTAL);
|
||||
progressDialog.setCancelable(false); // 设置不可手动关闭
|
||||
@ -419,7 +419,7 @@ public class FlyVoid {
|
||||
sentWaypoints = seq + 1;
|
||||
|
||||
// 更新发送进度
|
||||
final int progress = (int) ((sentWaypoints / (float) totalWaypoints) * 50); // 发送占50%进度
|
||||
final int progress = (int) ((sentWaypoints / (float) totalWaypoints) * 92); // 发送占50%进度
|
||||
context.runOnUiThread(() -> {
|
||||
progressDialog.setProgress(progress);
|
||||
});
|
||||
@ -455,8 +455,7 @@ public class FlyVoid {
|
||||
progressDialog.dismiss();
|
||||
|
||||
if (verifyResult) {
|
||||
Toast.makeText(context, "航线已发送到飞控并校验通过", Toast.LENGTH_SHORT).show();
|
||||
startExecuteDialog.show();
|
||||
Toast.makeText(context, "航线上传成功", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(context, "航线发送完成但校验失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -475,6 +474,60 @@ public class FlyVoid {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 方法:整理收到的点位,并且转换成mavlink可以识别的格式
|
||||
*
|
||||
* @cuijingzhou
|
||||
* */
|
||||
private void creatDataList (ArrayList<CreateLink> createLinkList, String height) {
|
||||
ArrayList<msg_mission_item_int> dataList = new ArrayList<>();
|
||||
//home点,默认第一个为home点
|
||||
msg_mission_item_int waypoint = new msg_mission_item_int();
|
||||
waypoint.target_system = 1; // 无人机系统ID
|
||||
waypoint.target_component = 1; // 无人机组件ID
|
||||
waypoint.seq = 0; // 航点序号
|
||||
waypoint.frame = MAV_FRAME.MAV_FRAME_GLOBAL_RELATIVE_ALT; // 坐标系
|
||||
waypoint.command = MAV_CMD.MAV_CMD_NAV_WAYPOINT; // 航点指令
|
||||
waypoint.current = 1 ; // 第一个航点设为当前航点
|
||||
waypoint.autocontinue = 1; // 自动继续到下一个航点
|
||||
waypoint.param1 = 0; // 停留时间(秒)
|
||||
waypoint.param2 = 0; // 接受半径(m)
|
||||
waypoint.param3 = 0; // 通过半径(m)
|
||||
waypoint.param4 = 0; // 航向角
|
||||
waypoint.x = 0;
|
||||
waypoint.y = 0;
|
||||
waypoint.z = 0; // 高度(相对)
|
||||
dataList.add(waypoint);
|
||||
//起飞,将飞机拉起来
|
||||
msg_mission_item_int waypoint1 = new msg_mission_item_int();
|
||||
waypoint1.target_system = 1; // 无人机系统ID
|
||||
waypoint1.target_component = 1; // 无人机组件ID
|
||||
waypoint1.seq = 1; // 航点序号
|
||||
waypoint1.frame = MAV_FRAME.MAV_FRAME_GLOBAL_RELATIVE_ALT; // 坐标系
|
||||
waypoint1.command = MAV_CMD.MAV_CMD_NAV_TAKEOFF; // 航点指令
|
||||
waypoint1.current = 0; // 第一个航点设为当前航点
|
||||
waypoint1.autocontinue = 1; // 自动继续到下一个航点
|
||||
waypoint1.param1 = 0; // 停留时间(秒)
|
||||
waypoint1.param2 = 0; // 接受半径(m)
|
||||
waypoint1.param3 = 0; // 通过半径(m)
|
||||
waypoint1.param4 = 0; // 航向角
|
||||
waypoint1.x = 0;
|
||||
waypoint1.y = 0;
|
||||
waypoint1.z = Float.parseFloat(height); // 高度(相对)
|
||||
waypoint1.mission_type = MAV_MISSION_TYPE.MAV_MISSION_TYPE_MISSION;
|
||||
|
||||
// //添加航点
|
||||
// for (int i = 0; i < createLinkList.size(); i++) {
|
||||
// if (){
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 方法:给飞控发送点位
|
||||
*
|
||||
@ -763,6 +816,4 @@ public class FlyVoid {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -8,6 +8,8 @@ import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.location.Location;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
@ -118,6 +120,115 @@ public class MapVoid {
|
||||
|
||||
|
||||
|
||||
// 在成员变量部分添加
|
||||
public List<LatLng> flightTrackPoints = new ArrayList<>(); // 飞行轨迹点
|
||||
public Polyline flightTrackPolyline = null; // 飞行轨迹线
|
||||
public Handler flightTrackHandler = new Handler(Looper.getMainLooper()); // 轨迹更新Handler
|
||||
public Runnable flightTrackRunnable; // 轨迹更新任务
|
||||
public boolean isTracking = false; // 是否正在追踪
|
||||
/**
|
||||
* 开始飞行轨迹跟踪
|
||||
*/
|
||||
public void startFlightTracking() {
|
||||
if (isTracking) return;
|
||||
|
||||
isTracking = true;
|
||||
flightTrackPoints.clear();
|
||||
|
||||
flightTrackRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
if (isTracking) {
|
||||
// 获取当前飞机位置
|
||||
double lat = MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000;
|
||||
double lon = MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lon", 0) / 10000000;
|
||||
|
||||
// 检查坐标有效性
|
||||
if (lat != 0 && lon != 0) {
|
||||
// 转换坐标
|
||||
double[] convertedCoords = CoordinateConverter.wgs84ToGcj02(lon, lat);
|
||||
if (convertedCoords != null && convertedCoords.length >= 2) {
|
||||
LatLng currentPos = new LatLng(convertedCoords[1], convertedCoords[0]);
|
||||
|
||||
// 添加到轨迹点列表
|
||||
flightTrackPoints.add(currentPos);
|
||||
|
||||
// 更新轨迹线
|
||||
updateFlightTrack();
|
||||
}
|
||||
}
|
||||
// 0.3秒后再次执行
|
||||
flightTrackHandler.postDelayed(this, 600);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
Log.d(TAG, "error: "+e);
|
||||
// 2秒后再次执行
|
||||
flightTrackHandler.postDelayed(this, 600);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
// 立即开始第一次执行
|
||||
flightTrackHandler.post(flightTrackRunnable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止飞行轨迹跟踪
|
||||
*/
|
||||
public void stopFlightTracking() {
|
||||
isTracking = false;
|
||||
if (flightTrackRunnable != null) {
|
||||
flightTrackHandler.removeCallbacks(flightTrackRunnable);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新飞行轨迹线
|
||||
*/
|
||||
public void updateFlightTrack() {
|
||||
// 移除旧的轨迹线
|
||||
if (flightTrackPolyline != null) {
|
||||
flightTrackPolyline.remove();
|
||||
}
|
||||
|
||||
// 控制轨迹点数量不超过20个
|
||||
if (flightTrackPoints.size() > 2048) {
|
||||
flightTrackPoints.remove(0); // 删除最后一个点
|
||||
}
|
||||
|
||||
List<LatLng> sparsePoints = new ArrayList<>();
|
||||
// 每5个点取1个点,减少点密度
|
||||
for (int i = 0; i < flightTrackPoints.size(); i += 5) {
|
||||
sparsePoints.add(flightTrackPoints.get(i));
|
||||
}
|
||||
|
||||
flightTrackPolyline = allView.map.getMap().addPolyline(new PolylineOptions()
|
||||
.addAll(sparsePoints)
|
||||
.width(12)
|
||||
.color(Color.RED)
|
||||
.setDottedLine(true)
|
||||
.setDottedLineType(PolylineOptions.DOTTEDLINE_TYPE_CIRCLE));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除飞行轨迹
|
||||
*/
|
||||
public void clearFlightTrack() {
|
||||
stopFlightTracking();
|
||||
|
||||
// 移除轨迹线
|
||||
if (flightTrackPolyline != null) {
|
||||
flightTrackPolyline.remove();
|
||||
flightTrackPolyline = null;
|
||||
}
|
||||
|
||||
// 清空轨迹点
|
||||
flightTrackPoints.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -20,8 +20,10 @@ public class MyReceiver extends BroadcastReceiver {
|
||||
public static JSONObject PARAM_VALUE_json = null;//飞机基础飞行模式
|
||||
public static JSONObject RC_CHANNELS_json = null;//RC通道监控
|
||||
public static JSONObject VFR_HUD_json = null;//油门量
|
||||
public static JSONObject MISSION_REQUEST_json = null;//路线上传报错回调
|
||||
public static JSONObject MISSION_REQUEST_json = null;//航线上传报错回调
|
||||
public static JSONObject MISSION_ACK_json = null;//路线上传穿插回调
|
||||
public static JSONObject MISSION_CURRENT_json = null;//路线上传穿插回调
|
||||
|
||||
|
||||
|
||||
//ATTITUDE
|
||||
@ -93,7 +95,10 @@ public class MyReceiver extends BroadcastReceiver {
|
||||
}
|
||||
private OnMissionAckListener MissionAcklistener;
|
||||
|
||||
|
||||
public interface OnMissionCurrentListener {
|
||||
void onMissionCurrent(JSONObject data);
|
||||
}
|
||||
private OnMissionCurrentListener MissionCurrentlistener;
|
||||
|
||||
|
||||
public void setATTITUDEListener(OnATTITUDEListener listener) {
|
||||
@ -136,7 +141,9 @@ public class MyReceiver extends BroadcastReceiver {
|
||||
public void setMissionAcklistener(OnMissionAckListener listener) {
|
||||
this.MissionAcklistener = listener;
|
||||
}
|
||||
|
||||
public void setMissionCurrentlistener(OnMissionCurrentListener listener) {
|
||||
this.MissionCurrentlistener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
@ -360,5 +367,25 @@ public class MyReceiver extends BroadcastReceiver {
|
||||
Log.e("cuijingzhou-e Broadcast_MISSION_ACK", e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
if ("Broadcast_MISSION_CURRENT".equals(intent.getAction())) {
|
||||
try {
|
||||
String receivedData = intent.getStringExtra("data");
|
||||
if (receivedData != null) {
|
||||
MISSION_CURRENT_json = new JSONObject(receivedData);
|
||||
MISSION_CURRENT_json.optString("jsonObject");
|
||||
// Log.d("cuijingzhou", "onReceive: " + receivedData);
|
||||
// 触发回调
|
||||
if (MissionCurrentlistener != null) {
|
||||
MissionCurrentlistener.onMissionCurrent(MISSION_CURRENT_json);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.e("cuijingzhou-e Broadcast_MISSION_CURRENT", e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -22,7 +22,7 @@ import java.util.List;
|
||||
* // 添加一个CreateLink列表
|
||||
* ArrayList<CreateLink> createLinkList = new ArrayList<>();
|
||||
* // ... 添加CreateLink对象到列表中
|
||||
* boolean success = sqlClass.addCreateLinkList("路线1", createLinkList);
|
||||
* boolean success = sqlClass.addCreateLinkList("航线1", createLinkList);
|
||||
*
|
||||
* // 获取所有列表信息
|
||||
* List<SQLClass.LinkListInfo> listInfos = sqlClass.getAllLinkListInfo();
|
||||
@ -31,7 +31,7 @@ import java.util.List;
|
||||
* ArrayList<CreateLink> retrievedList = sqlClass.getCreateLinkList(1);
|
||||
*
|
||||
* // 更新列表
|
||||
* sqlClass.updateCreateLinkList(1, "新路线名称", updatedCreateLinkList);
|
||||
* sqlClass.updateCreateLinkList(1, "新航线名称", updatedCreateLinkList);
|
||||
*
|
||||
* // 删除列表
|
||||
* sqlClass.deleteCreateLinkList(1);
|
||||
@ -65,6 +65,10 @@ public class SQLClass extends SQLiteOpenHelper {
|
||||
private static final String COLUMN_WAYPOINT_INDEX = "waypoint_index";
|
||||
private static final String COLUMN_LATITUDE = "latitude";
|
||||
private static final String COLUMN_LONGITUDE = "longitude";
|
||||
private static final String COLUMN_BOM1_SELECT = "bom1_select";
|
||||
private static final String COLUMN_BOM2_SELECT = "bom2_select";
|
||||
|
||||
|
||||
private static final String COLUMN_ITEM_ORDER = "item_order"; // 项在列表中的顺序
|
||||
|
||||
// 创建主表的SQL语句
|
||||
@ -120,8 +124,8 @@ public class SQLClass extends SQLiteOpenHelper {
|
||||
*/
|
||||
public boolean addCreateLinkList(String listName, ArrayList<CreateLink> createLinkList) {
|
||||
// 检查是否已达到最大数量限制
|
||||
if (getLinkListCount() >= 10) {
|
||||
Log.w(TAG, "已达到最大存储数量限制(10个列表),无法添加新列表");
|
||||
if (getLinkListCount() >= 10000) {
|
||||
Log.w(TAG, "已达到最大存储数量限制(10000个列表),无法添加新列表");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -235,6 +239,8 @@ public class SQLClass extends SQLiteOpenHelper {
|
||||
int waypointIndex = cursor.getInt(cursor.getColumnIndexOrThrow(COLUMN_WAYPOINT_INDEX));
|
||||
double latitude = cursor.getDouble(cursor.getColumnIndexOrThrow(COLUMN_LATITUDE));
|
||||
double longitude = cursor.getDouble(cursor.getColumnIndexOrThrow(COLUMN_LONGITUDE));
|
||||
// boolean bom1_select = cursor.getInt(cursor.getColumnIndexOrThrow(COLUMN_BOM1_SELECT)) == 1;
|
||||
// boolean bom2_select = cursor.getInt(cursor.getColumnIndexOrThrow(COLUMN_BOM2_SELECT)) == 1;
|
||||
|
||||
LatLng latLng = new LatLng(latitude, longitude);
|
||||
CreateLink createLink = new CreateLink(name, height, speed, waypointIndex, latLng);
|
||||
@ -419,6 +425,14 @@ public class SQLClass extends SQLiteOpenHelper {
|
||||
private int listId;
|
||||
private String listName;
|
||||
private long createdTime;
|
||||
private boolean isSelect;
|
||||
|
||||
public LinkListInfo(int listId, String listName, long createdTime, boolean isSelect) {
|
||||
this.listId = listId;
|
||||
this.listName = listName;
|
||||
this.createdTime = createdTime;
|
||||
this.isSelect = isSelect;
|
||||
}
|
||||
|
||||
public LinkListInfo(int listId, String listName, long createdTime) {
|
||||
this.listId = listId;
|
||||
@ -430,12 +444,32 @@ public class SQLClass extends SQLiteOpenHelper {
|
||||
return listId;
|
||||
}
|
||||
|
||||
public void setListId(int listId) {
|
||||
this.listId = listId;
|
||||
}
|
||||
|
||||
public String getListName() {
|
||||
return listName;
|
||||
}
|
||||
|
||||
public void setListName(String listName) {
|
||||
this.listName = listName;
|
||||
}
|
||||
|
||||
public long getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public void setCreatedTime(long createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
public boolean isSelect() {
|
||||
return isSelect;
|
||||
}
|
||||
|
||||
public void setSelect(boolean select) {
|
||||
isSelect = select;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -172,6 +172,18 @@ public class BroadcastUtil {
|
||||
intent.clone();
|
||||
}
|
||||
|
||||
/**
|
||||
* MAVLINK_MSG_ID_MISSION_CURRENT
|
||||
*
|
||||
* @param context 上下文
|
||||
* @param data 数据-json
|
||||
*/
|
||||
public static void Broadcast_MISSION_CURRENT(Context context, String data) {
|
||||
Intent intent = new Intent("Broadcast_MISSION_CURRENT");
|
||||
intent.putExtra("data", data);
|
||||
context.sendBroadcast(intent);
|
||||
intent.clone();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
package com.example.longyi_groundstation.Util;
|
||||
|
||||
public class Url {
|
||||
|
||||
public static String getBaseUrl() {
|
||||
return "https://api.longyi-uav-cloud.com";
|
||||
}
|
||||
|
||||
/**
|
||||
* 方法:登录接口
|
||||
*
|
||||
* @cuijingzhou
|
||||
*/
|
||||
public static String LoginUrl() {
|
||||
return getBaseUrl() + "/admin-api/system/auth/login";
|
||||
}
|
||||
|
||||
}
|
||||
16
app/src/main/res/drawable/custom_seekbar_progress.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<solid android:color="#ffffff" />
|
||||
</shape>
|
||||
<corners android:radius="5dp" />
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<solid android:color="#029a45" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
6
app/src/main/res/drawable/custom_seekbar_thumb.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#029a45" />
|
||||
<size android:width="12dp" android:height="12dp" />
|
||||
</shape>
|
||||
@ -3,10 +3,10 @@
|
||||
|
||||
<corners android:radius="4dp"/>
|
||||
|
||||
<solid android:color="#60B964"/>
|
||||
|
||||
<stroke
|
||||
android:width="0.5dp"
|
||||
android:color="#303030"/>
|
||||
|
||||
<solid android:color="#029A45"/>
|
||||
|
||||
</shape>
|
||||
@ -3,10 +3,10 @@
|
||||
|
||||
<corners android:radius="4dp"/>
|
||||
|
||||
<solid android:color="#029A45"/>
|
||||
|
||||
<stroke
|
||||
android:width="0.5dp"
|
||||
android:color="#303030"/>
|
||||
|
||||
<solid android:color="#62A7F0"/>
|
||||
|
||||
</shape>
|
||||
7
app/src/main/res/drawable/ff33b138_1round_1stroke.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners android:radius="1dp" />
|
||||
<stroke android:color="#33B138" android:width="0.4dp" />
|
||||
|
||||
</shape>
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
<corners android:radius="4dp"/>
|
||||
|
||||
<solid android:color="#DD635A"/>
|
||||
<solid android:color="#DF4B40"/>
|
||||
|
||||
<stroke
|
||||
android:width="0.5dp"
|
||||
8
app/src/main/res/drawable/ffffffff_4round_1stroke_bg.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners android:radius="4dp"/>
|
||||
|
||||
<stroke android:width="0.4dp" android:color="#ffffff"/>
|
||||
|
||||
</shape>
|
||||
@ -2,5 +2,5 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FFFFFF"/>
|
||||
<corners android:radius="4dp"/>
|
||||
<stroke android:width="1dp" android:color="#E0E0E0"/>
|
||||
<stroke android:width="0.5dp" android:color="#E0E0E0"/>
|
||||
</shape>
|
||||
|
Before Width: | Height: | Size: 8.3 KiB |
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<corners android:radius="4dp" />
|
||||
<stroke android:color="#33B138" android:width="0.4dp" />
|
||||
<solid android:color="#B6000000"/>
|
||||
|
||||
</shape>
|
||||
@ -57,34 +57,8 @@
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content">-->
|
||||
|
||||
<!-- <RadioGroup-->
|
||||
<!-- android:layout_centerVertical="true"-->
|
||||
<!-- android:id="@+id/rg_layout"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content">-->
|
||||
|
||||
<!-- <androidx.appcompat.widget.AppCompatRadioButton-->
|
||||
<!-- android:textColor="#ffffff"-->
|
||||
<!-- android:checked="true"-->
|
||||
<!-- android:id="@+id/rb_bt1"-->
|
||||
<!-- android:textSize="12sp"-->
|
||||
<!-- android:text="串口"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="20dp"/>-->
|
||||
|
||||
<!-- <androidx.appcompat.widget.AppCompatRadioButton-->
|
||||
<!-- android:textColor="#ffffff"-->
|
||||
<!-- android:layout_marginTop="15dp"-->
|
||||
<!-- android:id="@+id/rb_bt2"-->
|
||||
<!-- android:textSize="12sp"-->
|
||||
<!-- android:text="UDP"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="20dp"/>-->
|
||||
|
||||
|
||||
<!-- </RadioGroup>-->
|
||||
|
||||
<!-- -->
|
||||
<!-- -->
|
||||
<!-- <EditText-->
|
||||
<!-- android:layout_marginTop="45dp"-->
|
||||
<!-- android:id="@+id/et_port"-->
|
||||
|
||||
@ -499,6 +499,7 @@
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_test1"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:gravity="center"
|
||||
@ -546,25 +547,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 滑动解锁飞机 -->
|
||||
<RelativeLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/rl_unlock"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_below="@+id/ll_title"
|
||||
android:layout_centerHorizontal="true">
|
||||
|
||||
<com.example.longyi_groundstation.Main.View.SlideToUnlockView
|
||||
android:id="@+id/unlockView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:layout_margin="8dp"
|
||||
android:background="#00000000" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<!-- 左侧功能布局 -->
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
@ -576,6 +558,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- 异常列表 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_left_error_layout"
|
||||
android:layout_width="wrap_content"
|
||||
@ -593,23 +576,222 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 初始化航线列表 -->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_create_link_layout"
|
||||
android:minHeight="35dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/xbb303030_4round_bg"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_create_link_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" />
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_create_link_item_layout"
|
||||
android:layout_width="316dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/xbb303030_4round_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="3dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="25dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ffffffff_4round_1stroke_bg">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="2dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ffffff"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:text="航线名"
|
||||
android:textColor="#303030"
|
||||
android:textSize="8sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0.3dp"
|
||||
android:layout_height="15dp"
|
||||
android:background="#cdcdcd" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_link_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#ffffff"
|
||||
android:gravity="center"
|
||||
android:hint="请输入航线名称"
|
||||
android:textColor="#303030"
|
||||
android:textSize="7sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:background="@drawable/ffffffff_4round_1stroke_bg"
|
||||
android:padding="0.5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:gravity="center"
|
||||
android:text="全部"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_link_fun1"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="22dp"
|
||||
android:background="@drawable/ff029a45_4round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="航线反转"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_link_fun2"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="1dp"
|
||||
android:layout_marginRight="1dp"
|
||||
android:background="@drawable/ff029a45_4round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="清除全部"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:gravity="center"
|
||||
android:text="航点"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/et_height"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:gravity="center"
|
||||
android:text="高度"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:gravity="center"
|
||||
android:text="速度(m/s)"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/et_lat"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:gravity="center"
|
||||
android:text="纬度(lon)"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/et_lon"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:gravity="center"
|
||||
android:text="经度(lat)"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_del"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:gravity="center"
|
||||
android:text="功能"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_create_link_list"
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_open_link_list"
|
||||
android:padding="5dp"
|
||||
android:src="@mipmap/icon_expand"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<!-- 所有航线 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_all_link_layout"
|
||||
android:layout_width="wrap_content"
|
||||
@ -617,13 +799,77 @@
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/xbb303030_4round_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="2dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ffffffff_4round_1stroke_bg"
|
||||
android:orientation="horizontal"
|
||||
android:padding="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="2dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ffffff"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:text="搜索"
|
||||
android:textColor="#303030"
|
||||
android:textSize="9sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0.3dp"
|
||||
android:layout_height="15dp"
|
||||
android:background="#cdcdcd" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_link_search"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#ffffff"
|
||||
android:gravity="center"
|
||||
android:hint="请输入航线名称"
|
||||
android:textColor="#303030"
|
||||
android:textSize="7sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_add_link"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:background="@drawable/ff029a45_4round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+ 添加"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="8sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_all_link_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="3dp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@ -1029,32 +1275,29 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_location_me"
|
||||
android:id="@+id/ll_execute_line"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp"
|
||||
android:visibility="visible">
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_location_me"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_location_me" />
|
||||
android:src="@mipmap/icon_one_word" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="飞机位置"
|
||||
android:text="执行任务"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@ -1066,9 +1309,9 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_function_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
android:visibility="visible">
|
||||
|
||||
<View
|
||||
android:layout_width="0.2dp"
|
||||
@ -1090,62 +1333,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_clear"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_clear" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="清除"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_antenna"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_antenna" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="天线"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_map"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
@ -1161,96 +1352,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="创建航线"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_line_fly_layout"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_line_fly" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="执行路线"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_mode_select"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_mode_select" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="切换模式"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_execute_line"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_one_word" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="线路作业"
|
||||
android:text="规划任务"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
@ -1282,32 +1384,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_joystick"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_joystick" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="虚拟摇杆"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -1318,37 +1394,11 @@
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_fire"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_fire" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="火警告警"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_bombing"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
@ -1371,33 +1421,6 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_shout"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_shout" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="广播"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_searchlight"
|
||||
android:layout_width="40dp"
|
||||
@ -1434,8 +1457,9 @@
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_thoroughfare"
|
||||
android:id="@+id/ll_shout"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
@ -1446,47 +1470,28 @@
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_thoroughfare" />
|
||||
android:src="@mipmap/icon_shout" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="通道"
|
||||
android:text="广播"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_one_word"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp"
|
||||
android:visibility="visible">
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_execute_line" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="一键作业"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@ -1503,7 +1508,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 路线规划 -->
|
||||
<!-- 航线规划 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_link"
|
||||
android:layout_width="wrap_content"
|
||||
@ -1519,7 +1524,7 @@
|
||||
android:id="@+id/ll_link_save"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="25dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_4round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@ -1538,45 +1543,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_link_fun1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:gravity="center"
|
||||
android:text="航线反转"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="8sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_link_fun2"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:gravity="center"
|
||||
android:text="航线清除"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="8sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_link_back"
|
||||
@ -1600,7 +1566,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 路线执行 -->
|
||||
<!-- 航线执行 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_link_start"
|
||||
android:layout_width="wrap_content"
|
||||
@ -1615,33 +1581,33 @@
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:padding="2dp"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:padding="2dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_start_execute_height"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#ffffff"
|
||||
android:gravity="center"
|
||||
android:text="10"
|
||||
android:textSize="7sp"
|
||||
android:textColor="#303030"
|
||||
android:background="#ffffff"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="28dp" />
|
||||
android:textSize="7sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#ffffff"
|
||||
android:paddingRight="5dp"
|
||||
android:text="米"
|
||||
android:textSize="9sp"
|
||||
android:textColor="#303030"
|
||||
android:background="#ffffff"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
android:textSize="9sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -1650,11 +1616,10 @@
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/ff60b964_4round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_4round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="28dp"
|
||||
@ -1667,16 +1632,15 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/ll_link_start_fun2"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/ff03a9f4_4round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -1690,8 +1654,8 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_link_start_back"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
@ -1710,6 +1674,103 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右下角辅助按钮 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_assistance_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="10dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_clear"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_clear" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="清除航线"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_clear_fly_line"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_clear_fly_line"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_line_fly" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="清除轨迹"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_location_me"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_location_me"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:src="@mipmap/icon_location_me" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center"
|
||||
android:text="飞机位置"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@ -225,7 +225,7 @@
|
||||
android:layout_weight="1"
|
||||
android:layout_margin="5dp" />
|
||||
|
||||
<!-- 路线规划 -->
|
||||
<!-- 航线规划 -->
|
||||
<LinearLayout
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="5dp"
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#293755"
|
||||
android:background="#029A45"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:padding="3dp"
|
||||
android:background="#555f75"
|
||||
android:background="#101010"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent">
|
||||
@ -55,7 +55,7 @@
|
||||
<TextView
|
||||
android:textSize="12sp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:textColor="#ffffff"
|
||||
android:id="@+id/tv_foundation"
|
||||
android:gravity="center"
|
||||
@ -149,7 +149,13 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0.2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#029A45"/>
|
||||
|
||||
<LinearLayout
|
||||
android:background="#101010"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@ -1,46 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="180dp"
|
||||
android:background="@drawable/x80000000_4round_bg"
|
||||
android:id="@+id/ll_main"
|
||||
android:background="@drawable/x80000000_4round_1stroke_bg"
|
||||
android:padding="5dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="3dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginRight="3dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="9sp"
|
||||
android:text="名称:"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="22dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_alignParentRight="true"
|
||||
android:id="@+id/tv_del"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ffdd635a_4round_1stroke_bg"
|
||||
android:textSize="9sp"
|
||||
android:text="删除"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="20dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="135dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
@ -49,43 +21,44 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textColor="#303030"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="8sp"
|
||||
android:text="创建时间:"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="航线:"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textColor="#303030"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:id="@+id/tv_title"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp"
|
||||
android:text="2010-10-10 12:00:00"
|
||||
android:text="名称:"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textColor="#303030"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="8sp"
|
||||
android:text="点位数量:"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="航点数量:"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_number"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textColor="#303030"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp"
|
||||
android:text="12个"
|
||||
android:layout_width="wrap_content"
|
||||
@ -93,7 +66,49 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="8sp"
|
||||
android:text="创建时间:"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp"
|
||||
android:text="2010-10-10 12:00:00"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_alignParentRight="true"
|
||||
android:id="@+id/tv_del"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ffdf4b40_4round_1stroke_bg"
|
||||
android:textSize="9sp"
|
||||
android:text="删 除"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="28dp"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@ -56,7 +56,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#62a7f0" />
|
||||
android:background="#029a45" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_right_progress"
|
||||
|
||||
@ -1,114 +1,401 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="160dp"
|
||||
android:background="@drawable/x80000000_4round_bg"
|
||||
android:padding="5dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="310dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_item"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp">
|
||||
|
||||
<TextView
|
||||
android:textStyle="bold"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:id="@+id/tv_title"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="11sp"
|
||||
android:text="名称:"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="22dp"/>
|
||||
android:textSize="8sp"
|
||||
android:text="1"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<TextView
|
||||
android:layout_alignParentRight="true"
|
||||
android:id="@+id/tv_del"
|
||||
android:layout_marginLeft="10dp"
|
||||
<EditText
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:gravity="center"
|
||||
android:text="30"
|
||||
android:textSize="7sp"
|
||||
android:id="@+id/et_height"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<EditText
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ffdd635a_4round_1stroke_bg"
|
||||
android:textSize="9sp"
|
||||
android:text="删除"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="20dp"/>
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:gravity="center"
|
||||
android:text="1"
|
||||
android:textSize="7sp"
|
||||
android:id="@+id/et_speed"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</RelativeLayout>
|
||||
<EditText
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:gravity="center"
|
||||
android:text="110.1234567"
|
||||
android:textSize="7sp"
|
||||
android:id="@+id/et_lat"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
|
||||
<EditText
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:gravity="center"
|
||||
android:text="110.1234567"
|
||||
android:textSize="7sp"
|
||||
android:id="@+id/et_lon"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:gravity="center"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:layout_width="99.5dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textColor="#303030"
|
||||
android:textSize="9sp"
|
||||
android:text="高度:"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tv_del"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="30"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ffdf4b40_4round_1stroke_bg"
|
||||
android:textSize="9sp"
|
||||
android:background="#ffffff"
|
||||
android:id="@+id/et_height"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:text="删除"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="18dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textColor="#303030"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:id="@+id/tv_expand"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:textSize="9sp"
|
||||
android:text="m"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:text="展开"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="18dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textColor="#303030"
|
||||
android:textSize="9sp"
|
||||
android:text="速度:"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="30"
|
||||
android:textSize="9sp"
|
||||
android:background="#ffffff"
|
||||
android:id="@+id/et_speed"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textColor="#303030"
|
||||
android:textSize="9sp"
|
||||
android:text="m/s"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="visible"
|
||||
android:id="@+id/ll_expand"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="68dp">
|
||||
|
||||
<LinearLayout
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:gravity="center"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp"
|
||||
android:text="扩展"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/ff33b138_1round_1stroke"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="right|center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp"
|
||||
android:text="转弯方式:"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginLeft="1dp"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_turn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:gravity="center"
|
||||
android:id="@+id/tv_turn"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp"
|
||||
android:text="协调转弯"
|
||||
android:layout_width="60dp"
|
||||
android:padding="5dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:src="@mipmap/icon_spinner_dowm"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/sp_turn"
|
||||
android:layout_below="@+id/rl_turn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:spinnerMode="dropdown"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/ll_turn"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_turn_time"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="1"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#303030"
|
||||
android:textSize="6sp"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="16dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="1dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="6sp"
|
||||
android:text="秒"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:paddingTop="3dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:gravity="right"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp"
|
||||
android:text="开启投弹:"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginRight="5dp"
|
||||
android:id="@+id/ll_bom_layout1"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bom_text1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:textSize="6sp"
|
||||
android:text="弹舱1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="16dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bom1"
|
||||
android:src="@mipmap/icon_select_link_no"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_bom_height_layout1"
|
||||
android:visibility="invisible"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:textColor="#EDFFFFFF"
|
||||
android:textSize="6sp"
|
||||
android:text="引爆高度"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="16dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_bom1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="1"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#303030"
|
||||
android:textSize="6sp"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="14dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="1dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp"
|
||||
android:text="m"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_bom_layout2"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bom_text2"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/b2101010_4round_1stroke_bg"
|
||||
android:textSize="6sp"
|
||||
android:text="弹舱2"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="16dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bom2"
|
||||
android:src="@mipmap/icon_select_link_no"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_bom_height_layout2"
|
||||
android:visibility="invisible"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:textColor="#EDFFFFFF"
|
||||
android:textSize="6sp"
|
||||
android:text="引爆高度"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="16dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_bom2"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="1"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#303030"
|
||||
android:textSize="6sp"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="14dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_marginLeft="1dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp"
|
||||
android:text="m"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/tv_null_data"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="7sp"
|
||||
android:text="无可用弹舱"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="16dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@ -33,7 +33,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -58,7 +58,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -89,7 +89,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_value_on_minus"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:gravity="center"
|
||||
@ -112,7 +112,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_value_on_add"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:gravity="center"
|
||||
@ -133,7 +133,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_value_off_minus"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:gravity="center"
|
||||
@ -156,7 +156,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_value_off_add"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:gravity="center"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="26dp"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
|
||||
@ -9,20 +9,22 @@
|
||||
<ImageView
|
||||
android:layout_centerHorizontal="true"
|
||||
android:id="@+id/marker_icon"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="26dp"
|
||||
android:src="@mipmap/icon_marker" />
|
||||
|
||||
<!-- 文字标签 -->
|
||||
<TextView
|
||||
android:layout_alignParentBottom="true"
|
||||
android:textStyle="bold"
|
||||
android:paddingBottom="5dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:id="@+id/marker_text"
|
||||
android:layout_width="30dp"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="点位1"
|
||||
android:textSize="7sp"
|
||||
android:text="1"
|
||||
android:textSize="9sp"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/x80000000_4round_bg"
|
||||
android:gravity="center" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
87
app/src/main/res/layout/dialog_link_name.xml
Normal file
@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@drawable/ff029a45_4round_bg"
|
||||
android:gravity="center"
|
||||
android:padding="8dp"
|
||||
android:text="确认名称"
|
||||
android:textColor="#fff"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_margin="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:textColor="#F59393"
|
||||
android:textSize="12sp"
|
||||
android:text="注意:您未设置航线名称,是否使用默认名称?"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:padding="1dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:gravity="center"
|
||||
android:textSize="12sp"
|
||||
android:text="设置航线名称:"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<EditText
|
||||
android:padding="2dp"
|
||||
android:id="@+id/et_name"
|
||||
android:background="@drawable/b2303030_4round_1stroke_bg"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.example.longyi_groundstation.Main.View.SlideToUnlockView
|
||||
android:background="#ffffff"
|
||||
android:id="@+id/unlockView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:layout_margin="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="#C3606060"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
154
app/src/main/res/layout/dialog_point_fly.xml
Normal file
@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@drawable/ff029a45_4round_bg"
|
||||
android:gravity="center"
|
||||
android:padding="8dp"
|
||||
android:text="指点飞行"
|
||||
android:textColor="#fff"
|
||||
android:textSize="13sp" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:textColor="#101010"
|
||||
android:textSize="12sp"
|
||||
android:text="经度坐标:"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_lon"
|
||||
android:padding="6dp"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:textColor="#101010"
|
||||
android:textSize="11sp"
|
||||
android:hint="请输入经度"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:textColor="#101010"
|
||||
android:textSize="12sp"
|
||||
android:text="经度坐标:"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_lat"
|
||||
android:padding="6dp"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:textColor="#101010"
|
||||
android:textSize="11sp"
|
||||
android:hint="请输入纬度"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:textColor="#101010"
|
||||
android:textSize="12sp"
|
||||
android:text="高度(m):"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:padding="6dp"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:textColor="#101010"
|
||||
android:textSize="11sp"
|
||||
android:hint="请输入高度"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:textColor="#101010"
|
||||
android:textSize="12sp"
|
||||
android:text="速度(m/s):"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<EditText
|
||||
android:padding="6dp"
|
||||
android:background="@drawable/ffffffff_4round_bg"
|
||||
android:textColor="#101010"
|
||||
android:textSize="11sp"
|
||||
android:hint="飞行速度"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<com.example.longyi_groundstation.Main.View.SlideToUnlockView
|
||||
android:background="#ffffff"
|
||||
android:id="@+id/unlockView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:layout_margin="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="#C3606060"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@ -30,7 +30,7 @@
|
||||
<TextView
|
||||
android:textColor="#052011"
|
||||
android:textSize="12sp"
|
||||
android:text=" 当前点位已经上传完毕是否开始执行? 滑动后即可执行航线任务"
|
||||
android:text=" 请先解锁飞机,确保工作正常后,即可滑动执行航线。"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_protect"
|
||||
android:background="@drawable/ff60b964_4round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_4round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
@ -151,7 +151,13 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.example.longyi_groundstation.Main.View.SlideToUnlockView
|
||||
android:background="#ffffff"
|
||||
android:id="@+id/unlockView_unlock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"/>
|
||||
|
||||
<com.example.longyi_groundstation.Main.View.SlideToUnlockView
|
||||
android:background="#ffffff"
|
||||
@ -160,6 +166,32 @@
|
||||
android:layout_height="35dp"
|
||||
android:layout_margin="8dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginBottom="2dp"
|
||||
android:id="@+id/tv_start_countdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:text="执行倒计时 5"
|
||||
android:textColor="#606060"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginBottom="20dp"
|
||||
android:id="@+id/tv_start_cancel"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/ffdf4b40_4round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="取消执行"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_message"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#112446"
|
||||
android:background="#202020"
|
||||
android:orientation="vertical"
|
||||
tools:context=".Main.Setting.Fragment.MotorFragment">
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
android:textSize="10sp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_margin="6dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:textColor="#ffffff"
|
||||
android:id="@+id/tv_calibration"
|
||||
android:gravity="center"
|
||||
@ -21,7 +21,7 @@
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:background="@drawable/ff112446_4round_bg"
|
||||
android:background="#202020"
|
||||
android:id="@+id/rv_data"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginRight="6dp"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#112446"
|
||||
android:background="#101010"
|
||||
android:padding="8dp"
|
||||
android:orientation="horizontal"
|
||||
tools:context=".Main.Setting.Fragment.MotorFragment">
|
||||
@ -32,7 +32,7 @@
|
||||
android:layout_marginRight="20dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:textSize="10sp"
|
||||
android:text="恢复默认"
|
||||
android:paddingLeft="20dp"
|
||||
@ -45,7 +45,7 @@
|
||||
android:id="@+id/tv_save"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ff60b964_4round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:textSize="10sp"
|
||||
android:text="保存"
|
||||
android:layout_width="42dp"
|
||||
@ -80,7 +80,7 @@
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
<!-- 滑动条 -->
|
||||
<SeekBar
|
||||
@ -92,8 +92,8 @@
|
||||
android:max="3500"
|
||||
android:min="20"
|
||||
android:progress="0"
|
||||
android:thumb="@drawable/custom_seekbar_thumb" />
|
||||
|
||||
/>
|
||||
|
||||
<!-- 加按钮 -->
|
||||
<TextView
|
||||
@ -104,7 +104,7 @@
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
|
||||
<TextView
|
||||
@ -145,7 +145,7 @@
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
<!-- 滑动条 -->
|
||||
<SeekBar
|
||||
@ -157,8 +157,7 @@
|
||||
android:max="500"
|
||||
android:min="50"
|
||||
android:progress="0"
|
||||
|
||||
/>
|
||||
android:thumb="@drawable/custom_seekbar_thumb" />
|
||||
|
||||
<!-- 加按钮 -->
|
||||
<TextView
|
||||
@ -169,7 +168,7 @@
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
|
||||
<TextView
|
||||
@ -210,7 +209,7 @@
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
<!-- 滑动条 -->
|
||||
<SeekBar
|
||||
@ -222,8 +221,7 @@
|
||||
android:max="500"
|
||||
android:min="0"
|
||||
android:progress="0"
|
||||
|
||||
/>
|
||||
android:thumb="@drawable/custom_seekbar_thumb" />
|
||||
|
||||
<!-- 加按钮 -->
|
||||
<TextView
|
||||
@ -234,7 +232,7 @@
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
|
||||
<TextView
|
||||
@ -276,7 +274,7 @@
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
<!-- 滑动条 -->
|
||||
<SeekBar
|
||||
@ -288,8 +286,7 @@
|
||||
android:max="8000"
|
||||
android:min="1000"
|
||||
android:progress="0"
|
||||
|
||||
/>
|
||||
android:thumb="@drawable/custom_seekbar_thumb" />
|
||||
|
||||
<!-- 加按钮 -->
|
||||
<TextView
|
||||
@ -300,7 +297,7 @@
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
|
||||
<TextView
|
||||
@ -341,7 +338,7 @@
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
<!-- 滑动条 -->
|
||||
<SeekBar
|
||||
@ -352,8 +349,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:max="3600"
|
||||
android:progress="10"
|
||||
|
||||
/>
|
||||
android:thumb="@drawable/custom_seekbar_thumb" />
|
||||
|
||||
<!-- 加按钮 -->
|
||||
<TextView
|
||||
@ -364,7 +360,7 @@
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
|
||||
<TextView
|
||||
|
||||
@ -4,38 +4,220 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#555f75"
|
||||
android:background="#101010"
|
||||
android:orientation="vertical"
|
||||
tools:context=".Main.Setting.Fragment.FoundationFragment">
|
||||
|
||||
<TextView
|
||||
android:gravity="center"
|
||||
android:text="维护中.."
|
||||
android:background="#cdcdcd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
<!-- <TextView-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:text="维护中.."-->
|
||||
<!-- android:background="#cdcdcd"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"/>-->
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:id="@+id/tab_layout"
|
||||
<RelativeLayout
|
||||
android:layout_margin="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="26dp"
|
||||
android:background="#555f75"
|
||||
app:tabIndicatorHeight="0dp"
|
||||
app:tabRippleColor="@null"
|
||||
app:tabBackground="@drawable/tab_background_selector"
|
||||
app:tabTextColor="@drawable/tab_text_color_selector"
|
||||
app:tabTextAppearance="@style/CustomTabTextAppearance"
|
||||
android:contentDescription="载荷选择" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:background="@drawable/ff112446_4round_bg"
|
||||
android:layout_margin="6dp"
|
||||
android:id="@+id/view_pager"
|
||||
<TextView
|
||||
android:textStyle="bold"
|
||||
android:gravity="right"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textSize="11sp"
|
||||
android:text="模式切换按钮配置:"
|
||||
android:textColor="#ffffff"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_save"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:text="保存"
|
||||
android:padding="5dp"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:paddingLeft="12dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_centerVertical="true"
|
||||
android:id="@+id/tv_low_end"
|
||||
android:textSize="10sp"
|
||||
android:text="低档(0——1360)"
|
||||
android:textColor="#ffffff"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_toRightOf="@+id/tv_low_end"
|
||||
android:id="@+id/rl_low_end"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_low_end_text"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:text="姿态"
|
||||
android:layout_width="80dp"
|
||||
android:padding="5dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:src="@mipmap/icon_spinner_dowm"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/sp_low_end"
|
||||
android:layout_alignLeft="@+id/rl_low_end"
|
||||
android:layout_below="@+id/rl_low_end"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_centerVertical="true"
|
||||
android:id="@+id/tv_mid_range"
|
||||
android:textSize="10sp"
|
||||
android:text="中档(1361-1620)"
|
||||
android:textColor="#ffffff"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_toRightOf="@+id/tv_mid_range"
|
||||
android:id="@+id/rl_mid_range"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mid_range_text"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:text="姿态"
|
||||
android:layout_width="80dp"
|
||||
android:padding="5dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:src="@mipmap/icon_spinner_dowm"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/sp_mid_range"
|
||||
android:layout_alignLeft="@+id/rl_mid_range"
|
||||
android:layout_below="@+id/rl_mid_range"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_centerVertical="true"
|
||||
android:id="@+id/tv_high_end"
|
||||
android:textSize="10sp"
|
||||
android:text="高档(1620-1750+)"
|
||||
android:textColor="#ffffff"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_toRightOf="@+id/tv_high_end"
|
||||
android:id="@+id/rl_high_end"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_high_end_text"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:text="姿态"
|
||||
android:layout_width="80dp"
|
||||
android:padding="5dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:src="@mipmap/icon_spinner_dowm"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/sp_high_end"
|
||||
android:layout_alignLeft="@+id/rl_high_end"
|
||||
android:layout_below="@+id/rl_high_end"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#ff112446"
|
||||
android:background="#101010"
|
||||
android:orientation="vertical"
|
||||
tools:context=".Main.Setting.Fragment.LoadFragment">
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
android:textSize="10sp"
|
||||
android:id="@+id/tv_save"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ff60b964_4round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_4round_1stroke_bg"
|
||||
android:padding="5dp"
|
||||
android:gravity="center"
|
||||
android:text="保存"
|
||||
@ -134,7 +134,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -154,7 +154,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -187,7 +187,7 @@
|
||||
android:id="@+id/tv_value_minus_m7"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -213,7 +213,7 @@
|
||||
android:id="@+id/tv_value_add_m7"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -234,7 +234,7 @@
|
||||
android:id="@+id/tv_off_minus_m7"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -260,7 +260,7 @@
|
||||
android:id="@+id/tv_off_add_m7"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -294,7 +294,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -314,7 +314,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -347,7 +347,7 @@
|
||||
android:id="@+id/tv_value_minus_m8"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -373,7 +373,7 @@
|
||||
android:id="@+id/tv_value_add_m8"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -394,7 +394,7 @@
|
||||
android:id="@+id/tv_off_minus_m8"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -420,7 +420,7 @@
|
||||
android:id="@+id/tv_off_add_m8"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -454,7 +454,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -474,7 +474,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -507,7 +507,7 @@
|
||||
android:id="@+id/tv_value_minus_m9"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -533,7 +533,7 @@
|
||||
android:id="@+id/tv_value_add_m9"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -554,7 +554,7 @@
|
||||
android:id="@+id/tv_off_minus_m9"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -580,7 +580,7 @@
|
||||
android:id="@+id/tv_off_add_m9"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -614,7 +614,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -634,7 +634,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -667,7 +667,7 @@
|
||||
android:id="@+id/tv_value_minus_m10"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -693,7 +693,7 @@
|
||||
android:id="@+id/tv_value_add_m10"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -714,7 +714,7 @@
|
||||
android:id="@+id/tv_off_minus_m10"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -740,7 +740,7 @@
|
||||
android:id="@+id/tv_off_add_m10"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -853,7 +853,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -873,7 +873,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -906,7 +906,7 @@
|
||||
android:id="@+id/tv_value_minus_m11"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -932,7 +932,7 @@
|
||||
android:id="@+id/tv_value_add_m11"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -953,7 +953,7 @@
|
||||
android:id="@+id/tv_off_minus_m11"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -979,7 +979,7 @@
|
||||
android:id="@+id/tv_off_add_m11"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -1092,7 +1092,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -1112,7 +1112,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -1145,7 +1145,7 @@
|
||||
android:id="@+id/tv_value_minus_m12"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -1171,7 +1171,7 @@
|
||||
android:id="@+id/tv_value_add_m12"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -1192,7 +1192,7 @@
|
||||
android:id="@+id/tv_off_minus_m12"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -1218,7 +1218,7 @@
|
||||
android:id="@+id/tv_off_add_m12"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -1329,7 +1329,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -1349,7 +1349,7 @@
|
||||
android:layout_height="22dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -1382,7 +1382,7 @@
|
||||
android:id="@+id/tv_value_minus_m13"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -1408,7 +1408,7 @@
|
||||
android:id="@+id/tv_value_add_m13"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
@ -1429,7 +1429,7 @@
|
||||
android:id="@+id/tv_off_minus_m13"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
@ -1455,7 +1455,7 @@
|
||||
android:id="@+id/tv_off_add_m13"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
<!-- 滑动条 -->
|
||||
<SeekBar
|
||||
@ -95,7 +95,7 @@
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
|
||||
<TextView
|
||||
@ -135,7 +135,7 @@
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
<!-- 滑动条 -->
|
||||
<SeekBar
|
||||
@ -157,7 +157,7 @@
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
|
||||
<TextView
|
||||
@ -203,7 +203,7 @@
|
||||
android:textSize="10sp"
|
||||
android:id="@+id/tv_all_test1"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ff60b964_4round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_4round_1stroke_bg"
|
||||
android:padding="5dp"
|
||||
android:gravity="center"
|
||||
android:text="全部旋转"
|
||||
@ -218,7 +218,7 @@
|
||||
android:textSize="10sp"
|
||||
android:id="@+id/tv_all_test2"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ffdd635a_4round_1stroke_bg"
|
||||
android:background="@drawable/ffdf4b40_4round_1stroke_bg"
|
||||
android:padding="5dp"
|
||||
android:gravity="center"
|
||||
android:text="顺序旋转"
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_all_select"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
android:id="@+id/tv_add"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ff60b964_4round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_4round_1stroke_bg"
|
||||
android:textSize="10sp"
|
||||
android:text="+ 增加"
|
||||
android:layout_width="42dp"
|
||||
@ -56,7 +56,7 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:background="@drawable/ffdd635a_4round_1stroke_bg"
|
||||
android:background="@drawable/ffdf4b40_4round_1stroke_bg"
|
||||
android:textSize="10sp"
|
||||
android:text="- 删除"
|
||||
android:layout_width="42dp"
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="6dp"
|
||||
android:background="#112446"
|
||||
android:background="#101010"
|
||||
tools:context=".Main.Setting.Fragment.SecureFragment">
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
android:layout_height="1.5dp"/>
|
||||
|
||||
<TextView
|
||||
android:background="@drawable/ff112446_4round_bg"
|
||||
android:background="#101010"
|
||||
android:gravity="center"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_margin="6dp"
|
||||
@ -76,7 +76,7 @@
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
<!-- 滑动条 -->
|
||||
<SeekBar
|
||||
@ -99,7 +99,7 @@
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
|
||||
<TextView
|
||||
@ -138,7 +138,7 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:id="@+id/tv_one_power_protect"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
@ -201,7 +201,7 @@
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
<!-- 滑动条 -->
|
||||
<SeekBar
|
||||
@ -223,7 +223,7 @@
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
|
||||
<TextView
|
||||
@ -264,7 +264,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_two_power_protect"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
@ -314,7 +314,7 @@
|
||||
android:layout_height="1.5dp"/>
|
||||
|
||||
<TextView
|
||||
android:background="@drawable/ff112446_4round_bg"
|
||||
android:background="#101010"
|
||||
android:gravity="center"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_margin="6dp"
|
||||
@ -360,7 +360,7 @@
|
||||
android:text="-"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_link"
|
||||
@ -385,7 +385,7 @@
|
||||
android:text="+"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"/>
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"/>
|
||||
|
||||
|
||||
<TextView
|
||||
@ -424,7 +424,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_link_protect"
|
||||
android:background="@drawable/ff62a7f0_2round_1stroke_bg"
|
||||
android:background="@drawable/ff029a45_2round_1stroke_bg"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#555f75"
|
||||
android:background="#101010"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
|
||||
BIN
app/src/main/res/mipmap-xhdpi/icon_expand.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_select_link_no.png
Normal file
|
After Width: | Height: | Size: 360 B |
BIN
app/src/main/res/mipmap-xhdpi/icon_select_link_yes.png
Normal file
|
After Width: | Height: | Size: 607 B |