修改 了待提交的删除功能,添加了log日志功能
This commit is contained in:
@@ -149,7 +149,7 @@ public class HomeActivity extends BaseActivity{
|
|||||||
String dataString = (String) data.obj;
|
String dataString = (String) data.obj;
|
||||||
if (!dataString.equals("")) {
|
if (!dataString.equals("")) {
|
||||||
Constant.isPresent=true;
|
Constant.isPresent=true;
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show(this, "提示", dataString, "确定");
|
MessageDialog.show(this, "提示", dataString, "确定");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
//必须全局才可以改变样式
|
//必须全局才可以改变样式
|
||||||
DialogSettings.style = (DialogSettings.STYLE.STYLE_KONGZUE);
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
DialogSettings.init();//初始化清空 BaseDialog 队列
|
DialogSettings.init();//初始化清空 BaseDialog 队列
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onDenied(List<String> permissions, boolean never) {
|
public void onDenied(List<String> permissions, boolean never) {
|
||||||
if (never) {
|
if (never) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show(MainActivity.this, "提示", permissions.toString() + " 被永久拒绝授权请手动授权,", "确定").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show(MainActivity.this, "提示", permissions.toString() + " 被永久拒绝授权请手动授权,", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.navinfo.outdoor.activity;
|
package com.navinfo.outdoor.activity;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
@@ -61,6 +63,7 @@ import org.greenrobot.eventbus.Subscribe;
|
|||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -80,14 +83,37 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
private CameraView cameraView;
|
private CameraView cameraView;
|
||||||
private String photo_path;
|
private String photo_path;
|
||||||
private int oration;
|
private int oration;
|
||||||
|
private File logFile;
|
||||||
|
private StringBuilder photographBuilder;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
SharedPreferences sharedPreferences = this.getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
|
if (pictures_time==null){
|
||||||
|
sharedEdit.putString("pictures_time",newFormat);
|
||||||
|
sharedEdit.commit();
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}else {
|
||||||
|
if (pictures_time.equals(newFormat)){
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||||
|
}else {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
photographBuilder = new StringBuilder();
|
||||||
|
photographBuilder.append("PhotographActivity-onCreate ,");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.capture_picture) {
|
if (v.getId() == R.id.capture_picture) {
|
||||||
|
photographBuilder.append("onClick:点击了拍摄 ,");
|
||||||
cameraView.takePicture();
|
cameraView.takePicture();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,6 +126,7 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
|
photographBuilder.append("initData, ");
|
||||||
cameraView.setMode(Mode.PICTURE);
|
cameraView.setMode(Mode.PICTURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,6 +150,7 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
if (oration!=1){
|
if (oration!=1){
|
||||||
if (Objects.requireNonNull(cameraView.getPictureSize()).getWidth() < cameraView.getPictureSize().getHeight()) {
|
if (Objects.requireNonNull(cameraView.getPictureSize()).getWidth() < cameraView.getPictureSize().getHeight()) {
|
||||||
Toast.makeText(PhotographActivity.this, "不允许竖向拍摄...", Toast.LENGTH_SHORT).show();
|
Toast.makeText(PhotographActivity.this, "不允许竖向拍摄...", Toast.LENGTH_SHORT).show();
|
||||||
|
photographBuilder.append("cameraView 用户横屏拍摄 ,");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -156,12 +184,14 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
photographBuilder.append("onResume, ");
|
||||||
cameraView.open();
|
cameraView.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
photographBuilder.append("onPause, ");
|
||||||
cameraView.close();
|
cameraView.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,6 +199,9 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
cameraView.destroy();
|
cameraView.destroy();
|
||||||
|
photographBuilder.append("onDestroy ");
|
||||||
|
photographBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), photographBuilder.toString(), true);
|
||||||
if (EventBus.getDefault().isRegistered(this)) {
|
if (EventBus.getDefault().isRegistered(this)) {
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.navinfo.outdoor.activity;
|
package com.navinfo.outdoor.activity;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
@@ -11,6 +13,7 @@ import android.os.Bundle;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@@ -68,8 +71,10 @@ import org.greenrobot.eventbus.Subscribe;
|
|||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -124,6 +129,33 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
private ImageView ivPicImage, ivPicVideoImage;
|
private ImageView ivPicImage, ivPicVideoImage;
|
||||||
private SystemTTS systemTTS;
|
private SystemTTS systemTTS;
|
||||||
private boolean isBack = false;
|
private boolean isBack = false;
|
||||||
|
private File logFile;
|
||||||
|
private StringBuilder picturesBuilder;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
SharedPreferences sharedPreferences = this.getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
|
if (pictures_time==null){
|
||||||
|
sharedEdit.putString("pictures_time",newFormat);
|
||||||
|
sharedEdit.commit();
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}else {
|
||||||
|
if (pictures_time.equals(newFormat)){
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||||
|
}else {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
picturesBuilder = new StringBuilder();
|
||||||
|
picturesBuilder.append("PicturesActivity-onCreate ,");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
@@ -135,6 +167,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
|
|
||||||
removables = new ArrayList<>();//存储轨迹的marker
|
removables = new ArrayList<>();//存储轨迹的marker
|
||||||
layerChange = findViewById(R.id.layer_change);
|
layerChange = findViewById(R.id.layer_change);
|
||||||
if (getIntent() != null) {
|
if (getIntent() != null) {
|
||||||
@@ -189,12 +222,16 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
isOration = true;
|
isOration = true;
|
||||||
if (poi_video_type != 2) {
|
if (poi_video_type != 2) {
|
||||||
capturePicture.setText("暂停采集");
|
capturePicture.setText("暂停采集");
|
||||||
|
picturesBuilder.append("capturePicture 点击了开始采集 ,");
|
||||||
|
}else {
|
||||||
|
picturesBuilder.append("capturePicture 点击了拍摄 ,");
|
||||||
}
|
}
|
||||||
startTimer();
|
startTimer();
|
||||||
} else {
|
} else {
|
||||||
isOration = false;
|
isOration = false;
|
||||||
if (poi_video_type != 2) {
|
if (poi_video_type != 2) {
|
||||||
capturePicture.setText("开始采集");
|
capturePicture.setText("开始采集");
|
||||||
|
picturesBuilder.append("capturePicture 点击了暂停采集 ,");
|
||||||
}
|
}
|
||||||
stopTimer();
|
stopTimer();
|
||||||
}
|
}
|
||||||
@@ -237,6 +274,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
if (isOration) {
|
if (isOration) {
|
||||||
if (Objects.requireNonNull(camera.getPictureSize()).getWidth() < camera.getPictureSize().getHeight()) {
|
if (Objects.requireNonNull(camera.getPictureSize()).getWidth() < camera.getPictureSize().getHeight()) {
|
||||||
Toast.makeText(PicturesActivity.this, "不允许竖向拍摄...", Toast.LENGTH_SHORT).show();
|
Toast.makeText(PicturesActivity.this, "不允许竖向拍摄...", Toast.LENGTH_SHORT).show();
|
||||||
|
picturesBuilder.append("camera 用户竖屏拍照 ,");
|
||||||
stopTimer();
|
stopTimer();
|
||||||
capturePicture.setChecked(false);
|
capturePicture.setChecked(false);
|
||||||
if (poi_video_type != 2) {
|
if (poi_video_type != 2) {
|
||||||
@@ -285,36 +323,39 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initLine() {
|
private void initLine() {
|
||||||
String geoWkt = poiEntity.getGeoWkt();
|
if (poiEntity!=null){
|
||||||
if (geoWkt != null) {
|
String geoWkt = poiEntity.getGeoWkt();
|
||||||
String geo = Geohash.getInstance().decode(geoWkt);
|
if (geoWkt != null) {
|
||||||
Geometry geometry = GeometryTools.createGeometry(geo);
|
String geo = Geohash.getInstance().decode(geoWkt);
|
||||||
if (geometry.getGeometryType().equals("LineString")) {//线
|
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||||
BitmapDescriptor bitmapLine = null;
|
if (geometry.getGeometryType().equals("LineString")) {//线
|
||||||
if (poiEntity.getType() == 3) {//poi录像
|
BitmapDescriptor bitmapLine = null;
|
||||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
|
if (poiEntity.getType() == 3) {//poi录像
|
||||||
} else if (poiEntity.getType() == 4) {//道路录像
|
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
|
||||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
} else if (poiEntity.getType() == 4) {//道路录像
|
||||||
}
|
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
}
|
||||||
|
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
||||||
|
|
||||||
// 构造 PolylineOnions
|
// 构造 PolylineOnions
|
||||||
PolylineOptions polylineOptions
|
PolylineOptions polylineOptions
|
||||||
= new PolylineOptions().addAll(latLineString)
|
= new PolylineOptions().addAll(latLineString)
|
||||||
// 折线设置圆形线头
|
// 折线设置圆形线头
|
||||||
.lineCap(true)
|
.lineCap(true)
|
||||||
// 折线的颜色为绿色
|
// 折线的颜色为绿色
|
||||||
.color(Color.parseColor("#0096FF"))
|
.color(Color.parseColor("#0096FF"))
|
||||||
// 折线宽度为5像素
|
// 折线宽度为5像素
|
||||||
.width(20)
|
.width(20)
|
||||||
.arrow(true)
|
.arrow(true)
|
||||||
.arrowSpacing(150)
|
.arrowSpacing(150)
|
||||||
.arrowTexture(bitmapLine);
|
.arrowTexture(bitmapLine);
|
||||||
// 绘制折线
|
// 绘制折线
|
||||||
polyline = tencentMap.addPolyline(polylineOptions);
|
polyline = tencentMap.addPolyline(polylineOptions);
|
||||||
polyline.setZIndex(2);
|
polyline.setZIndex(2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -330,6 +371,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
if (isOration) {
|
if (isOration) {
|
||||||
stopTimer();
|
stopTimer();
|
||||||
}
|
}
|
||||||
|
picturesBuilder.append("onClick 点击了结束采集 ,");
|
||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".jpg";
|
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".jpg";
|
||||||
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
|
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
|
||||||
@@ -338,22 +380,27 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
this.finish();
|
this.finish();
|
||||||
break;
|
break;
|
||||||
case R.id.image_view:
|
case R.id.image_view:
|
||||||
|
picturesBuilder.append("onClick 点击了切换的窗口 ,");
|
||||||
benSwitch();
|
benSwitch();
|
||||||
break;
|
break;
|
||||||
case R.id.btn_switch:
|
case R.id.btn_switch:
|
||||||
|
picturesBuilder.append("onClick 点击了切换按钮 ,");
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
handler.sendEmptyMessageDelayed(0x102, 2000);// 利用handler延迟发送更改状态信息
|
handler.sendEmptyMessageDelayed(0x102, 2000);// 利用handler延迟发送更改状态信息
|
||||||
benSwitch();
|
benSwitch();
|
||||||
break;
|
break;
|
||||||
case R.id.iv_zoom_add://放大
|
case R.id.iv_zoom_add://放大
|
||||||
|
picturesBuilder.append("onClick 点击了放大 ,");
|
||||||
CameraUpdate cameraUpdateIn = CameraUpdateFactory.zoomIn();
|
CameraUpdate cameraUpdateIn = CameraUpdateFactory.zoomIn();
|
||||||
tencentMap.animateCamera(cameraUpdateIn);
|
tencentMap.animateCamera(cameraUpdateIn);
|
||||||
break;
|
break;
|
||||||
case R.id.iv_zoom_del://缩小
|
case R.id.iv_zoom_del://缩小
|
||||||
|
picturesBuilder.append("onClick 点击了缩小 ,");
|
||||||
CameraUpdate cameraUpdateOut = CameraUpdateFactory.zoomOut();
|
CameraUpdate cameraUpdateOut = CameraUpdateFactory.zoomOut();
|
||||||
tencentMap.animateCamera(cameraUpdateOut);
|
tencentMap.animateCamera(cameraUpdateOut);
|
||||||
break;
|
break;
|
||||||
case R.id.iv_location://定位:
|
case R.id.iv_location://定位:
|
||||||
|
picturesBuilder.append("onClick 点击了定位 ,");
|
||||||
if (Constant.currentLocation != null) {
|
if (Constant.currentLocation != null) {
|
||||||
CameraUpdate cameraSigma = CameraUpdateFactory
|
CameraUpdate cameraSigma = CameraUpdateFactory
|
||||||
.newCameraPosition(new CameraPosition(new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
.newCameraPosition(new CameraPosition(new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标,地图目标经纬度
|
||||||
@@ -504,6 +551,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
removables.get(i).remove();
|
removables.get(i).remove();
|
||||||
}
|
}
|
||||||
removables.clear();
|
removables.clear();
|
||||||
|
|
||||||
|
picturesBuilder.append("onDestroy ");
|
||||||
|
picturesBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), picturesBuilder.toString(), true);
|
||||||
if (EventBus.getDefault().isRegistered(this)) {
|
if (EventBus.getDefault().isRegistered(this)) {
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
}
|
}
|
||||||
@@ -543,6 +594,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
sb.append("\r\n");
|
sb.append("\r\n");
|
||||||
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
||||||
|
|
||||||
/*float speed = Constant.currentLocation.getSpeed();//米/秒
|
/*float speed = Constant.currentLocation.getSpeed();//米/秒
|
||||||
if (speed != 0) {
|
if (speed != 0) {
|
||||||
float a = (speed * 3600 / 1000);//km/h
|
float a = (speed * 3600 / 1000);//km/h
|
||||||
@@ -582,7 +634,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
if (isOration) {
|
if (isOration) {
|
||||||
stopTimer();
|
stopTimer();
|
||||||
}
|
}
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show(this, "提示", "当前路段已拍摄的自动保存,可以在选择继续拍摄", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
MessageDialog.show(this, "提示", "当前路段已拍摄的自动保存,可以在选择继续拍摄", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
|
|||||||
@@ -49,41 +49,49 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
private void initWebWork() {
|
private void initWebWork() {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
Bundle bundle = getIntent().getExtras();
|
Bundle bundle = getIntent().getExtras();
|
||||||
assert bundle != null;
|
if (bundle!=null){
|
||||||
String url = bundle.getString("url");
|
String url = bundle.getString("url");
|
||||||
HttpParams httpParams = new HttpParams();
|
if (url != null && !url.equals("")) {
|
||||||
Map<String, String> map = (HashMap<String, String>) bundle.getSerializable("map");
|
Toast.makeText(this, "连接失败", Toast.LENGTH_SHORT).show();
|
||||||
if (map!=null&&!map.isEmpty()){
|
return;
|
||||||
for(Map.Entry<String, String> entry : map.entrySet()){
|
|
||||||
httpParams.put(entry.getKey(),entry.getValue());
|
|
||||||
}
|
}
|
||||||
}
|
HttpParams httpParams = new HttpParams();
|
||||||
OkGoBuilder.getInstance()
|
Map<String, String> map = (HashMap<String, String>) bundle.getSerializable("map");
|
||||||
.Builder(this)
|
if (map!=null&&!map.isEmpty()){
|
||||||
.url(url)
|
for(Map.Entry<String, String> entry : map.entrySet()){
|
||||||
.cls(RichTextBean.class)
|
httpParams.put(entry.getKey(),entry.getValue());
|
||||||
.token(Constant.ACCESS_TOKEN)
|
}
|
||||||
.params(httpParams)
|
}
|
||||||
.getRequest(new Callback<RichTextBean>() {
|
|
||||||
@Override
|
OkGoBuilder.getInstance()
|
||||||
public void onSuccess(RichTextBean response, int id) {
|
.Builder(this)
|
||||||
dismissLoadingDialog();
|
.url(url)
|
||||||
if (response.getCode()==200){
|
.cls(RichTextBean.class)
|
||||||
String richBody = response.getBody();
|
.token(Constant.ACCESS_TOKEN)
|
||||||
if (richBody!=null){
|
.params(httpParams)
|
||||||
richBody = richBody.replace("<img", "<img style='max-width: 100%'");
|
.getRequest(new Callback<RichTextBean>() {
|
||||||
nWebView.loadDataWithBaseURL(null, richBody, "text/html", "utf-8", null);
|
@Override
|
||||||
|
public void onSuccess(RichTextBean response, int id) {
|
||||||
|
dismissLoadingDialog();
|
||||||
|
if (response.getCode()==200){
|
||||||
|
String richBody = response.getBody();
|
||||||
|
if (richBody!=null){
|
||||||
|
richBody = richBody.replace("<img", "<img style='max-width: 100%'");
|
||||||
|
nWebView.loadDataWithBaseURL(null, richBody, "text/html", "utf-8", null);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
Toast.makeText(WebActivity.this, response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}else {
|
|
||||||
Toast.makeText(WebActivity.this, response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
}
|
||||||
}
|
@Override
|
||||||
@Override
|
public void onError(Throwable e, int id) {
|
||||||
public void onError(Throwable e, int id) {
|
dismissLoadingDialog();
|
||||||
dismissLoadingDialog();
|
Log.d("TAG", "onError:失败" + e.getMessage() + "");
|
||||||
Log.d("TAG", "onError:失败" + e.getMessage() + "");
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.navinfo.outdoor.adapter;
|
package com.navinfo.outdoor.adapter;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
@@ -13,11 +14,15 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
|
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||||
import com.navinfo.outdoor.room.PoiDatabase;
|
import com.navinfo.outdoor.room.PoiDatabase;
|
||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
|
import com.navinfo.outdoor.util.PoiEntityDeleteUtil;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
@@ -57,7 +62,30 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
|||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
||||||
if (poiEntity.isChecked()) {
|
if (poiEntity.isChecked()) {
|
||||||
|
PoiEntityDeleteUtil.getInstance().deleteUtil(context,poiEntity);
|
||||||
PoiDatabase.getInstance(context).getPoiDao().deletePoiEntity(poiEntity);
|
PoiDatabase.getInstance(context).getPoiDao().deletePoiEntity(poiEntity);
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(context).getChargingPileDao().getChargingPileByStationId(poiEntity.getId());
|
||||||
|
if (chargingPileEntityList != null && !chargingPileEntityList.isEmpty()) {
|
||||||
|
for (ChargingPileEntity chargingPileEntity : chargingPileEntityList) {
|
||||||
|
List<File> chargingPileFileList = new ArrayList<>();
|
||||||
|
if (chargingPileEntity.getPhotos() != null && !chargingPileEntity.getPhotos().isEmpty()) {
|
||||||
|
for (String photoPath : chargingPileEntity.getPhotos()) {
|
||||||
|
chargingPileFileList.add(new File(photoPath));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PoiDatabase.getInstance(context).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
||||||
|
for (int i = 0; i < chargingPileFileList.size(); i++) {
|
||||||
|
chargingPileFileList.get(i).delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PoiDatabase.getInstance(context).getChargingPileDao().deleteChargingFidPileEntity(poiEntity.getId());
|
||||||
|
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,8 +126,6 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -121,6 +147,7 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
|||||||
}
|
}
|
||||||
|
|
||||||
Handler handler = new Handler() {
|
Handler handler = new Handler() {
|
||||||
|
@SuppressLint("HandlerLeak")
|
||||||
@Override
|
@Override
|
||||||
public void handleMessage(@NonNull @NotNull Message msg) {
|
public void handleMessage(@NonNull @NotNull Message msg) {
|
||||||
super.handleMessage(msg);
|
super.handleMessage(msg);
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ public class Constant {
|
|||||||
|
|
||||||
public static String POI_DAO;
|
public static String POI_DAO;
|
||||||
|
|
||||||
|
public static String LOG_FOLDER;
|
||||||
|
|
||||||
public static String SHARED_PREFERENCES = "navInfo";
|
public static String SHARED_PREFERENCES = "navInfo";
|
||||||
|
|
||||||
public static String MESSAGE_TYPE="messageType";
|
public static String MESSAGE_TYPE="messageType";
|
||||||
@@ -55,6 +57,7 @@ public class Constant {
|
|||||||
//下载文件
|
//下载文件
|
||||||
public static final String NABISCO_APk = ROOT_FOLDER + "/apk/";
|
public static final String NABISCO_APk = ROOT_FOLDER + "/apk/";
|
||||||
|
|
||||||
|
|
||||||
public static int TelLength=0;
|
public static int TelLength=0;
|
||||||
|
|
||||||
public static void initRootFolder(String userId) {
|
public static void initRootFolder(String userId) {
|
||||||
@@ -62,6 +65,8 @@ public class Constant {
|
|||||||
PICTURE_FOLDER = BASE_FOLDER + "/picture";
|
PICTURE_FOLDER = BASE_FOLDER + "/picture";
|
||||||
POI_DAO = BASE_FOLDER + "/BaseDao/";
|
POI_DAO = BASE_FOLDER + "/BaseDao/";
|
||||||
VIDEOS_ = BASE_FOLDER + "/videos";
|
VIDEOS_ = BASE_FOLDER + "/videos";
|
||||||
|
LOG_FOLDER =BASE_FOLDER+"/log";
|
||||||
|
|
||||||
|
|
||||||
// 初始化应用目录
|
// 初始化应用目录
|
||||||
File baseFolder = new File(BASE_FOLDER); // 数据库文件夹路径
|
File baseFolder = new File(BASE_FOLDER); // 数据库文件夹路径
|
||||||
@@ -72,6 +77,10 @@ public class Constant {
|
|||||||
if (!picFolder.exists()) {
|
if (!picFolder.exists()) {
|
||||||
SdkFolderCreate.mkdirs(picFolder.getAbsolutePath());
|
SdkFolderCreate.mkdirs(picFolder.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
File logFolder = new File(LOG_FOLDER);//log文件夹路径
|
||||||
|
if (!logFolder.exists()){
|
||||||
|
SdkFolderCreate.mkdirs(logFolder.getAbsolutePath());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 申请权限的RequestCode
|
// 申请权限的RequestCode
|
||||||
@@ -199,7 +208,7 @@ public class Constant {
|
|||||||
|
|
||||||
public static TencentMap.OnMarkerClickListener markerClickListener=null;
|
public static TencentMap.OnMarkerClickListener markerClickListener=null;
|
||||||
|
|
||||||
public static final String NAVIN_FO="9.29";//版本
|
public static final String NAVIN_FO="9.30";//版本
|
||||||
/*联系我们的QQ群名称和QQ群号
|
/*联系我们的QQ群名称和QQ群号
|
||||||
*/
|
*/
|
||||||
public static String REGION_JIG_NAME = "京津冀晋蒙-地图寻宝群";
|
public static String REGION_JIG_NAME = "京津冀晋蒙-地图寻宝群";
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
} else if (response.getBody()==1){
|
} else if (response.getBody()==1){
|
||||||
message = "通过";
|
message = "通过";
|
||||||
}
|
}
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", message, "确定").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", message, "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
|
|||||||
@@ -447,7 +447,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
rlAvailable.setOnLongClickListener(new View.OnLongClickListener() {
|
rlAvailable.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -461,7 +461,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
rlUsable.setOnLongClickListener(new View.OnLongClickListener() {
|
rlUsable.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -475,7 +475,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
rlScutcheon.setOnLongClickListener(new View.OnLongClickListener() {
|
rlScutcheon.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -489,7 +489,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
rlParking.setOnLongClickListener(new View.OnLongClickListener() {
|
rlParking.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -503,7 +503,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
rlPanorama.setOnLongClickListener(new View.OnLongClickListener() {
|
rlPanorama.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -517,7 +517,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
rlNumber.setOnLongClickListener(new View.OnLongClickListener() {
|
rlNumber.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -531,7 +531,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
rlFacility.setOnLongClickListener(new View.OnLongClickListener() {
|
rlFacility.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -545,7 +545,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
rlEquipment.setOnLongClickListener(new View.OnLongClickListener() {
|
rlEquipment.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -559,7 +559,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
rlDevice.setOnLongClickListener(new View.OnLongClickListener() {
|
rlDevice.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -573,7 +573,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
|||||||
rlCoding.setOnLongClickListener(new View.OnLongClickListener() {
|
rlCoding.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
rlElse.setOnLongClickListener(new View.OnLongClickListener() {
|
rlElse.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -395,7 +395,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
rlScutcheon.setOnLongClickListener(new View.OnLongClickListener() {
|
rlScutcheon.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -409,7 +409,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
rlPanorama.setOnLongClickListener(new View.OnLongClickListener() {
|
rlPanorama.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -423,7 +423,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
rlName.setOnLongClickListener(new View.OnLongClickListener() {
|
rlName.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -437,7 +437,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
rlInternalPhotos.setOnLongClickListener(new View.OnLongClickListener() {
|
rlInternalPhotos.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -663,7 +663,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
String code = getPhoneBean.getBody().getCode();
|
String code = getPhoneBean.getBody().getCode();
|
||||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||||
if (!code.equals(Constant.CODE)) {
|
if (!code.equals(Constant.CODE)) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -843,20 +843,20 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Constant.isPresent) {
|
if (Constant.isPresent) {
|
||||||
new Thread(new Runnable() {
|
if (showPoiEntity == null) {
|
||||||
@Override
|
showPoiEntity = new PoiEntity();
|
||||||
public void run() {
|
}
|
||||||
if (showPoiEntity == null) {
|
if (showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 5) {
|
||||||
showPoiEntity = new PoiEntity();
|
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
initRoadSaveLocal(true);
|
||||||
}
|
}
|
||||||
if (showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 5) {
|
});
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
} else {
|
||||||
@Override
|
new Thread(new Runnable() {
|
||||||
public void run() {
|
@Override
|
||||||
initRoadSaveLocal(true);
|
public void run() {
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
// 首先批量保存充电站对应的充电桩数据
|
// 首先批量保存充电站对应的充电桩数据
|
||||||
saveChargingPileByChargingStation(poiDaoPoiEntity);
|
saveChargingPileByChargingStation(poiDaoPoiEntity);
|
||||||
@@ -868,12 +868,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}).start();
|
||||||
}).start();
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.tv_station_examine:
|
case R.id.tv_station_examine:
|
||||||
@@ -1383,6 +1381,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
chargingPileDao.deleteChargingFidPileEntity(showPoiEntity.getId());
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}else {
|
}else {
|
||||||
if (geometry>50){
|
if (geometry>50){
|
||||||
// Voice.sprat("注意在附近50米范围内进行采集",0);
|
// Voice.sprat("注意在附近50米范围内进行采集",0);
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "注意在任务附近50米范围内进行采集", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "注意在任务附近50米范围内进行采集", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import com.github.lazylibrary.util.StringUtils;
|
|||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||||
import com.kongzue.dialog.util.BaseDialog;
|
import com.kongzue.dialog.util.BaseDialog;
|
||||||
|
import com.kongzue.dialog.util.DialogSettings;
|
||||||
import com.kongzue.dialog.v3.MessageDialog;
|
import com.kongzue.dialog.v3.MessageDialog;
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
@@ -48,8 +49,7 @@ import java.io.File;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/*收款信息
|
||||||
* 收款信息
|
|
||||||
*/
|
*/
|
||||||
public class GatheringFragment extends BaseFragment implements View.OnClickListener {
|
public class GatheringFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private TextView tvBank;
|
private TextView tvBank;
|
||||||
@@ -244,7 +244,9 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
public void onSuccess(BankPhoneBean response, int id) {
|
public void onSuccess(BankPhoneBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "绑定成功", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
|
DialogSettings.cancelable=false;
|
||||||
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "绑定成功", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
Constant.BACKGROUND = value;
|
Constant.BACKGROUND = value;
|
||||||
@@ -259,13 +261,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "绑定失败", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
Toast.makeText(getActivity(), "绑定失败!", Toast.LENGTH_SHORT).show();
|
||||||
@Override
|
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
rlPicture.setOnLongClickListener(new View.OnLongClickListener() {
|
rlPicture.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -299,7 +299,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
rlPictures.setOnLongClickListener(new View.OnLongClickListener() {
|
rlPictures.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -463,34 +463,15 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
otherUploadList.add(new File(tagPictures));
|
otherUploadList.add(new File(tagPictures));
|
||||||
}
|
}
|
||||||
if (Constant.isPresent) {
|
if (Constant.isPresent) {
|
||||||
new Thread(new Runnable() {
|
if (showPoiEntity == null) {
|
||||||
@Override
|
showPoiEntity = new PoiEntity();
|
||||||
public void run() {
|
}
|
||||||
if (showPoiEntity==null){
|
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 5) {
|
||||||
showPoiEntity=new PoiEntity();
|
initPoiSaveLocal(true);
|
||||||
}
|
} else {
|
||||||
if ( showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 5) {
|
otherUploadByNet(showPoiEntity.getBodyId(), otherUploadList);
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
Constant.isPresent = false;
|
||||||
@Override
|
}
|
||||||
public void run() {
|
|
||||||
initPoiSaveLocal(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
otherUploadByNet(poiDaoPoiEntity.getBodyId(), otherUploadList);
|
|
||||||
Constant.isPresent = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
@@ -692,7 +673,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
if (showPoiEntity.getTaskStatus() == 5) {
|
if (showPoiEntity.getTaskStatus() == 5) {
|
||||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||||
}else if (showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 1) {
|
} else if (showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 1) {
|
||||||
initList();
|
initList();
|
||||||
} else {
|
} else {
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
rlPanorama.setOnLongClickListener(new View.OnLongClickListener() {
|
rlPanorama.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -297,7 +297,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
rlName.setOnLongClickListener(new View.OnLongClickListener() {
|
rlName.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -311,7 +311,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
rlElse.setOnLongClickListener(new View.OnLongClickListener() {
|
rlElse.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -325,7 +325,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
rlInternalPhotos.setOnLongClickListener(new View.OnLongClickListener() {
|
rlInternalPhotos.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -340,7 +340,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
rlCard.setOnLongClickListener(new View.OnLongClickListener() {
|
rlCard.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -523,7 +523,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
String code = getPhoneBean.getBody().getCode();
|
String code = getPhoneBean.getBody().getCode();
|
||||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||||
if (!Constant.CODE.equals(code)) {
|
if (!Constant.CODE.equals(code)) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -635,35 +635,18 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
poiPicList.add(new File(tagCard));
|
poiPicList.add(new File(tagCard));
|
||||||
}
|
}
|
||||||
if (Constant.isPresent) {
|
if (Constant.isPresent) {
|
||||||
new Thread(new Runnable() {
|
if (showPoiEntity == null) {
|
||||||
@Override
|
showPoiEntity = new PoiEntity();
|
||||||
public void run() {
|
}
|
||||||
if (showPoiEntity == null) {
|
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 5) {
|
||||||
showPoiEntity = new PoiEntity();
|
initPoiSaveLocal(true);
|
||||||
}
|
} else {
|
||||||
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 5) {
|
poiUploadByNetWork(showPoiEntity.getBodyId(), poiPicList);
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
Constant.isPresent = false;
|
||||||
@Override
|
}
|
||||||
public void run() {
|
|
||||||
initPoiSaveLocal(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
poiUploadByNetWork(poiDaoPoiEntity.getBodyId(), poiPicList);
|
|
||||||
Constant.isPresent = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case R.id.tv_poi_examine:
|
case R.id.tv_poi_examine:
|
||||||
findingDuplicateByWork();
|
findingDuplicateByWork();
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
fmPoiVideoPic.setOnLongClickListener(new View.OnLongClickListener() {
|
fmPoiVideoPic.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -197,7 +197,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
etRoadName.setText(name);
|
etRoadName.setText(name);
|
||||||
}
|
}
|
||||||
String geoWkt = showPoiEntity.getGeoWkt();
|
String geoWkt = showPoiEntity.getGeoWkt();
|
||||||
if (geoWkt!=null){
|
if (geoWkt != null) {
|
||||||
String geo = Geohash.getInstance().decode(geoWkt);
|
String geo = Geohash.getInstance().decode(geoWkt);
|
||||||
Geometry geometry = GeometryTools.createGeometry(geo);
|
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||||
switch (geometry.getGeometryType()) {
|
switch (geometry.getGeometryType()) {
|
||||||
@@ -215,7 +215,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
markerPoiVideo = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).anchor(0.5f, 1.0f));
|
markerPoiVideo = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).anchor(0.5f, 1.0f));
|
||||||
markerPoiVideo.setZIndex(4);
|
markerPoiVideo.setZIndex(4);
|
||||||
moveLatlng(latLng, null);
|
moveLatlng(latLng, null);
|
||||||
}else {
|
} else {
|
||||||
String x = showPoiEntity.getX();
|
String x = showPoiEntity.getX();
|
||||||
String y = showPoiEntity.getY();
|
String y = showPoiEntity.getY();
|
||||||
if (x != null && y != null) {
|
if (x != null && y != null) {
|
||||||
@@ -331,7 +331,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
startActivityForResult(intent, 0x101);
|
startActivityForResult(intent, 0x101);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_poi_video_upload:
|
case R.id.btn_poi_video_upload:
|
||||||
if (Constant.isPresent){
|
if (Constant.isPresent) {
|
||||||
if (fmPoiVideoPic.getTag() != null) {
|
if (fmPoiVideoPic.getTag() != null) {
|
||||||
List<File> videoFileList = (List<File>) fmPoiVideoPic.getTag();
|
List<File> videoFileList = (List<File>) fmPoiVideoPic.getTag();
|
||||||
fileZip = new File(Constant.PICTURE_FOLDER, "files" + ".zip");
|
fileZip = new File(Constant.PICTURE_FOLDER, "files" + ".zip");
|
||||||
@@ -339,33 +339,23 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
ZipUtil.zipFiles(videoFileList, fileZip, null);
|
ZipUtil.zipFiles(videoFileList, fileZip, null);
|
||||||
if (showPoiEntity == null) {
|
|
||||||
showPoiEntity = new PoiEntity();
|
|
||||||
}
|
|
||||||
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 5) {
|
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
initPoiSaveLocal(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
poiVideoUpload(showPoiEntity.getBodyId(), fileZip);
|
|
||||||
Constant.isPresent=false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
if (showPoiEntity == null) {
|
||||||
|
showPoiEntity = new PoiEntity();
|
||||||
|
}
|
||||||
|
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 5) {
|
||||||
|
initPoiSaveLocal(true);
|
||||||
|
} else {
|
||||||
|
poiVideoUpload(showPoiEntity.getBodyId(), fileZip);
|
||||||
|
Constant.isPresent = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), "请录像", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请录像", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,7 +427,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
.cls(OtherUploadPicBean.class)
|
.cls(OtherUploadPicBean.class)
|
||||||
.params(httpParams)
|
.params(httpParams)
|
||||||
.token(Constant.ACCESS_TOKEN)
|
.token(Constant.ACCESS_TOKEN)
|
||||||
.postRequest(UploadUtils.getInstance().getPoiVideoUploadCallback(getActivity(),showPoiEntity,fileZip));
|
.postRequest(UploadUtils.getInstance().getPoiVideoUploadCallback(getActivity(), showPoiEntity, fileZip));
|
||||||
Objects.requireNonNull(getActivity()).onBackPressed();//回退
|
Objects.requireNonNull(getActivity()).onBackPressed();//回退
|
||||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
||||||
WaitDialog.dismiss(3000);
|
WaitDialog.dismiss(3000);
|
||||||
@@ -558,7 +548,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
if (showPoiEntity.getTaskStatus() == 5) {
|
if (showPoiEntity.getTaskStatus() == 5) {
|
||||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);//结束领取
|
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);//结束领取
|
||||||
}else if (showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 1) {
|
} else if (showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 1) {
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
fileListByUUID.get(i).delete();
|
fileListByUUID.get(i).delete();
|
||||||
@@ -607,9 +597,11 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
poiDao.deletePoiEntity(poiEntity);
|
poiDao.deletePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
if (poiEntity.getId() != null) {
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
|
||||||
fileListByUUID.get(i).delete();
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
|
fileListByUUID.get(i).delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
fmRoadPic.setOnLongClickListener(new View.OnLongClickListener() {
|
fmRoadPic.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -343,27 +343,17 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
ZipUtil.zipFiles(videoFileList, fileZip, null);//压缩
|
ZipUtil.zipFiles(videoFileList, fileZip, null);//压缩
|
||||||
if (showPoiEntity == null) {
|
|
||||||
showPoiEntity = new PoiEntity();
|
|
||||||
}
|
|
||||||
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 5) {
|
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
initPoiSaveLocal(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
poiVideoUpload(showPoiEntity.getBodyId(), fileZip);
|
|
||||||
Constant.isPresent = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
if (showPoiEntity == null) {
|
||||||
|
showPoiEntity = new PoiEntity();
|
||||||
|
}
|
||||||
|
if (showPoiEntity.getTaskStatus() == 1 || showPoiEntity.getTaskStatus() == 2 || showPoiEntity.getTaskStatus() == 0 || showPoiEntity.getTaskStatus() == 5) {
|
||||||
|
initPoiSaveLocal(true);
|
||||||
|
} else {
|
||||||
|
poiVideoUpload(showPoiEntity.getBodyId(), fileZip);
|
||||||
|
Constant.isPresent = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), "请录像", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请录像", Toast.LENGTH_SHORT).show();
|
||||||
@@ -617,10 +607,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
poiDao.deletePoiEntity(poiEntity);
|
poiDao.deletePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
if (poiEntity.getId() != null) {
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
|
||||||
fileListByUUID.get(i).delete();
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
|
fileListByUUID.get(i).delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ import java.util.Objects;
|
|||||||
*/
|
*/
|
||||||
public class StaySubmitFragment extends BaseFragment implements View.OnClickListener {
|
public class StaySubmitFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private StaySubmitAdapter staySubmitAdapter;
|
private StaySubmitAdapter staySubmitAdapter;
|
||||||
private PoiDao roadDao;
|
|
||||||
private TextView tvStayType;
|
private TextView tvStayType;
|
||||||
private List<PoiEntity> roadEntities;
|
private List<PoiEntity> roadEntities;
|
||||||
private ArrayList<PoiEntity> newEntities;
|
private ArrayList<PoiEntity> newEntities;
|
||||||
@@ -81,8 +80,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
PoiDatabase roadDatabase = PoiDatabase.getInstance(getContext());
|
|
||||||
roadDao = roadDatabase.getPoiDao();
|
|
||||||
ConstraintLayout clStayType = findViewById(R.id.cl_stay_type);
|
ConstraintLayout clStayType = findViewById(R.id.cl_stay_type);
|
||||||
clStayType.setOnClickListener(this);
|
clStayType.setOnClickListener(this);
|
||||||
cbSelect = findViewById(R.id.cb_select);
|
cbSelect = findViewById(R.id.cb_select);
|
||||||
@@ -119,16 +116,27 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
staySubmitAdapter.notifyDataSetChanged();
|
staySubmitAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
refreshData();
|
if (Constant.currentLocation!=null){
|
||||||
|
if (Constant.USHERED!=null){
|
||||||
|
refreshData();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onEvent(Message data) {
|
public void onEvent(Message data) {
|
||||||
if (data.what == Constant.EVENT_STAY_REFRESH) {
|
if (data.what == Constant.EVENT_STAY_REFRESH) {
|
||||||
cbSelect.setChecked(false);
|
cbSelect.setChecked(false);
|
||||||
refreshData();
|
if (Constant.currentLocation!=null){
|
||||||
|
if (Constant.USHERED!=null){
|
||||||
|
refreshData();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}else if (data.what==Constant.NEST_WORD_SUBMIT){
|
}else if (data.what==Constant.NEST_WORD_SUBMIT){
|
||||||
messageDialog.doDismiss();
|
if (messageDialog!=null){
|
||||||
|
messageDialog.doDismiss();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,7 +201,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
|
|
||||||
case R.id.tv_delete:
|
case R.id.tv_delete:
|
||||||
if (Constant.isPresent) {
|
if (Constant.isPresent) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -221,7 +229,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
if (poiEntities.size() > 0) {
|
if (poiEntities.size() > 0) {
|
||||||
PoiSaveUtils.getInstance(getActivity()).uploadPoiEntityBatch(poiEntities);
|
PoiSaveUtils.getInstance(getActivity()).uploadPoiEntityBatch(poiEntities);
|
||||||
Constant.isPresent = false;
|
Constant.isPresent = false;
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
messageDialog = MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "任务正在提交中,无需重复提交", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
messageDialog = MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "任务正在提交中,无需重复提交", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -314,6 +322,8 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
} else {
|
} else {
|
||||||
newEntities.clear();
|
newEntities.clear();
|
||||||
}
|
}
|
||||||
|
PoiDatabase roadDatabase = PoiDatabase.getInstance(getContext());
|
||||||
|
PoiDao roadDao = roadDatabase.getPoiDao();
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|||||||
@@ -1079,7 +1079,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
PoiEntity poiEntity = new Gson().fromJson(dataFileString, PoiEntity.class);
|
PoiEntity poiEntity = new Gson().fromJson(dataFileString, PoiEntity.class);
|
||||||
switch (poiEntity.getType()) {
|
switch (poiEntity.getType()) {
|
||||||
case 1:
|
case 1:
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
|
DialogSettings.cancelable=false;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi页面还有未提交完的数据,之前的成果已保存,点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -1093,7 +1094,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
|
DialogSettings.cancelable=false;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你充电站页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你充电站页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -1107,7 +1109,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
|
DialogSettings.cancelable=false;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi录像页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi录像页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -1121,7 +1124,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
|
DialogSettings.cancelable=false;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你道路页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你道路页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -1135,6 +1139,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
|
DialogSettings.cancelable=false;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你其他页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你其他页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
@@ -1145,7 +1151,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
initRemovePoiSharePre();
|
initRemovePoiSharePre();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}).setStyle(DialogSettings.STYLE.STYLE_KONGZUE);
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import static android.app.Activity.RESULT_OK;
|
|||||||
/**
|
/**
|
||||||
* 实名认证
|
* 实名认证
|
||||||
*/
|
*/
|
||||||
public class UserAttestationFragment extends BaseFragment implements View.OnClickListener {
|
public class UserAttestationFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView ivAttestation2;
|
private ImageView ivAttestation2;
|
||||||
private ImageView ivAttestation1;
|
private ImageView ivAttestation1;
|
||||||
@@ -271,8 +271,9 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
public void onSuccess(NameAuthenticationBean response, int id) {
|
public void onSuccess(NameAuthenticationBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "提交成功", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
DialogSettings.cancelable=false;
|
||||||
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "提交成功", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
Constant.NAME = attestationName;
|
Constant.NAME = attestationName;
|
||||||
@@ -283,14 +284,7 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
Toast.makeText(getActivity(), "提交失败!", Toast.LENGTH_SHORT).show();
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "提交失败", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
|
||||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Constant.ID_NUMBER != null) {
|
if (Constant.ID_NUMBER != null) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否提取到" + Constant.ID_NUMBER.substring(Constant.ID_NUMBER.length() - 4) + "的银行卡", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否提取到" + Constant.ID_NUMBER.substring(Constant.ID_NUMBER.length() - 4) + "的银行卡", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.navinfo.outdoor.util;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class PoiEntityDeleteUtil {
|
||||||
|
private static PoiEntityDeleteUtil instance;
|
||||||
|
|
||||||
|
public static PoiEntityDeleteUtil getInstance() {
|
||||||
|
if (instance == null) {
|
||||||
|
instance = new PoiEntityDeleteUtil();
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteUtil(Context context, PoiEntity poiEntity) {
|
||||||
|
switch (poiEntity.getType()){
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 5:
|
||||||
|
initDelete(poiEntity);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
initPicture(poiEntity);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initPicture(PoiEntity poiEntity) {
|
||||||
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
|
||||||
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
|
fileListByUUID.get(i).delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void initDelete(PoiEntity poiEntity) {
|
||||||
|
if (poiEntity!=null){
|
||||||
|
if (poiEntity.getPhotoInfo()!=null){
|
||||||
|
for (int i = 0; i < poiEntity.getPhotoInfo().size(); i++) {
|
||||||
|
File file = new File(poiEntity.getPhotoInfo().get(i).getPhoto());
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -81,7 +81,7 @@ public class SpeakMode extends Activity implements TextToSpeech.OnInitListener{
|
|||||||
if (result == TextToSpeech.LANG_MISSING_DATA
|
if (result == TextToSpeech.LANG_MISSING_DATA
|
||||||
|| result == TextToSpeech.LANG_NOT_SUPPORTED) {
|
|| result == TextToSpeech.LANG_NOT_SUPPORTED) {
|
||||||
if (mActivity != null && !mActivity.isFinishing()) {
|
if (mActivity != null && !mActivity.isFinishing()) {
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||||
MessageDialog.show((AppCompatActivity) mActivity, "提示", "设备不支持语音播报。", "确定");
|
MessageDialog.show((AppCompatActivity) mActivity, "提示", "设备不支持语音播报。", "确定");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user