修改上传接口
This commit is contained in:
parent
4d6212e6d0
commit
fc11ad05f4
@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.2'
|
||||
// ndkVersion '23.0.7123448'
|
||||
ndkVersion '23.0.7123448'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.navinfo.outdoor"
|
||||
|
@ -80,6 +80,7 @@ import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import static com.navinfo.outdoor.R.drawable.*;
|
||||
import static com.tencent.tencentmap.mapsdk.maps.model.MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE;
|
||||
|
||||
|
||||
@ -141,7 +142,8 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) { // 开始采集,设置按钮文字内容为“结束采集”
|
||||
captureVideo.setText("暂停采集");
|
||||
stopVideo.setEnabled(false); // 开始采集视频后,禁用停止采集的按钮,必须暂停采集后才可点击停止采集
|
||||
stopVideo.setEnabled(false);// 开始采集视频后,禁用停止采集的按钮,必须暂停采集后才可点击停止采集
|
||||
stopVideo.setBackgroundColor(R.drawable.main_shape_outlogin);
|
||||
startTakenVideo(); // 开始采集视频
|
||||
|
||||
/**
|
||||
@ -154,10 +156,16 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
// 开始采集,每隔2秒实时记录位置信息、视频时间以及设备时间
|
||||
timer.schedule(timerTask, 0, period*1000);
|
||||
} else {
|
||||
timerTask.cancel();
|
||||
stopVideo.setEnabled(true);
|
||||
captureVideo.setText("开始采集");
|
||||
stopTakenVideo();
|
||||
if (timerTask!=null){
|
||||
timerTask.cancel();
|
||||
stopVideo.setEnabled(true);
|
||||
stopVideo.setBackgroundColor(R.drawable.btn_end_shape);
|
||||
captureVideo.setText("开始采集");
|
||||
stopTakenVideo();
|
||||
}else {
|
||||
Toast.makeText(PictureActivity.this, "请先拍照", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -315,11 +323,15 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
if (camera.isTakingVideo()) {
|
||||
camera.stopVideo();
|
||||
}
|
||||
timerTask.cancel();
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(Constant.INTENT_VIDEO_PATH, finalVideoPath);
|
||||
setResult(0x101, intent);
|
||||
this.finish();
|
||||
if (timerTask!=null){
|
||||
timerTask.cancel();
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(Constant.INTENT_VIDEO_PATH, finalVideoPath);
|
||||
setResult(0x101, intent);
|
||||
this.finish();
|
||||
}else {
|
||||
Toast.makeText(this, "请先录视频", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
@ -382,7 +394,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
locationStyle = new MyLocationStyle();
|
||||
locationStyle = locationStyle.myLocationType(LOCATION_TYPE_LOCATION_ROTATE);
|
||||
//创建图标
|
||||
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(getBitMap(R.drawable.location));
|
||||
BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(getBitMap(location));
|
||||
locationStyle.icon(bitmapDescriptor);
|
||||
//设置定位圆形区域的边框宽度;
|
||||
locationStyle.fillColor(getResources().getColor(android.R.color.transparent));
|
||||
@ -391,32 +403,35 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
||||
}
|
||||
|
||||
public void btnSwich() {
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||
System.out.println("width-display :" + dm.widthPixels);
|
||||
System.out.println("heigth-display :" + dm.heightPixels);
|
||||
ViewGroup.LayoutParams layoutParams = ivMap.getLayoutParams();//地图的宽高
|
||||
int height = layoutParams.height;
|
||||
int width = layoutParams.width;
|
||||
ViewGroup.LayoutParams layoutParams1 = camera.getLayoutParams();//相机的宽高
|
||||
int height1 = layoutParams1.height;
|
||||
int width1 = layoutParams1.width;
|
||||
if (width > width1) {
|
||||
ivPic.setVisibility(View.GONE);
|
||||
layoutParams1.width = dm.widthPixels;
|
||||
layoutParams1.height = dm.heightPixels;
|
||||
layoutParams.height = height1;
|
||||
layoutParams.width = width1;
|
||||
camera.setLayoutParams(layoutParams1);
|
||||
ivMap.setLayoutParams(layoutParams);
|
||||
} else {
|
||||
layoutParams.height = dm.heightPixels;
|
||||
layoutParams.width = dm.widthPixels;
|
||||
layoutParams1.height = height;
|
||||
layoutParams1.width = width;
|
||||
camera.setLayoutParams(layoutParams);
|
||||
ivMap.setLayoutParams(layoutParams1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// DisplayMetrics dm = new DisplayMetrics();
|
||||
// getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||
// System.out.println("width-display :" + dm.widthPixels);
|
||||
// System.out.println("heigth-display :" + dm.heightPixels);
|
||||
// ViewGroup.LayoutParams layoutParams = ivMap.getLayoutParams();//地图的宽高
|
||||
// int height = layoutParams.height;
|
||||
// int width = layoutParams.width;
|
||||
// ViewGroup.LayoutParams layoutParams1 = camera.getLayoutParams();//相机的宽高
|
||||
// int height1 = layoutParams1.height;
|
||||
// int width1 = layoutParams1.width;
|
||||
// if (width > width1) {
|
||||
// ivPic.setVisibility(View.GONE);
|
||||
// layoutParams1.width = dm.widthPixels;
|
||||
// layoutParams1.height = dm.heightPixels;
|
||||
// layoutParams.height = height1;
|
||||
// layoutParams.width = width1;
|
||||
// camera.setLayoutParams(layoutParams1);
|
||||
// ivMap.setLayoutParams(layoutParams);
|
||||
// } else {
|
||||
// layoutParams.height = dm.heightPixels;
|
||||
// layoutParams.width = dm.widthPixels;
|
||||
// layoutParams1.height = height;
|
||||
// layoutParams1.width = width;
|
||||
// camera.setLayoutParams(layoutParams);
|
||||
// ivMap.setLayoutParams(layoutParams1);
|
||||
// }
|
||||
}
|
||||
@Override
|
||||
protected void onResume() {
|
||||
|
@ -16,20 +16,13 @@ import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.google.gson.Gson;
|
||||
@ -41,14 +34,10 @@ import com.kongzue.dialog.util.BaseDialog;
|
||||
import com.kongzue.dialog.util.DialogSettings;
|
||||
import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.adapter.PoiRecycleAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.bean.PoiBean;
|
||||
import com.navinfo.outdoor.room.ChargingPileDao;
|
||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||
import com.navinfo.outdoor.room.PoiDao;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.Geohash;
|
||||
@ -59,10 +48,7 @@ import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
|
@ -47,7 +47,6 @@ import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.bean.ChargingStationBean;
|
||||
import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.bean.PoiBean;
|
||||
import com.navinfo.outdoor.bean.PoiSaveBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
@ -58,14 +57,12 @@ import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.Geohash;
|
||||
import com.navinfo.outdoor.util.PhotoPathUtil;
|
||||
import com.sothree.slidinguppanel.SlidingUpPanelLayout;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
|
@ -3,7 +3,6 @@ package com.navinfo.outdoor.fragment;
|
||||
import android.app.Dialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@ -38,8 +37,6 @@ import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.util.GetJsonDataUtil;
|
||||
import com.navinfo.outdoor.util.PhotoPathUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.json.JSONArray;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -15,15 +15,12 @@ import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
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 android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.slidingpanelayout.widget.SlidingPaneLayout;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.google.gson.Gson;
|
||||
@ -41,9 +38,7 @@ import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.bean.NameAuthenticationBean;
|
||||
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||
import com.navinfo.outdoor.bean.PoiBean;
|
||||
import com.navinfo.outdoor.bean.PoiSaveBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.DialogCallback;
|
||||
|
@ -15,7 +15,6 @@ import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
@ -30,16 +29,13 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.hjq.permissions.OnPermissionCallback;
|
||||
import com.hjq.permissions.Permission;
|
||||
import com.hjq.permissions.XXPermissions;
|
||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||
import com.kongzue.dialog.interfaces.OnDismissListener;
|
||||
import com.kongzue.dialog.util.BaseDialog;
|
||||
import com.kongzue.dialog.util.DialogSettings;
|
||||
import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.kongzue.dialog.v3.ShareDialog;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.lzy.okgo.model.Response;
|
||||
@ -48,7 +44,6 @@ import com.navinfo.outdoor.adapter.PoiRecycleAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.bean.NameAuthenticationBean;
|
||||
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||
import com.navinfo.outdoor.bean.PoiBean;
|
||||
import com.navinfo.outdoor.bean.PoiSaveBean;
|
||||
@ -66,20 +61,13 @@ import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
|
||||
@ -467,7 +455,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
@ -738,7 +725,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
});
|
||||
} else {
|
||||
takePhotoPath1 = PhotoPathUtil.getTakePhotoPath(data, "a");
|
||||
takePhotoPath1 = PhotoPathUtil.getTakePhotoPath(data,"a");
|
||||
ivPanorama.setTag(takePhotoPath1);
|
||||
ivPanorama.setImageBitmap(bitmap);//显示图像
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.github.lazylibrary.util.FileUtils;
|
||||
import com.github.lazylibrary.util.ZipUtil;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.permissions.OnPermissionCallback;
|
||||
@ -51,10 +52,13 @@ import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.DialogCallback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
import com.navinfo.outdoor.room.InsertAndUpdateUtils;
|
||||
import com.navinfo.outdoor.room.PoiDao;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||
import com.navinfo.outdoor.util.GeometryTools;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
@ -328,7 +332,20 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
if (ivPoiVideoPicture.getTag() != null) {
|
||||
File videoFile = (File) ivPoiVideoPicture.getTag();
|
||||
String path = videoFile.getPath()+".txt";
|
||||
poiEntity.setPhoto(videoFile.getAbsolutePath());
|
||||
List<String> strings = FileUtils.readFileToList(path, "utf-8");
|
||||
ArrayList<LatLng> latLngs = new ArrayList<>();
|
||||
for (int i = 0; i < strings.size(); i++) {
|
||||
String[] split = strings.get(i).split(",");
|
||||
LatLng latLng = new LatLng();
|
||||
latLng.setLatitude(Double.valueOf(split[2]));
|
||||
latLng.setLongitude(Double.valueOf(split[3]));
|
||||
latLngs.add(latLng);
|
||||
}
|
||||
String lineString = GeometryTools.getLineString(latLngs);
|
||||
Log.d("TAG", "onGranted: "+lineString);
|
||||
poiEntity.setGeoWkt(lineString);
|
||||
}
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
@ -341,7 +358,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiDao.insertPoiEntity(poiEntity);
|
||||
//
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -375,49 +393,42 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
break;
|
||||
|
||||
case R.id.road_upload:
|
||||
ArrayList<File> files = new ArrayList<>();
|
||||
ArrayList<File> videoFileList = new ArrayList<>();
|
||||
if (videoFile != null) {
|
||||
files.add(videoFile);
|
||||
videoFileList.add(videoFile);
|
||||
}
|
||||
File file = new File(Constant.PICTURE_FOLDER, "files" + ".zip");
|
||||
ZipUtil.zipFiles(files, file, new ZipUtil.ZipListener() {
|
||||
@Override
|
||||
public void zipProgress(int zipProgress) {
|
||||
if (zipProgress == 100) {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
poiVideoUpload();
|
||||
File fileZip = new File(Constant.PICTURE_FOLDER, "files" + ".zip");
|
||||
ZipUtil.zipFiles(videoFileList, fileZip, null);
|
||||
poiVideoUpload(poiVideoBody,videoFileList);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void poiVideoUpload() {
|
||||
// OkGo
|
||||
// // 请求方式和请求url
|
||||
// .<OtherUploadPicBean>post(HttpInterface.POI_VIDEO_UPLOAD_PIC)
|
||||
// // 请求的 tag, 主要用于取消对应的请求
|
||||
// .params("auditId", )
|
||||
// .addFileParams("file",)
|
||||
// .tag(this)
|
||||
// .execute(new DialogCallback<OtherUploadPicBean>(OtherUploadPicBean.class) {
|
||||
// @Override
|
||||
// public void onSuccess(Response<OtherUploadPicBean> otherUploadPicBeanResponse) {
|
||||
// dismissLoadingDialog();
|
||||
// Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
||||
// Log.d("TAG", "onSuccess: " + otherUploadPicBeanResponse.toString() + "sssssssssssss");
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(Response<OtherUploadPicBean> response) {
|
||||
// super.onError(response);
|
||||
// dismissLoadingDialog();
|
||||
// Toast.makeText(getActivity(), response.code()+"", Toast.LENGTH_SHORT).show();
|
||||
// Log.d("TAG", "onError: " + response.code()+"");
|
||||
// }
|
||||
// });
|
||||
private void poiVideoUpload(Integer poiVideoBody, ArrayList<File> videoFileList) {
|
||||
OkGo
|
||||
// 请求方式和请求url
|
||||
.<OtherUploadPicBean>post(HttpInterface.POI_VIDEO_UPLOAD_PIC)
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
.params("auditId",poiVideoBody )
|
||||
.addFileParams("file",videoFileList)
|
||||
.tag(this)
|
||||
.execute(new DialogCallback<OtherUploadPicBean>(OtherUploadPicBean.class) {
|
||||
@Override
|
||||
public void onSuccess(Response<OtherUploadPicBean> otherUploadPicBeanResponse) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onSuccess: " + otherUploadPicBeanResponse.toString() + "sssssssssssss");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<OtherUploadPicBean> response) {
|
||||
super.onError(response);
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), response.code()+"", Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + response.code()+"");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void poiVideoSave(PoiEntity poiEntity) {
|
||||
@ -432,12 +443,19 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
public void onSuccess(PoiVideoBean poiVideoBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
poiVideoBody = poiVideoBean.getBody();
|
||||
poiEntity.setTaskStatus(3);
|
||||
poiEntity.setBodyId(poiVideoBody);
|
||||
poiEntity.setTaskStatus(3);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiDao.insertPoiEntity(poiEntity);
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onSuccess: " + poiVideoBean.getBody());
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||
|
@ -26,6 +26,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.github.lazylibrary.util.FileUtils;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.permissions.OnPermissionCallback;
|
||||
import com.hjq.permissions.Permission;
|
||||
@ -36,11 +37,18 @@ import com.navinfo.outdoor.activity.PicturesActivity;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||
import com.navinfo.outdoor.bean.PoiBean;
|
||||
import com.navinfo.outdoor.bean.PoiVideoBean;
|
||||
import com.navinfo.outdoor.bean.RoadExtend;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
import com.navinfo.outdoor.room.InsertAndUpdateUtils;
|
||||
import com.navinfo.outdoor.room.PoiDao;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||
import com.navinfo.outdoor.util.GeometryTools;
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.json.JSONArray;
|
||||
@ -50,6 +58,7 @@ import org.json.JSONObject;
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -76,6 +85,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
private ImageView ivRoadFinal;
|
||||
private RelativeLayout linearExist;
|
||||
String[] spinner = new String[]{"存在","不存在","无法验证"};
|
||||
private int body;
|
||||
|
||||
public static RoadFragment newInstance(Bundle bundle) {
|
||||
RoadFragment fragment = new RoadFragment();
|
||||
@ -292,6 +302,20 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
if (ivRoadPicture.getTag()!=null) {
|
||||
File videoFile = (File) ivRoadPicture.getTag();
|
||||
poiEntity.setPhoto(videoFile.getAbsolutePath());
|
||||
String path = videoFile.getPath()+".txt";
|
||||
poiEntity.setPhoto(videoFile.getAbsolutePath());
|
||||
List<String> strings = FileUtils.readFileToList(path, "utf-8");
|
||||
ArrayList<LatLng> latLngs = new ArrayList<>();
|
||||
for (int i = 0; i < strings.size(); i++) {
|
||||
String[] split = strings.get(i).split(",");
|
||||
LatLng latLng = new LatLng();
|
||||
latLng.setLatitude(Double.valueOf(split[2]));
|
||||
latLng.setLongitude(Double.valueOf(split[3]));
|
||||
latLngs.add(latLng);
|
||||
}
|
||||
String lineString = GeometryTools.getLineString(latLngs);
|
||||
Log.d("TAG", "onGranted: "+lineString);
|
||||
poiEntity.setGeoWkt(lineString);
|
||||
}
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
@ -304,13 +328,16 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (showPoiEntity != null) {
|
||||
poiDao.updatePoiEntity(poiEntity);
|
||||
}
|
||||
poiDao.insertPoiEntity(poiEntity);
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiVideoSave(poiEntity);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
onBackPressed();
|
||||
//onBackPressed();
|
||||
}
|
||||
}
|
||||
|
||||
@ -337,6 +364,49 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void poiVideoSave(PoiEntity poiEntity) {
|
||||
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(HttpInterface.INSIDE_API_LIST)
|
||||
.method(OkGoBuilder.GET)
|
||||
.cls(PoiVideoBean.class)
|
||||
.callback(new Callback<PoiVideoBean>() {
|
||||
@Override
|
||||
public void onSuccess(PoiVideoBean poiVideoBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
body = poiVideoBean.getBody();
|
||||
body = poiVideoBean.getBody();
|
||||
poiEntity.setBodyId(body);
|
||||
poiEntity.setTaskStatus(3);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onSuccess: " + poiVideoBean.getBody());
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
}).build();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
@ -3,7 +3,6 @@ package com.navinfo.outdoor.fragment;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@ -20,16 +19,12 @@ import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.bean.NameAuthenticationBean;
|
||||
import com.navinfo.outdoor.http.DialogCallback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.util.PhotoPathUtil;
|
||||
import com.umeng.commonsdk.debug.I;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
@ -5,7 +5,6 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
|
||||
@ -14,14 +13,13 @@ import java.io.FileOutputStream;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 获取图片的真实路径
|
||||
*/
|
||||
public class PhotoPathUtil {
|
||||
|
||||
public static String getTakePhotoPath(Intent data,String d) {
|
||||
public static String getTakePhotoPath(Intent data, String d) {
|
||||
Bitmap photo = null;
|
||||
Uri uri = data.getData();
|
||||
if (uri != null) {
|
||||
@ -43,7 +41,7 @@ public class PhotoPathUtil {
|
||||
calendar.setTimeInMillis(System.currentTimeMillis());
|
||||
String format = formatter.format(calendar.getTime());
|
||||
//文件
|
||||
File file = new File(Constant.PICTURE_FOLDER, d+format + ".jpg");
|
||||
File file = new File(Constant.PICTURE_FOLDER, d + format + ".jpg");//D(类型代号)+pid+拍摄时间+_p加密坐标_ax(x=0/90/180/270).jpg
|
||||
/***打开文件输出流*/
|
||||
fileOutputStream = new FileOutputStream(file);
|
||||
// 生成图片文件
|
||||
|
5
app/src/main/res/drawable/btn_end_shape.xml
Normal file
5
app/src/main/res/drawable/btn_end_shape.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="50dp"/>
|
||||
<solid android:color="@color/white"/>
|
||||
</shape>
|
@ -5,25 +5,25 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FF444444">
|
||||
|
||||
<com.otaliastudios.cameraview.CameraView
|
||||
android:id="@+id/camera"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:keepScreenOn="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.tencent.tencentmap.mapsdk.maps.TextureMapView
|
||||
android:id="@+id/iv_map"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintWidth_percent="0.4"
|
||||
app:layout_constraintWidth_default="percent"
|
||||
app:layout_constraintHeight_percent="0.4"
|
||||
app:layout_constraintHeight_default="percent"
|
||||
app:layout_constraintHeight_percent="0.4"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_default="percent"
|
||||
app:layout_constraintWidth_percent="0.4" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_switch"
|
||||
@ -32,17 +32,17 @@
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:text="切换"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_switch"
|
||||
app:layout_constraintRight_toRightOf="@id/btn_switch"
|
||||
android:id="@+id/btn_video"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="停止" />
|
||||
android:text="停止"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="@id/btn_switch"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_switch" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pic"
|
||||
@ -57,27 +57,28 @@
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/capuretVideo"
|
||||
style="@style/user_data_style"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="开始采集"
|
||||
app:layout_constraintRight_toLeftOf="@id/btn_stop_video"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@drawable/user_style"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/fab_margin"
|
||||
style="@style/user_data_style"/>
|
||||
android:text="开始采集"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/btn_stop_video" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_stop_video"
|
||||
app:layout_constraintBottom_toBottomOf="@id/capuretVideo"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="结束采集"
|
||||
app:layout_constraintLeft_toRightOf="@id/capuretVideo"
|
||||
android:background="@drawable/uploding_shape"
|
||||
android:textColor="@color/colorBlue"/>
|
||||
android:text="结束采集"
|
||||
android:textColor="@color/colorBlue"
|
||||
app:layout_constraintBottom_toBottomOf="@id/capuretVideo"
|
||||
app:layout_constraintLeft_toRightOf="@id/capuretVideo"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
@ -1,9 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:context=".fragment.RoadFragment">
|
||||
|
||||
|
||||
@ -14,7 +18,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_message"
|
||||
@ -54,74 +58,71 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@null" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="02.拍照方式"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_name"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ll_name"
|
||||
android:layout_marginTop="10dp"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_name" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_mode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_mode">
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_type"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_height="wrap_content">
|
||||
<RadioButton
|
||||
android:id="@+id/rb_car"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="车行"/>
|
||||
<RadioButton
|
||||
android:id="@+id/rb_bicycle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="自行车"/>
|
||||
<RadioButton
|
||||
android:id="@+id/rb_walking"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="步行"/>
|
||||
<RadioButton
|
||||
android:id="@+id/rb_manual"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="手动"/>
|
||||
</RadioGroup>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_car"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="车行" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_bicycle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="自行车" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_walking"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="步行" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_manual"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="手动" />
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
<!--<LinearLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/ll_name"-->
|
||||
<!-- android:orientation="horizontal">-->
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="02.拍照方式"-->
|
||||
<!-- -->
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_pictures"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginLeft="10dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ll_mode"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_mode">
|
||||
|
||||
@ -142,16 +143,6 @@
|
||||
android:text="拍照"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<!-- <EditText-->
|
||||
<!-- android:id="@+id/et_height"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="10dp"-->
|
||||
<!-- android:hint="请输入高度"-->
|
||||
<!-- android:inputType="number" />-->
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
@ -159,15 +150,9 @@
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bg_01"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ll_pictures"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_pictures" />
|
||||
<!--<androidx.recyclerview.widget.RecyclerView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:id="@+id/rel_road"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/ll_pictures"/>-->
|
||||
<!-- -->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_desc"
|
||||
android:layout_width="match_parent"
|
||||
@ -175,6 +160,7 @@
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintLeft_toLeftOf="@id/iv_road_picture"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_road_picture">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/linear_exist"
|
||||
android:layout_width="match_parent"
|
||||
@ -219,6 +205,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/ic_baseline_arrow_drop" />
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -266,4 +253,4 @@
|
||||
android:text="上传" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
@ -104,17 +104,6 @@
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
<!--<LinearLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/ll_name"-->
|
||||
<!-- android:orientation="horizontal">-->
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:text="02.拍照方式"-->
|
||||
<!-- -->
|
||||
<!--</LinearLayout>-->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_pictures"
|
||||
android:layout_width="wrap_content"
|
||||
@ -143,14 +132,6 @@
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<!-- <EditText-->
|
||||
<!-- android:id="@+id/et_height"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginLeft="10dp"-->
|
||||
<!-- android:hint="请输入高度"-->
|
||||
<!-- android:inputType="number" />-->
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -159,15 +140,8 @@
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bg_01"
|
||||
app:layout_constraintLeft_toLeftOf="@id/ll_pictures"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_pictures" />
|
||||
<!--<androidx.recyclerview.widget.RecyclerView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:id="@+id/rel_road"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@id/ll_pictures"/>-->
|
||||
<!-- -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_desc"
|
||||
android:layout_width="match_parent"
|
||||
|
71
app/src/main/res/layout/switch_map.xml
Normal file
71
app/src/main/res/layout/switch_map.xml
Normal file
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FF444444">
|
||||
|
||||
<com.tencent.tencentmap.mapsdk.maps.TextureMapView
|
||||
android:id="@+id/camera_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.otaliastudios.cameraview.CameraView
|
||||
android:id="@+id/iv_mapView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:keepScreenOn="true"
|
||||
app:layout_constraintHeight_default="percent"
|
||||
app:layout_constraintHeight_percent="0.4"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_default="percent"
|
||||
app:layout_constraintWidth_percent="0.4" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_switch2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:text="切换"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_video2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="停止"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="@id/btn_switch2"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_switch2" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/capuretVideo2"
|
||||
style="@style/user_data_style"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@drawable/user_style"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/fab_margin"
|
||||
android:text="开始采集"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/btn_stop_video2" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_stop_video2"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/uploding_shape"
|
||||
android:text="结束采集"
|
||||
android:textColor="@color/colorBlue"
|
||||
app:layout_constraintBottom_toBottomOf="@id/capuretVideo2"
|
||||
app:layout_constraintLeft_toRightOf="@id/capuretVideo2"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
x
Reference in New Issue
Block a user