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