From ae15085f30a46647b69f8eb30f12cd652bff9ad4 Mon Sep 17 00:00:00 2001 From: wangdongsheng <wds811@126.com> Date: Thu, 23 Sep 2021 16:13:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outdoor/activity/PictureActivity.java | 18 +++--- .../outdoor/activity/PicturesActivity.java | 11 ++-- .../com/navinfo/outdoor/api/Constant.java | 2 +- .../navinfo/outdoor/base/BaseMVPActivity.java | 3 +- .../outdoor/fragment/HasSubmitFragment.java | 50 +++++++-------- .../navinfo/outdoor/fragment/PoiFragment.java | 28 +-------- .../outdoor/fragment/TreasureFragment.java | 7 +-- .../navinfo/outdoor/http/HttpInterface.java | 12 ++-- .../com/navinfo/outdoor/room/PoiDatabase.java | 3 +- .../navinfo/outdoor/ui/view/ContactView.java | 10 +-- .../com/navinfo/outdoor/util/ToastUtil.java | 63 ++----------------- app/src/main/res/layout/fragment_filter.xml | 1 + .../main/res/layout/fragment_has_submit.xml | 53 ++++++++-------- 13 files changed, 90 insertions(+), 171 deletions(-) diff --git a/app/src/main/java/com/navinfo/outdoor/activity/PictureActivity.java b/app/src/main/java/com/navinfo/outdoor/activity/PictureActivity.java index 757b9df..7483929 100644 --- a/app/src/main/java/com/navinfo/outdoor/activity/PictureActivity.java +++ b/app/src/main/java/com/navinfo/outdoor/activity/PictureActivity.java @@ -9,6 +9,7 @@ import android.content.Intent; import android.content.pm.ActivityInfo; import android.graphics.Bitmap; import android.graphics.BitmapFactory; +import android.graphics.Color; import android.graphics.Matrix; import android.os.Bundle; import android.os.Handler; @@ -33,6 +34,7 @@ import com.navinfo.outdoor.base.BaseActivity; import com.navinfo.outdoor.room.PoiEntity; import com.navinfo.outdoor.util.AWMp4ParserHelper; +import com.navinfo.outdoor.util.Geohash; import com.navinfo.outdoor.util.GeometryTools; import com.navinfo.outdoor.util.MyTecentLocationSource; import com.otaliastudios.cameraview.CameraException; @@ -392,11 +394,11 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene layoutParamsMap.width = dm.heightPixels / 3; ivMap.setLayoutParams(layoutParamsMap); } - private void initLine() { - String geo = poiEntity.getGeoWkt(); - Geometry geometry = GeometryTools.createGeometry(geo); - if (geometry != 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录像 @@ -405,13 +407,14 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows); } List<LatLng> latLineString = GeometryTools.getLatLags(geo); + // 构造 PolylineOnions - PolylineOptions polylineOptions = new PolylineOptions() - .addAll(latLineString) + PolylineOptions polylineOptions + = new PolylineOptions().addAll(latLineString) // 折线设置圆形线头 .lineCap(true) // 折线的颜色为绿色 - .color(0xff00ff00) + .color(Color.parseColor("#0096FF")) // 折线宽度为5像素 .width(20) .arrow(true) @@ -424,7 +427,6 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene } } - // 将秒转化成小时分钟秒 private String formatMiss(long miss) { String hh = miss / 3600 > 9 ? miss / 3600 + "" : "0" + miss / 3600; diff --git a/app/src/main/java/com/navinfo/outdoor/activity/PicturesActivity.java b/app/src/main/java/com/navinfo/outdoor/activity/PicturesActivity.java index 2e78e4e..3aacd7e 100644 --- a/app/src/main/java/com/navinfo/outdoor/activity/PicturesActivity.java +++ b/app/src/main/java/com/navinfo/outdoor/activity/PicturesActivity.java @@ -135,9 +135,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen poi_video_type = getIntent().getIntExtra(Constant.INTENT_POI_VIDEO_TYPE, -1); oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1); finalVideoPath = getIntent().getStringExtra(Constant.INTENT_JPG_PATH); - assert finalVideoPath != null; - File file = new File(finalVideoPath); - paperFile = new File(Objects.requireNonNull(file.getParentFile()).getAbsoluteFile() + "/" + "paper.txt"); + if (finalVideoPath!=null){ + File file = new File(finalVideoPath); + paperFile = new File(Objects.requireNonNull(file.getParentFile()).getAbsoluteFile() + "/" + "paper.txt"); + } } formatter = new SimpleDateFormat("yyyyMMdd HHmmss"); this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); @@ -512,7 +513,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();//米/秒 + /* float speed = Constant.currentLocation.getSpeed();//米/秒 if (speed != 0) { float a = (speed * 3600 / 1000);//km/h if (poi_video_type == 1) { @@ -542,7 +543,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen } } oldCurrentLocation = Constant.currentLocation; - } + }*/ } public void initMarker() { diff --git a/app/src/main/java/com/navinfo/outdoor/api/Constant.java b/app/src/main/java/com/navinfo/outdoor/api/Constant.java index 714a78c..04d81af 100644 --- a/app/src/main/java/com/navinfo/outdoor/api/Constant.java +++ b/app/src/main/java/com/navinfo/outdoor/api/Constant.java @@ -186,7 +186,7 @@ public class Constant { public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重 public static TencentMap.OnMarkerClickListener markerClickListener=null; - public static final String NAVIN_FO="9.22";//版本 + public static final String NAVIN_FO="9.23";//版本 /** * 联系我们的QQ群名称和QQ群号 diff --git a/app/src/main/java/com/navinfo/outdoor/base/BaseMVPActivity.java b/app/src/main/java/com/navinfo/outdoor/base/BaseMVPActivity.java index f39ad1e..4b2d57a 100644 --- a/app/src/main/java/com/navinfo/outdoor/base/BaseMVPActivity.java +++ b/app/src/main/java/com/navinfo/outdoor/base/BaseMVPActivity.java @@ -9,7 +9,8 @@ public abstract class BaseMVPActivity <P extends BasePresenter,V extends BaseVie presenter= initMVPPresenter(); if (presenter!=null){ presenter.setView(initMVPView()); - } } + } + } protected abstract V initMVPView(); diff --git a/app/src/main/java/com/navinfo/outdoor/fragment/HasSubmitFragment.java b/app/src/main/java/com/navinfo/outdoor/fragment/HasSubmitFragment.java index d94bf1c..0b54990 100644 --- a/app/src/main/java/com/navinfo/outdoor/fragment/HasSubmitFragment.java +++ b/app/src/main/java/com/navinfo/outdoor/fragment/HasSubmitFragment.java @@ -28,11 +28,9 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe private TextView auditProcess; private TextView auditThrough; private TextView auditNotThrough; - private TextView tvCharging; private TextView chargingAuditProcess; private TextView chargingAuditThrough; private TextView chargingAuditNotThrough; - private TextView tvRoad; private TextView roadAuditProcess; private TextView roadAuditThrough; private TextView roadAuditNotThrough; @@ -41,7 +39,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe private TextView otherAuditNotThrough; private TextView poiVideoAuditProcess; private TextView poiVideoAuditThrough; - private TextView poiVideoAuditProcessableNotThrough; + private TextView poiVideoAuditProcessAbleNotThrough; private int hasPage; public static HasSubmitFragment newInstance(Bundle bundle) { @@ -57,35 +55,35 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe protected void initView() { super.initView(); - ConstraintLayout clPoi = (ConstraintLayout) findViewById(R.id.cl_poi); + ConstraintLayout clPoi = findViewById(R.id.cl_poi); clPoi.setOnClickListener(this); - auditProcess = (TextView) findViewById(R.id.audit_process); - auditThrough = (TextView) findViewById(R.id.audit_through); - auditNotThrough = (TextView) findViewById(R.id.audit_not_through); + auditProcess = findViewById(R.id.audit_process); + auditThrough = findViewById(R.id.audit_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); - roadAuditProcess = (TextView) findViewById(R.id.road_audit_process); - roadAuditThrough = (TextView) findViewById(R.id.road_audit_through); - roadAuditNotThrough = (TextView) findViewById(R.id.road_audit_not_through); - ConstraintLayout clCharging = (ConstraintLayout) findViewById(R.id.cl_charging); + roadAuditProcess = findViewById(R.id.road_audit_process); + roadAuditThrough = findViewById(R.id.road_audit_through); + roadAuditNotThrough = findViewById(R.id.road_audit_not_through); + + ConstraintLayout clCharging = findViewById(R.id.cl_charging); clCharging.setOnClickListener(this); - chargingAuditProcess = (TextView) findViewById(R.id.charging_audit_process); - chargingAuditThrough = (TextView) findViewById(R.id.charging_audit_through); - chargingAuditNotThrough = (TextView) findViewById(R.id.charging_audit_not_through); + chargingAuditProcess = findViewById(R.id.charging_audit_process); + chargingAuditThrough = findViewById(R.id.charging_audit_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); - otherAuditProcess = (TextView) findViewById(R.id.other_audit_process); - otherAuditThrough = (TextView) findViewById(R.id.other_audit_through); - otherAuditNotThrough = (TextView) findViewById(R.id.other_audit_not_through); + otherAuditProcess = findViewById(R.id.other_audit_process); + otherAuditThrough = findViewById(R.id.other_audit_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); - TextView tvPoiVideo = (TextView) findViewById(R.id.tv_poiVideo); - poiVideoAuditProcess = (TextView) findViewById(R.id.poiVideo_audit_process); - poiVideoAuditThrough = (TextView) findViewById(R.id.poiVideo_audit_through); - poiVideoAuditProcessableNotThrough = (TextView) findViewById(R.id.poiVideo_audit_processaudit_not_through); + poiVideoAuditProcess = findViewById(R.id.poiVideo_audit_process); + poiVideoAuditThrough = findViewById(R.id.poiVideo_audit_through); + poiVideoAuditProcessAbleNotThrough = findViewById(R.id.poiVideo_audit_process_audit_not_through); initRequest(); } @@ -235,7 +233,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe if (hasSubmitBeanBody != null) { poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + ""); poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount() + ""); - poiVideoAuditProcessableNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + ""); + poiVideoAuditProcessAbleNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + ""); hasPage++; } } else { @@ -281,8 +279,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe } else { Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show(); } - - } @Override diff --git a/app/src/main/java/com/navinfo/outdoor/fragment/PoiFragment.java b/app/src/main/java/com/navinfo/outdoor/fragment/PoiFragment.java index 575ac3a..e2d9121 100644 --- a/app/src/main/java/com/navinfo/outdoor/fragment/PoiFragment.java +++ b/app/src/main/java/com/navinfo/outdoor/fragment/PoiFragment.java @@ -128,7 +128,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe if (!EventBus.getDefault().isRegistered(this)) {//加上判断 EventBus.getDefault().register(this); } - } @Override @@ -189,7 +188,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe checkBoxLife.setTextColor(Color.WHITE); checkBoxLife.setChecked(true); } - @Override public void onCancel() { 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); NestedScrollView nestedScrollView = findViewById(R.id.nested_scroll_view); if (slidingPaneLayout != null) { @@ -250,7 +247,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe rlElse.setOnClickListener(this); linearExist = findViewById(R.id.linear_exist); spinnerExist = findViewById(R.id.spinner_exist); - ArrayAdapter<String> adapterExist = new ArrayAdapter<>(Objects.requireNonNull(getContext()), android.R.layout.simple_spinner_item, spinner); adapterExist.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //设置下拉列表框的下拉选项样式 spinnerExist.setAdapter(adapterExist); @@ -269,10 +265,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe break; } } - @Override - public void onNothingSelected(AdapterView<?> parent) { - } + public void onNothingSelected(AdapterView<?> parent) { } }); //数据展示 initShowPoi(); @@ -282,7 +276,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe //拍照长按删除 private void onLongDel() { - rlPanorama.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { @@ -297,8 +290,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe return false; } }); - - rlName.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { @@ -372,12 +363,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe if (name != null && !name.equals("")) { editNameContent.setText(name); } - String address = showPoiEntity.getAddress();//地址 if (address != null && !address.equals("")) { editSiteContent.setText(address); } - String geoWkt = showPoiEntity.getGeoWkt(); if (geoWkt!=null){ String geo = Geohash.getInstance().decode(geoWkt); @@ -410,7 +399,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe moveLatlng(latLng, null); } } - //得到区号 initPhone(); String memo = showPoiEntity.getMemo();//任务描述 @@ -459,7 +447,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe } else { poiBeans.add(new PhoneBean("电话", "", Constant.CODE, R.drawable.icon_add_bg)); } - } contactView = new ContactView(getActivity(), linearContact, poiBeans); contactView.resetView(); @@ -485,7 +472,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe Glide.with(Objects.requireNonNull(getActivity())).load(photo).into(ivCard); tvCard.setTag(photo); } 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); } } @@ -505,8 +492,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe } else { Toast.makeText(getActivity(), "请输入名称", Toast.LENGTH_SHORT).show(); } - - } /** @@ -550,7 +535,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe } } } - @Override public void onError(Throwable e, int id) { dismissLoadingDialog(); @@ -586,13 +570,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe super.initData(); //存储手机号对象 poiBeans = new ArrayList<>(); - } @Subscribe - public void onEvent(Message data) { - - } + public void onEvent(Message data) { } @Override public void onClick(View v) { @@ -625,7 +606,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe } else { poiPicList.add(new File(tagName)); } - String tagInternal = (String) tvInternal.getTag(); if (tagInternal != null) { poiPicList.add(new File(tagInternal)); @@ -877,8 +857,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe } else { Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show(); } - - } @Override diff --git a/app/src/main/java/com/navinfo/outdoor/fragment/TreasureFragment.java b/app/src/main/java/com/navinfo/outdoor/fragment/TreasureFragment.java index eb06bd0..57cc17b 100644 --- a/app/src/main/java/com/navinfo/outdoor/fragment/TreasureFragment.java +++ b/app/src/main/java/com/navinfo/outdoor/fragment/TreasureFragment.java @@ -194,7 +194,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen initMessageNotice(); } else { 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.setTimeInMillis(System.currentTimeMillis()); String presentData = formatter.format(calendar.getTime());//当前时间 @@ -223,7 +223,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen * @param 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; try { date = format.parse(day); @@ -233,13 +233,11 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen if (date == null) return ""; System.out.println("front:" + format.format(date)); //显示输入的日期 - Log.d("TAGss", "addDateMinut: " + format.format(date)); Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(Calendar.HOUR, hour);// 24小时制 date = cal.getTime(); System.out.println("after:" + format.format(date)); //显示更新后的日期 - Log.d("TAGss", "addDateMinut: " + format.format(date)); cal = null; return format.format(date); } @@ -299,7 +297,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen poiDao = poiDatabase.getPoiDao(); builder = new AlertDialog.Builder(Objects.requireNonNull(getActivity())); sliding_layout = findViewById(R.id.sliding_layout); - LinearLayout dragView = findViewById(R.id.dragView); frameLayout = findViewById(R.id.frame_layout); ivRaffish = findViewById(R.id.iv_refrish); ivRaffish.setOnClickListener(this); diff --git a/app/src/main/java/com/navinfo/outdoor/http/HttpInterface.java b/app/src/main/java/com/navinfo/outdoor/http/HttpInterface.java index d4d564d..2aaab5b 100644 --- a/app/src/main/java/com/navinfo/outdoor/http/HttpInterface.java +++ b/app/src/main/java/com/navinfo/outdoor/http/HttpInterface.java @@ -3,16 +3,20 @@ package com.navinfo.outdoor.http; import com.navinfo.outdoor.api.Constant; public class HttpInterface { - public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口T - public static final String DATA_IP = "http://172.23.139.4:9999/m4";//接口 + public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/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 MSG_LIST_PATH = "/msgList/";//发现 public static final String USER_LOGIN_PATH = "/userlogin/";//登录 public static final String PRICE_PATH = "/price/";//提现 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 diff --git a/app/src/main/java/com/navinfo/outdoor/room/PoiDatabase.java b/app/src/main/java/com/navinfo/outdoor/room/PoiDatabase.java index d3ed104..a1b4d8a 100644 --- a/app/src/main/java/com/navinfo/outdoor/room/PoiDatabase.java +++ b/app/src/main/java/com/navinfo/outdoor/room/PoiDatabase.java @@ -51,7 +51,8 @@ public abstract class PoiDatabase extends RoomDatabase { private static Migration migration_1_2 = new Migration(1, 2) { @Override 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");//添加了一个 } }; diff --git a/app/src/main/java/com/navinfo/outdoor/ui/view/ContactView.java b/app/src/main/java/com/navinfo/outdoor/ui/view/ContactView.java index fc5811c..7c52d87 100644 --- a/app/src/main/java/com/navinfo/outdoor/ui/view/ContactView.java +++ b/app/src/main/java/com/navinfo/outdoor/ui/view/ContactView.java @@ -69,7 +69,7 @@ public class ContactView { if (poiBean.getPhone() == null) { holder.editPhoneNumber.setText(""); } else { - holder.editPhoneNumber.setText(poiBean.getPhone() + ""); + holder.editPhoneNumber.setText(poiBean.getPhone()); } holder.editPhoneNumber.addTextChangedListener(new TextWatcher() { @@ -102,8 +102,6 @@ public class ContactView { /** * 添加数据 - * - * @return */ public View addRootView() { PhoneBean poiBean = null; @@ -127,7 +125,6 @@ public class ContactView { }); holder.editPhoneNumber.setText(poiBean.getPhone()); holder.editPhoneNumber.addTextChangedListener(new TextWatcher() { - @Override public void onTextChanged(CharSequence s, int start, int before, int count) { //正在输入 @@ -137,7 +134,6 @@ public class ContactView { } else { holder.llPoi.setVisibility(View.VISIBLE); } - } @Override @@ -154,8 +150,6 @@ public class ContactView { /** * 获取数据 - * - * @return */ public List<PhoneBean> getPoiBeanListByRootView() { ArrayList<PhoneBean> poiBeans = new ArrayList<>(); @@ -178,8 +172,6 @@ public class ContactView { /** * 检验数据 - * - * @return */ public boolean getPhoneBean() { List<PhoneBean> list = getPoiBeanListByRootView(); diff --git a/app/src/main/java/com/navinfo/outdoor/util/ToastUtil.java b/app/src/main/java/com/navinfo/outdoor/util/ToastUtil.java index f9573e4..09babe5 100644 --- a/app/src/main/java/com/navinfo/outdoor/util/ToastUtil.java +++ b/app/src/main/java/com/navinfo/outdoor/util/ToastUtil.java @@ -23,8 +23,6 @@ public class ToastUtil { /** * 全局控制是否显示Toast - * - * @param isShowToast */ public static void controlShow(boolean isShowToast) { isShow = isShowToast; @@ -41,9 +39,6 @@ public class ToastUtil { /** * 短时间显示Toast - * - * @param context - * @param message */ @SuppressLint("ShowToast") public static void showShort(Context context, CharSequence message) { @@ -59,9 +54,7 @@ public class ToastUtil { /** * 短时间显示Toast - * - * @param context - * @param resId 资源ID:getResources().getString(R.string.xxxxxx); + * @param resId 资源ID:getResources().getString(R.string); */ @SuppressLint("ShowToast") public static void showShort(Context context, int resId) { @@ -77,9 +70,6 @@ public class ToastUtil { /** * 长时间显示Toast - * - * @param context - * @param message */ @SuppressLint("ShowToast") public static void showLong(Context context, CharSequence message) { @@ -95,9 +85,7 @@ public class ToastUtil { /** * 长时间显示Toast - * - * @param context - * @param resId 资源ID:getResources().getString(R.string.xxxxxx); + * @param resId 资源ID:getResources().getString(R.string); */ @SuppressLint("ShowToast") public static void showLong(Context context, int resId) { @@ -113,9 +101,6 @@ public class ToastUtil { /** * 自定义显示Toast时间 - * - * @param context - * @param message * @param duration 单位:毫秒 */ @SuppressLint("ShowToast") @@ -132,9 +117,7 @@ public class ToastUtil { /** * 自定义显示Toast时间 - * - * @param context - * @param resId 资源ID:getResources().getString(R.string.xxxxxx); + * @param resId 资源ID:getResources().getString(R.string); * @param duration 单位:毫秒 */ @SuppressLint("ShowToast") @@ -151,9 +134,6 @@ public class ToastUtil { /** * 自定义Toast的View - * - * @param context - * @param message * @param duration 单位:毫秒 * @param view 显示自己的View */ @@ -172,15 +152,9 @@ public class ToastUtil { } } - /** + /* * 自定义Toast的位置 - * - * @param context - * @param message * @param duration 单位:毫秒 - * @param gravity - * @param xOffset - * @param yOffset */ @SuppressLint("ShowToast") public static void customToastGravity(Context context, CharSequence message, int duration, int gravity, int xOffset, int yOffset) { @@ -195,16 +169,9 @@ public class ToastUtil { } } - /** + /* * 自定义带图片和文字的Toast,最终的效果就是上面是图片,下面是文字 - * - * @param context - * @param message * @param iconResId 图片的资源id,如:R.drawable.icon - * @param duration - * @param gravity - * @param xOffset - * @param yOffset */ @SuppressLint("ShowToast") 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 - * - * @param context - * @param message - * @param duration - * @param view * @param isGravity true,表示后面的三个布局参数生效,false,表示不生效 - * @param gravity - * @param xOffset - * @param yOffset * @param isMargin true,表示后面的两个参数生效,false,表示不生效 - * @param horizontalMargin - * @param verticalMargin + */ @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) { @@ -261,18 +219,9 @@ public class ToastUtil { /** * 自定义Toast,针对类型resId - * - * @param context - * @param resId - * @param duration * @param view :应该是一个布局,布局中包含了自己设置好的内容 * @param isGravity true,表示后面的三个布局参数生效,false,表示不生效 - * @param gravity - * @param xOffset - * @param yOffset * @param isMargin true,表示后面的两个参数生效,false,表示不生效 - * @param horizontalMargin - * @param verticalMargin */ @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) { diff --git a/app/src/main/res/layout/fragment_filter.xml b/app/src/main/res/layout/fragment_filter.xml index cb39509..4992eef 100644 --- a/app/src/main/res/layout/fragment_filter.xml +++ b/app/src/main/res/layout/fragment_filter.xml @@ -216,6 +216,7 @@ android:id="@+id/rl_draw" android:layout_width="match_parent" android:layout_height="50dp" + android:visibility="gone" android:background="@drawable/road_shape" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layout/fragment_has_submit.xml b/app/src/main/res/layout/fragment_has_submit.xml index 7f2a7b2..c2d06f3 100644 --- a/app/src/main/res/layout/fragment_has_submit.xml +++ b/app/src/main/res/layout/fragment_has_submit.xml @@ -11,7 +11,7 @@ android:id="@+id/cl_poi" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="20dp" + android:layout_marginStart="20dp" android:layout_marginTop="20dp" app:layout_constraintTop_toTopOf="parent"> @@ -31,7 +31,7 @@ android:id="@+id/tv_poi" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="10dp" + android:layout_marginStart="10dp" android:text="POI任务列表" android:textColor="@color/black" app:layout_constraintLeft_toRightOf="@id/iv_poi" @@ -62,7 +62,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="30dp" + android:layout_marginStart="30dp" android:text="审核通过:" android:textSize="12sp" /> @@ -76,7 +76,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="30dp" + android:layout_marginStart="30dp" android:text="审核未通过:" android:textSize="12sp" /> @@ -102,7 +102,7 @@ android:layout_width="match_parent" android:layout_height="1dp" android:layout_marginTop="20dp" - android:layout_marginRight="10dp" + android:layout_marginEnd="10dp" android:background="@color/colormap" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" @@ -113,7 +113,7 @@ android:id="@+id/cl_poiVideo" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="20dp" + android:layout_marginStart="20dp" android:layout_marginTop="20dp" app:layout_constraintTop_toTopOf="parent"> @@ -125,7 +125,6 @@ android:layout_marginBottom="20dp" android:background="@drawable/marker_poi_video_bg1" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toStartOf="@+id/tv_poiVideo" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -133,7 +132,7 @@ android:id="@+id/tv_poiVideo" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="10dp" + android:layout_marginStart="10dp" android:text="POI录像任务列表" android:textColor="@color/black" app:layout_constraintLeft_toRightOf="@id/iv_poiVideo" @@ -164,7 +163,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="30dp" + android:layout_marginStart="30dp" android:text="审核通过:" android:textSize="12sp" /> @@ -178,12 +177,12 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="30dp" + android:layout_marginStart="30dp" android:text="审核未通过:" android:textSize="12sp" /> <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_height="wrap_content" android:text="18" @@ -204,7 +203,7 @@ android:layout_width="match_parent" android:layout_height="1dp" android:layout_marginTop="20dp" - android:layout_marginRight="10dp" + android:layout_marginEnd="10dp" android:background="@color/colormap" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" @@ -216,7 +215,7 @@ android:id="@+id/cl_road" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="20dp" + android:layout_marginStart="20dp" app:layout_constraintTop_toTopOf="parent"> <ImageView @@ -233,7 +232,7 @@ android:id="@+id/tv_road" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="10dp" + android:layout_marginStart="10dp" android:text="道路任务列表" android:textColor="@color/black" app:layout_constraintLeft_toRightOf="@id/iv_road" @@ -264,7 +263,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="30dp" + android:layout_marginStart="30dp" android:text="审核通过:" android:textSize="12sp" /> @@ -278,7 +277,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="30dp" + android:layout_marginStart="30dp" android:text="审核未通过:" android:textSize="12sp" /> @@ -304,7 +303,7 @@ android:layout_width="match_parent" android:layout_height="1dp" android:layout_marginTop="20dp" - android:layout_marginRight="10dp" + android:layout_marginEnd="10dp" android:background="@color/colormap" app:layout_constraintTop_toBottomOf="@+id/iv_road" /> </androidx.constraintlayout.widget.ConstraintLayout> @@ -313,7 +312,7 @@ android:id="@+id/cl_charging" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="20dp" + android:layout_marginStart="20dp" > <ImageView @@ -329,7 +328,7 @@ android:id="@+id/tv_charging" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="10dp" + android:layout_marginStart="10dp" android:text="充电站任务列表" android:textColor="@color/black" app:layout_constraintLeft_toRightOf="@id/iv_charging" @@ -359,7 +358,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="30dp" + android:layout_marginStart="30dp" android:text="审核通过:" android:textSize="12sp" /> @@ -373,7 +372,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="30dp" + android:layout_marginStart="30dp" android:text="审核未通过:" android:textSize="12sp" /> @@ -388,7 +387,6 @@ <ImageView android:id="@+id/imageView3" android:layout_width="wrap_content" - android:layout_height="wrap_content" android:src="@drawable/icon_arrow_right" app:layout_constraintBottom_toBottomOf="@id/iv_charging" @@ -400,7 +398,7 @@ android:layout_width="match_parent" android:layout_height="1dp" android:layout_marginTop="20dp" - android:layout_marginRight="10dp" + android:layout_marginEnd="10dp" android:background="@color/colormap" app:layout_constraintTop_toBottomOf="@+id/iv_charging" /> </androidx.constraintlayout.widget.ConstraintLayout> @@ -409,8 +407,7 @@ android:id="@+id/cl_other" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="20dp" - + android:layout_marginStart="20dp" app:layout_constraintTop_toTopOf="parent"> <ImageView @@ -427,7 +424,7 @@ android:id="@+id/tv_other" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="10dp" + android:layout_marginStart="10dp" android:layout_marginEnd="245dp" android:text="其他任务列表" android:textColor="@color/black" @@ -458,7 +455,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="30dp" + android:layout_marginStart="30dp" android:text="审核通过:" android:textSize="12sp" /> @@ -472,7 +469,7 @@ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="30dp" + android:layout_marginStart="30dp" android:text="审核未通过:" android:textSize="12sp" />