修改问题

This commit is contained in:
wangdongsheng
2021-09-23 16:13:54 +08:00
parent a9295e1c92
commit ae15085f30
13 changed files with 90 additions and 171 deletions

View File

@@ -9,6 +9,7 @@ import android.content.Intent;
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;
import android.graphics.Color;
import android.graphics.Matrix; import android.graphics.Matrix;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
@@ -33,6 +34,7 @@ import com.navinfo.outdoor.base.BaseActivity;
import com.navinfo.outdoor.room.PoiEntity; import com.navinfo.outdoor.room.PoiEntity;
import com.navinfo.outdoor.util.AWMp4ParserHelper; import com.navinfo.outdoor.util.AWMp4ParserHelper;
import com.navinfo.outdoor.util.Geohash;
import com.navinfo.outdoor.util.GeometryTools; import com.navinfo.outdoor.util.GeometryTools;
import com.navinfo.outdoor.util.MyTecentLocationSource; import com.navinfo.outdoor.util.MyTecentLocationSource;
import com.otaliastudios.cameraview.CameraException; import com.otaliastudios.cameraview.CameraException;
@@ -392,11 +394,11 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
layoutParamsMap.width = dm.heightPixels / 3; layoutParamsMap.width = dm.heightPixels / 3;
ivMap.setLayoutParams(layoutParamsMap); ivMap.setLayoutParams(layoutParamsMap);
} }
private void initLine() { private void initLine() {
String geo = poiEntity.getGeoWkt(); String geoWkt = poiEntity.getGeoWkt();
Geometry geometry = GeometryTools.createGeometry(geo); if (geoWkt != null) {
if (geometry != null) { String geo = Geohash.getInstance().decode(geoWkt);
Geometry geometry = GeometryTools.createGeometry(geo);
if (geometry.getGeometryType().equals("LineString")) {//线 if (geometry.getGeometryType().equals("LineString")) {//线
BitmapDescriptor bitmapLine = null; BitmapDescriptor bitmapLine = null;
if (poiEntity.getType() == 3) {//poi录像 if (poiEntity.getType() == 3) {//poi录像
@@ -405,13 +407,14 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows); bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
} }
List<LatLng> latLineString = GeometryTools.getLatLags(geo); List<LatLng> latLineString = GeometryTools.getLatLags(geo);
// 构造 PolylineOnions // 构造 PolylineOnions
PolylineOptions polylineOptions = new PolylineOptions() PolylineOptions polylineOptions
.addAll(latLineString) = new PolylineOptions().addAll(latLineString)
// 折线设置圆形线头 // 折线设置圆形线头
.lineCap(true) .lineCap(true)
// 折线的颜色为绿色 // 折线的颜色为绿色
.color(0xff00ff00) .color(Color.parseColor("#0096FF"))
// 折线宽度为5像素 // 折线宽度为5像素
.width(20) .width(20)
.arrow(true) .arrow(true)
@@ -424,7 +427,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
} }
} }
// 将秒转化成小时分钟秒 // 将秒转化成小时分钟秒
private String formatMiss(long miss) { private String formatMiss(long miss) {
String hh = miss / 3600 > 9 ? miss / 3600 + "" : "0" + miss / 3600; String hh = miss / 3600 > 9 ? miss / 3600 + "" : "0" + miss / 3600;

View File

@@ -135,9 +135,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
poi_video_type = getIntent().getIntExtra(Constant.INTENT_POI_VIDEO_TYPE, -1); poi_video_type = getIntent().getIntExtra(Constant.INTENT_POI_VIDEO_TYPE, -1);
oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1); oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1);
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_JPG_PATH); finalVideoPath = getIntent().getStringExtra(Constant.INTENT_JPG_PATH);
assert finalVideoPath != null; if (finalVideoPath!=null){
File file = new File(finalVideoPath); File file = new File(finalVideoPath);
paperFile = new File(Objects.requireNonNull(file.getParentFile()).getAbsoluteFile() + "/" + "paper.txt"); paperFile = new File(Objects.requireNonNull(file.getParentFile()).getAbsoluteFile() + "/" + "paper.txt");
}
} }
formatter = new SimpleDateFormat("yyyyMMdd HHmmss"); formatter = new SimpleDateFormat("yyyyMMdd HHmmss");
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
@@ -512,7 +513,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
if (poi_video_type == 1) { if (poi_video_type == 1) {
@@ -542,7 +543,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
} }
} }
oldCurrentLocation = Constant.currentLocation; oldCurrentLocation = Constant.currentLocation;
} }*/
} }
public void initMarker() { public void initMarker() {

View File

@@ -186,7 +186,7 @@ public class Constant {
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重 public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
public static TencentMap.OnMarkerClickListener markerClickListener=null; public static TencentMap.OnMarkerClickListener markerClickListener=null;
public static final String NAVIN_FO="9.22";//版本 public static final String NAVIN_FO="9.23";//版本
/** /**
* 联系我们的QQ群名称和QQ群号 * 联系我们的QQ群名称和QQ群号

View File

@@ -9,7 +9,8 @@ public abstract class BaseMVPActivity <P extends BasePresenter,V extends BaseVie
presenter= initMVPPresenter(); presenter= initMVPPresenter();
if (presenter!=null){ if (presenter!=null){
presenter.setView(initMVPView()); presenter.setView(initMVPView());
} } }
}
protected abstract V initMVPView(); protected abstract V initMVPView();

View File

@@ -28,11 +28,9 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
private TextView auditProcess; private TextView auditProcess;
private TextView auditThrough; private TextView auditThrough;
private TextView auditNotThrough; private TextView auditNotThrough;
private TextView tvCharging;
private TextView chargingAuditProcess; private TextView chargingAuditProcess;
private TextView chargingAuditThrough; private TextView chargingAuditThrough;
private TextView chargingAuditNotThrough; private TextView chargingAuditNotThrough;
private TextView tvRoad;
private TextView roadAuditProcess; private TextView roadAuditProcess;
private TextView roadAuditThrough; private TextView roadAuditThrough;
private TextView roadAuditNotThrough; private TextView roadAuditNotThrough;
@@ -41,7 +39,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
private TextView otherAuditNotThrough; private TextView otherAuditNotThrough;
private TextView poiVideoAuditProcess; private TextView poiVideoAuditProcess;
private TextView poiVideoAuditThrough; private TextView poiVideoAuditThrough;
private TextView poiVideoAuditProcessableNotThrough; private TextView poiVideoAuditProcessAbleNotThrough;
private int hasPage; private int hasPage;
public static HasSubmitFragment newInstance(Bundle bundle) { public static HasSubmitFragment newInstance(Bundle bundle) {
@@ -57,35 +55,35 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
protected void initView() { protected void initView() {
super.initView(); super.initView();
ConstraintLayout clPoi = (ConstraintLayout) findViewById(R.id.cl_poi); ConstraintLayout clPoi = findViewById(R.id.cl_poi);
clPoi.setOnClickListener(this); clPoi.setOnClickListener(this);
auditProcess = (TextView) findViewById(R.id.audit_process); auditProcess = findViewById(R.id.audit_process);
auditThrough = (TextView) findViewById(R.id.audit_through); auditThrough = findViewById(R.id.audit_through);
auditNotThrough = (TextView) findViewById(R.id.audit_not_through); auditNotThrough = findViewById(R.id.audit_not_through);
ConstraintLayout clRoad = (ConstraintLayout) findViewById(R.id.cl_road); ConstraintLayout clRoad = findViewById(R.id.cl_road);
clRoad.setOnClickListener(this); clRoad.setOnClickListener(this);
roadAuditProcess = (TextView) findViewById(R.id.road_audit_process); roadAuditProcess = findViewById(R.id.road_audit_process);
roadAuditThrough = (TextView) findViewById(R.id.road_audit_through); roadAuditThrough = findViewById(R.id.road_audit_through);
roadAuditNotThrough = (TextView) findViewById(R.id.road_audit_not_through); roadAuditNotThrough = findViewById(R.id.road_audit_not_through);
ConstraintLayout clCharging = (ConstraintLayout) findViewById(R.id.cl_charging);
ConstraintLayout clCharging = findViewById(R.id.cl_charging);
clCharging.setOnClickListener(this); clCharging.setOnClickListener(this);
chargingAuditProcess = (TextView) findViewById(R.id.charging_audit_process); chargingAuditProcess = findViewById(R.id.charging_audit_process);
chargingAuditThrough = (TextView) findViewById(R.id.charging_audit_through); chargingAuditThrough = findViewById(R.id.charging_audit_through);
chargingAuditNotThrough = (TextView) findViewById(R.id.charging_audit_not_through); chargingAuditNotThrough = findViewById(R.id.charging_audit_not_through);
ConstraintLayout clOther = (ConstraintLayout) findViewById(R.id.cl_other); ConstraintLayout clOther = findViewById(R.id.cl_other);
clOther.setOnClickListener(this); clOther.setOnClickListener(this);
otherAuditProcess = (TextView) findViewById(R.id.other_audit_process); otherAuditProcess = findViewById(R.id.other_audit_process);
otherAuditThrough = (TextView) findViewById(R.id.other_audit_through); otherAuditThrough = findViewById(R.id.other_audit_through);
otherAuditNotThrough = (TextView) findViewById(R.id.other_audit_not_through); otherAuditNotThrough = findViewById(R.id.other_audit_not_through);
ConstraintLayout clPoiVideo = (ConstraintLayout) findViewById(R.id.cl_poiVideo); ConstraintLayout clPoiVideo = findViewById(R.id.cl_poiVideo);
clPoiVideo.setOnClickListener(this); clPoiVideo.setOnClickListener(this);
TextView tvPoiVideo = (TextView) findViewById(R.id.tv_poiVideo); poiVideoAuditProcess = findViewById(R.id.poiVideo_audit_process);
poiVideoAuditProcess = (TextView) findViewById(R.id.poiVideo_audit_process); poiVideoAuditThrough = findViewById(R.id.poiVideo_audit_through);
poiVideoAuditThrough = (TextView) findViewById(R.id.poiVideo_audit_through); poiVideoAuditProcessAbleNotThrough = findViewById(R.id.poiVideo_audit_process_audit_not_through);
poiVideoAuditProcessableNotThrough = (TextView) findViewById(R.id.poiVideo_audit_processaudit_not_through);
initRequest(); initRequest();
} }
@@ -235,7 +233,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
if (hasSubmitBeanBody != null) { if (hasSubmitBeanBody != null) {
poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + ""); poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount() + ""); poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
poiVideoAuditProcessableNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + ""); poiVideoAuditProcessAbleNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
hasPage++; hasPage++;
} }
} else { } else {
@@ -281,8 +279,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
} else { } else {
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
} }
} }
@Override @Override

View File

@@ -128,7 +128,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
if (!EventBus.getDefault().isRegistered(this)) {//加上判断 if (!EventBus.getDefault().isRegistered(this)) {//加上判断
EventBus.getDefault().register(this); EventBus.getDefault().register(this);
} }
} }
@Override @Override
@@ -189,7 +188,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
checkBoxLife.setTextColor(Color.WHITE); checkBoxLife.setTextColor(Color.WHITE);
checkBoxLife.setChecked(true); checkBoxLife.setChecked(true);
} }
@Override @Override
public void onCancel() { public void onCancel() {
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bags); BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bags);
@@ -211,7 +209,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
} }
} }
}); });
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT); setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
NestedScrollView nestedScrollView = findViewById(R.id.nested_scroll_view); NestedScrollView nestedScrollView = findViewById(R.id.nested_scroll_view);
if (slidingPaneLayout != null) { if (slidingPaneLayout != null) {
@@ -250,7 +247,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
rlElse.setOnClickListener(this); rlElse.setOnClickListener(this);
linearExist = findViewById(R.id.linear_exist); linearExist = findViewById(R.id.linear_exist);
spinnerExist = findViewById(R.id.spinner_exist); spinnerExist = findViewById(R.id.spinner_exist);
ArrayAdapter<String> adapterExist = new ArrayAdapter<>(Objects.requireNonNull(getContext()), android.R.layout.simple_spinner_item, spinner); ArrayAdapter<String> adapterExist = new ArrayAdapter<>(Objects.requireNonNull(getContext()), android.R.layout.simple_spinner_item, spinner);
adapterExist.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式 adapterExist.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式
spinnerExist.setAdapter(adapterExist); spinnerExist.setAdapter(adapterExist);
@@ -269,10 +265,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
break; break;
} }
} }
@Override @Override
public void onNothingSelected(AdapterView<?> parent) { public void onNothingSelected(AdapterView<?> parent) { }
}
}); });
//数据展示 //数据展示
initShowPoi(); initShowPoi();
@@ -282,7 +276,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
//拍照长按删除 //拍照长按删除
private void onLongDel() { private void onLongDel() {
rlPanorama.setOnLongClickListener(new View.OnLongClickListener() { rlPanorama.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
@@ -297,8 +290,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
return false; return false;
} }
}); });
rlName.setOnLongClickListener(new View.OnLongClickListener() { rlName.setOnLongClickListener(new View.OnLongClickListener() {
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
@@ -372,12 +363,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
if (name != null && !name.equals("")) { if (name != null && !name.equals("")) {
editNameContent.setText(name); editNameContent.setText(name);
} }
String address = showPoiEntity.getAddress();//地址 String address = showPoiEntity.getAddress();//地址
if (address != null && !address.equals("")) { if (address != null && !address.equals("")) {
editSiteContent.setText(address); editSiteContent.setText(address);
} }
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);
@@ -410,7 +399,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
moveLatlng(latLng, null); moveLatlng(latLng, null);
} }
} }
//得到区号 //得到区号
initPhone(); initPhone();
String memo = showPoiEntity.getMemo();//任务描述 String memo = showPoiEntity.getMemo();//任务描述
@@ -459,7 +447,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
} else { } else {
poiBeans.add(new PhoneBean("电话", "", Constant.CODE, R.drawable.icon_add_bg)); poiBeans.add(new PhoneBean("电话", "", Constant.CODE, R.drawable.icon_add_bg));
} }
} }
contactView = new ContactView(getActivity(), linearContact, poiBeans); contactView = new ContactView(getActivity(), linearContact, poiBeans);
contactView.resetView(); contactView.resetView();
@@ -485,7 +472,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivCard); Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivCard);
tvCard.setTag(photo); tvCard.setTag(photo);
} else if (split[split.length - 1].startsWith("e")) { } else if (split[split.length - 1].startsWith("e")) {
Glide.with(getActivity()).load(photo).into(ivElse); Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivElse);
tvElse.setTag(photo); tvElse.setTag(photo);
} }
} }
@@ -505,8 +492,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
} else { } else {
Toast.makeText(getActivity(), "请输入名称", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "请输入名称", Toast.LENGTH_SHORT).show();
} }
} }
/** /**
@@ -550,7 +535,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
} }
} }
} }
@Override @Override
public void onError(Throwable e, int id) { public void onError(Throwable e, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
@@ -586,13 +570,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
super.initData(); super.initData();
//存储手机号对象 //存储手机号对象
poiBeans = new ArrayList<>(); poiBeans = new ArrayList<>();
} }
@Subscribe @Subscribe
public void onEvent(Message data) { public void onEvent(Message data) { }
}
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@@ -625,7 +606,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
} else { } else {
poiPicList.add(new File(tagName)); poiPicList.add(new File(tagName));
} }
String tagInternal = (String) tvInternal.getTag(); String tagInternal = (String) tvInternal.getTag();
if (tagInternal != null) { if (tagInternal != null) {
poiPicList.add(new File(tagInternal)); poiPicList.add(new File(tagInternal));
@@ -877,8 +857,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
} else { } else {
Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
} }
} }
@Override @Override

View File

@@ -194,7 +194,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
initMessageNotice(); initMessageNotice();
} else { } else {
String newData = addDateMinot(dataTime, 3);//是否三个小时之后 String newData = addDateMinot(dataTime, 3);//是否三个小时之后
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @SuppressLint("SimpleDateFormat") DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(System.currentTimeMillis()); calendar.setTimeInMillis(System.currentTimeMillis());
String presentData = formatter.format(calendar.getTime());//当前时间 String presentData = formatter.format(calendar.getTime());//当前时间
@@ -223,7 +223,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
* @param hour 需要加的时间 * @param hour 需要加的时间
*/ */
public static String addDateMinot(String day, int hour) { public static String addDateMinot(String day, int hour) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @SuppressLint("SimpleDateFormat") SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = null; Date date = null;
try { try {
date = format.parse(day); date = format.parse(day);
@@ -233,13 +233,11 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
if (date == null) if (date == null)
return ""; return "";
System.out.println("front:" + format.format(date)); //显示输入的日期 System.out.println("front:" + format.format(date)); //显示输入的日期
Log.d("TAGss", "addDateMinut: " + format.format(date));
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
cal.setTime(date); cal.setTime(date);
cal.add(Calendar.HOUR, hour);// 24小时制 cal.add(Calendar.HOUR, hour);// 24小时制
date = cal.getTime(); date = cal.getTime();
System.out.println("after:" + format.format(date)); //显示更新后的日期 System.out.println("after:" + format.format(date)); //显示更新后的日期
Log.d("TAGss", "addDateMinut: " + format.format(date));
cal = null; cal = null;
return format.format(date); return format.format(date);
} }
@@ -299,7 +297,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
poiDao = poiDatabase.getPoiDao(); poiDao = poiDatabase.getPoiDao();
builder = new AlertDialog.Builder(Objects.requireNonNull(getActivity())); builder = new AlertDialog.Builder(Objects.requireNonNull(getActivity()));
sliding_layout = findViewById(R.id.sliding_layout); sliding_layout = findViewById(R.id.sliding_layout);
LinearLayout dragView = findViewById(R.id.dragView);
frameLayout = findViewById(R.id.frame_layout); frameLayout = findViewById(R.id.frame_layout);
ivRaffish = findViewById(R.id.iv_refrish); ivRaffish = findViewById(R.id.iv_refrish);
ivRaffish.setOnClickListener(this); ivRaffish.setOnClickListener(this);

View File

@@ -3,16 +3,20 @@ package com.navinfo.outdoor.http;
import com.navinfo.outdoor.api.Constant; import com.navinfo.outdoor.api.Constant;
public class HttpInterface { public class HttpInterface {
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口T public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
public static final String DATA_IP = "http://172.23.139.4:9999/m4";//接口
public static final String IP_TEXT = "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口 public static final String IP_TEXT = "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
public static final String TEST_GUIDANCE_IP = "http://172.21.98.90:9999/m4";//引导页完成接口
public static final String APKIP = "http://172.23.139.4:8001/";
public static final String USER_PATH = "/user/";//我的 public static final String USER_PATH = "/user/";//我的
public static final String MSG_LIST_PATH = "/msgList/";//发现 public static final String MSG_LIST_PATH = "/msgList/";//发现
public static final String USER_LOGIN_PATH = "/userlogin/";//登录 public static final String USER_LOGIN_PATH = "/userlogin/";//登录
public static final String PRICE_PATH = "/price/";//提现 public static final String PRICE_PATH = "/price/";//提现
public static final String TASK_PATH = "/task/";//任务 public static final String TASK_PATH = "/task/";//任务
/* public static final String TEST_GUIDANCE_IP = "http://172.21.98.90:9999/m4";//引导页完成接口
public static final String APKIP = "http://172.23.139.4:8001/";
public static final String DATA_IP = "http://172.23.139.4:9999/m4";//接口*/
/* 用户版本升级 /* 用户版本升级
*/ */
// dtxbmaps.navinfo.com/dtxb/m4/user/appVersion/checkVersion?version=155&operationType=android // dtxbmaps.navinfo.com/dtxb/m4/user/appVersion/checkVersion?version=155&operationType=android

View File

@@ -51,7 +51,8 @@ public abstract class PoiDatabase extends RoomDatabase {
private static Migration migration_1_2 = new Migration(1, 2) { private static Migration migration_1_2 = new Migration(1, 2) {
@Override @Override
public void migrate(@NonNull SupportSQLiteDatabase database) { public void migrate(@NonNull SupportSQLiteDatabase database) {
database.execSQL("ALTER TABLE poi ADD COLUMN record_way INTEGER NOT NULL DEFAULT ''");//添加了一个 database.execSQL("ALTER TABLE poi "
+" ADD COLUMN record_way INTEGER NOT NULL DEFAULT 0");//添加了一个
} }
}; };

View File

@@ -69,7 +69,7 @@ public class ContactView {
if (poiBean.getPhone() == null) { if (poiBean.getPhone() == null) {
holder.editPhoneNumber.setText(""); holder.editPhoneNumber.setText("");
} else { } else {
holder.editPhoneNumber.setText(poiBean.getPhone() + ""); holder.editPhoneNumber.setText(poiBean.getPhone());
} }
holder.editPhoneNumber.addTextChangedListener(new TextWatcher() { holder.editPhoneNumber.addTextChangedListener(new TextWatcher() {
@@ -102,8 +102,6 @@ public class ContactView {
/** /**
* 添加数据 * 添加数据
*
* @return
*/ */
public View addRootView() { public View addRootView() {
PhoneBean poiBean = null; PhoneBean poiBean = null;
@@ -127,7 +125,6 @@ public class ContactView {
}); });
holder.editPhoneNumber.setText(poiBean.getPhone()); holder.editPhoneNumber.setText(poiBean.getPhone());
holder.editPhoneNumber.addTextChangedListener(new TextWatcher() { holder.editPhoneNumber.addTextChangedListener(new TextWatcher() {
@Override @Override
public void onTextChanged(CharSequence s, int start, int before, int count) { public void onTextChanged(CharSequence s, int start, int before, int count) {
//正在输入 //正在输入
@@ -137,7 +134,6 @@ public class ContactView {
} else { } else {
holder.llPoi.setVisibility(View.VISIBLE); holder.llPoi.setVisibility(View.VISIBLE);
} }
} }
@Override @Override
@@ -154,8 +150,6 @@ public class ContactView {
/** /**
* 获取数据 * 获取数据
*
* @return
*/ */
public List<PhoneBean> getPoiBeanListByRootView() { public List<PhoneBean> getPoiBeanListByRootView() {
ArrayList<PhoneBean> poiBeans = new ArrayList<>(); ArrayList<PhoneBean> poiBeans = new ArrayList<>();
@@ -178,8 +172,6 @@ public class ContactView {
/** /**
* 检验数据 * 检验数据
*
* @return
*/ */
public boolean getPhoneBean() { public boolean getPhoneBean() {
List<PhoneBean> list = getPoiBeanListByRootView(); List<PhoneBean> list = getPoiBeanListByRootView();

View File

@@ -23,8 +23,6 @@ public class ToastUtil {
/** /**
* 全局控制是否显示Toast * 全局控制是否显示Toast
*
* @param isShowToast
*/ */
public static void controlShow(boolean isShowToast) { public static void controlShow(boolean isShowToast) {
isShow = isShowToast; isShow = isShowToast;
@@ -41,9 +39,6 @@ public class ToastUtil {
/** /**
* 短时间显示Toast * 短时间显示Toast
*
* @param context
* @param message
*/ */
@SuppressLint("ShowToast") @SuppressLint("ShowToast")
public static void showShort(Context context, CharSequence message) { public static void showShort(Context context, CharSequence message) {
@@ -59,9 +54,7 @@ public class ToastUtil {
/** /**
* 短时间显示Toast * 短时间显示Toast
* * @param resId 资源ID:getResources().getString(R.string);
* @param context
* @param resId 资源ID:getResources().getString(R.string.xxxxxx);
*/ */
@SuppressLint("ShowToast") @SuppressLint("ShowToast")
public static void showShort(Context context, int resId) { public static void showShort(Context context, int resId) {
@@ -77,9 +70,6 @@ public class ToastUtil {
/** /**
* 长时间显示Toast * 长时间显示Toast
*
* @param context
* @param message
*/ */
@SuppressLint("ShowToast") @SuppressLint("ShowToast")
public static void showLong(Context context, CharSequence message) { public static void showLong(Context context, CharSequence message) {
@@ -95,9 +85,7 @@ public class ToastUtil {
/** /**
* 长时间显示Toast * 长时间显示Toast
* * @param resId 资源ID:getResources().getString(R.string);
* @param context
* @param resId 资源ID:getResources().getString(R.string.xxxxxx);
*/ */
@SuppressLint("ShowToast") @SuppressLint("ShowToast")
public static void showLong(Context context, int resId) { public static void showLong(Context context, int resId) {
@@ -113,9 +101,6 @@ public class ToastUtil {
/** /**
* 自定义显示Toast时间 * 自定义显示Toast时间
*
* @param context
* @param message
* @param duration 单位:毫秒 * @param duration 单位:毫秒
*/ */
@SuppressLint("ShowToast") @SuppressLint("ShowToast")
@@ -132,9 +117,7 @@ public class ToastUtil {
/** /**
* 自定义显示Toast时间 * 自定义显示Toast时间
* * @param resId 资源ID:getResources().getString(R.string);
* @param context
* @param resId 资源ID:getResources().getString(R.string.xxxxxx);
* @param duration 单位:毫秒 * @param duration 单位:毫秒
*/ */
@SuppressLint("ShowToast") @SuppressLint("ShowToast")
@@ -151,9 +134,6 @@ public class ToastUtil {
/** /**
* 自定义Toast的View * 自定义Toast的View
*
* @param context
* @param message
* @param duration 单位:毫秒 * @param duration 单位:毫秒
* @param view 显示自己的View * @param view 显示自己的View
*/ */
@@ -172,15 +152,9 @@ public class ToastUtil {
} }
} }
/** /*
* 自定义Toast的位置 * 自定义Toast的位置
*
* @param context
* @param message
* @param duration 单位:毫秒 * @param duration 单位:毫秒
* @param gravity
* @param xOffset
* @param yOffset
*/ */
@SuppressLint("ShowToast") @SuppressLint("ShowToast")
public static void customToastGravity(Context context, CharSequence message, int duration, int gravity, int xOffset, int yOffset) { public static void customToastGravity(Context context, CharSequence message, int duration, int gravity, int xOffset, int yOffset) {
@@ -195,16 +169,9 @@ public class ToastUtil {
} }
} }
/** /*
* 自定义带图片和文字的Toast最终的效果就是上面是图片下面是文字 * 自定义带图片和文字的Toast最终的效果就是上面是图片下面是文字
*
* @param context
* @param message
* @param iconResId 图片的资源id,如:R.drawable.icon * @param iconResId 图片的资源id,如:R.drawable.icon
* @param duration
* @param gravity
* @param xOffset
* @param yOffset
*/ */
@SuppressLint("ShowToast") @SuppressLint("ShowToast")
public static void showToastWithImageAndText(Context context, CharSequence message, int iconResId, int duration, int gravity, int xOffset, int yOffset) { public static void showToastWithImageAndText(Context context, CharSequence message, int iconResId, int duration, int gravity, int xOffset, int yOffset) {
@@ -225,18 +192,9 @@ public class ToastUtil {
/** /**
* 自定义Toast,针对类型CharSequence * 自定义Toast,针对类型CharSequence
*
* @param context
* @param message
* @param duration
* @param view
* @param isGravity true,表示后面的三个布局参数生效,false,表示不生效 * @param isGravity true,表示后面的三个布局参数生效,false,表示不生效
* @param gravity
* @param xOffset
* @param yOffset
* @param isMargin true,表示后面的两个参数生效false,表示不生效 * @param isMargin true,表示后面的两个参数生效false,表示不生效
* @param horizontalMargin
* @param verticalMargin
*/ */
@SuppressLint("ShowToast") @SuppressLint("ShowToast")
public static void customToastAll(Context context, CharSequence message, int duration, View view, boolean isGravity, int gravity, int xOffset, int yOffset, boolean isMargin, float horizontalMargin, float verticalMargin) { public static void customToastAll(Context context, CharSequence message, int duration, View view, boolean isGravity, int gravity, int xOffset, int yOffset, boolean isMargin, float horizontalMargin, float verticalMargin) {
@@ -261,18 +219,9 @@ public class ToastUtil {
/** /**
* 自定义Toast,针对类型resId * 自定义Toast,针对类型resId
*
* @param context
* @param resId
* @param duration
* @param view :应该是一个布局,布局中包含了自己设置好的内容 * @param view :应该是一个布局,布局中包含了自己设置好的内容
* @param isGravity true,表示后面的三个布局参数生效,false,表示不生效 * @param isGravity true,表示后面的三个布局参数生效,false,表示不生效
* @param gravity
* @param xOffset
* @param yOffset
* @param isMargin true,表示后面的两个参数生效false,表示不生效 * @param isMargin true,表示后面的两个参数生效false,表示不生效
* @param horizontalMargin
* @param verticalMargin
*/ */
@SuppressLint("ShowToast") @SuppressLint("ShowToast")
public static void customToastAll(Context context, int resId, int duration, View view, boolean isGravity, int gravity, int xOffset, int yOffset, boolean isMargin, float horizontalMargin, float verticalMargin) { public static void customToastAll(Context context, int resId, int duration, View view, boolean isGravity, int gravity, int xOffset, int yOffset, boolean isMargin, float horizontalMargin, float verticalMargin) {

View File

@@ -216,6 +216,7 @@
android:id="@+id/rl_draw" android:id="@+id/rl_draw"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:visibility="gone"
android:background="@drawable/road_shape" android:background="@drawable/road_shape"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View File

@@ -11,7 +11,7 @@
android:id="@+id/cl_poi" android:id="@+id/cl_poi"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="20dp" android:layout_marginStart="20dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
@@ -31,7 +31,7 @@
android:id="@+id/tv_poi" android:id="@+id/tv_poi"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginStart="10dp"
android:text="POI任务列表" android:text="POI任务列表"
android:textColor="@color/black" android:textColor="@color/black"
app:layout_constraintLeft_toRightOf="@id/iv_poi" app:layout_constraintLeft_toRightOf="@id/iv_poi"
@@ -62,7 +62,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="30dp" android:layout_marginStart="30dp"
android:text="审核通过:" android:text="审核通过:"
android:textSize="12sp" /> android:textSize="12sp" />
@@ -76,7 +76,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="30dp" android:layout_marginStart="30dp"
android:text="审核未通过:" android:text="审核未通过:"
android:textSize="12sp" /> android:textSize="12sp" />
@@ -102,7 +102,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:layout_marginRight="10dp" android:layout_marginEnd="10dp"
android:background="@color/colormap" android:background="@color/colormap"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@@ -113,7 +113,7 @@
android:id="@+id/cl_poiVideo" android:id="@+id/cl_poiVideo"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="20dp" android:layout_marginStart="20dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
@@ -125,7 +125,6 @@
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:background="@drawable/marker_poi_video_bg1" android:background="@drawable/marker_poi_video_bg1"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/tv_poiVideo"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@@ -133,7 +132,7 @@
android:id="@+id/tv_poiVideo" android:id="@+id/tv_poiVideo"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginStart="10dp"
android:text="POI录像任务列表" android:text="POI录像任务列表"
android:textColor="@color/black" android:textColor="@color/black"
app:layout_constraintLeft_toRightOf="@id/iv_poiVideo" app:layout_constraintLeft_toRightOf="@id/iv_poiVideo"
@@ -164,7 +163,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="30dp" android:layout_marginStart="30dp"
android:text="审核通过:" android:text="审核通过:"
android:textSize="12sp" /> android:textSize="12sp" />
@@ -178,12 +177,12 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="30dp" android:layout_marginStart="30dp"
android:text="审核未通过:" android:text="审核未通过:"
android:textSize="12sp" /> android:textSize="12sp" />
<TextView <TextView
android:id="@+id/poiVideo_audit_processaudit_not_through" android:id="@+id/poiVideo_audit_process_audit_not_through"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="18" android:text="18"
@@ -204,7 +203,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:layout_marginRight="10dp" android:layout_marginEnd="10dp"
android:background="@color/colormap" android:background="@color/colormap"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@@ -216,7 +215,7 @@
android:id="@+id/cl_road" android:id="@+id/cl_road"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="20dp" android:layout_marginStart="20dp"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
@@ -233,7 +232,7 @@
android:id="@+id/tv_road" android:id="@+id/tv_road"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginStart="10dp"
android:text="道路任务列表" android:text="道路任务列表"
android:textColor="@color/black" android:textColor="@color/black"
app:layout_constraintLeft_toRightOf="@id/iv_road" app:layout_constraintLeft_toRightOf="@id/iv_road"
@@ -264,7 +263,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="30dp" android:layout_marginStart="30dp"
android:text="审核通过:" android:text="审核通过:"
android:textSize="12sp" /> android:textSize="12sp" />
@@ -278,7 +277,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="30dp" android:layout_marginStart="30dp"
android:text="审核未通过:" android:text="审核未通过:"
android:textSize="12sp" /> android:textSize="12sp" />
@@ -304,7 +303,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:layout_marginRight="10dp" android:layout_marginEnd="10dp"
android:background="@color/colormap" android:background="@color/colormap"
app:layout_constraintTop_toBottomOf="@+id/iv_road" /> app:layout_constraintTop_toBottomOf="@+id/iv_road" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
@@ -313,7 +312,7 @@
android:id="@+id/cl_charging" android:id="@+id/cl_charging"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="20dp" android:layout_marginStart="20dp"
> >
<ImageView <ImageView
@@ -329,7 +328,7 @@
android:id="@+id/tv_charging" android:id="@+id/tv_charging"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginStart="10dp"
android:text="充电站任务列表" android:text="充电站任务列表"
android:textColor="@color/black" android:textColor="@color/black"
app:layout_constraintLeft_toRightOf="@id/iv_charging" app:layout_constraintLeft_toRightOf="@id/iv_charging"
@@ -359,7 +358,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="30dp" android:layout_marginStart="30dp"
android:text="审核通过:" android:text="审核通过:"
android:textSize="12sp" /> android:textSize="12sp" />
@@ -373,7 +372,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="30dp" android:layout_marginStart="30dp"
android:text="审核未通过:" android:text="审核未通过:"
android:textSize="12sp" /> android:textSize="12sp" />
@@ -388,7 +387,6 @@
<ImageView <ImageView
android:id="@+id/imageView3" android:id="@+id/imageView3"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/icon_arrow_right" android:src="@drawable/icon_arrow_right"
app:layout_constraintBottom_toBottomOf="@id/iv_charging" app:layout_constraintBottom_toBottomOf="@id/iv_charging"
@@ -400,7 +398,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:layout_marginRight="10dp" android:layout_marginEnd="10dp"
android:background="@color/colormap" android:background="@color/colormap"
app:layout_constraintTop_toBottomOf="@+id/iv_charging" /> app:layout_constraintTop_toBottomOf="@+id/iv_charging" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
@@ -409,8 +407,7 @@
android:id="@+id/cl_other" android:id="@+id/cl_other"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="20dp" android:layout_marginStart="20dp"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
@@ -427,7 +424,7 @@
android:id="@+id/tv_other" android:id="@+id/tv_other"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginStart="10dp"
android:layout_marginEnd="245dp" android:layout_marginEnd="245dp"
android:text="其他任务列表" android:text="其他任务列表"
android:textColor="@color/black" android:textColor="@color/black"
@@ -458,7 +455,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="30dp" android:layout_marginStart="30dp"
android:text="审核通过:" android:text="审核通过:"
android:textSize="12sp" /> android:textSize="12sp" />
@@ -472,7 +469,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="30dp" android:layout_marginStart="30dp"
android:text="审核未通过:" android:text="审核未通过:"
android:textSize="12sp" /> android:textSize="12sp" />