修改bug
This commit is contained in:
parent
b8b70b1644
commit
c0ce706448
@ -3,14 +3,14 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.2'
|
||||
// ndkVersion '23.0.7123448'
|
||||
//ndkVersion '23.0.7123448'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.navinfo.outdoor"
|
||||
minSdkVersion 22
|
||||
targetSdkVersion 30
|
||||
versionCode 3
|
||||
versionName "3.0"
|
||||
versionCode 4
|
||||
versionName "4.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
lintOptions {
|
||||
|
@ -95,7 +95,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
private Polyline polyline;
|
||||
private String finalVideoPath; // 摄像后最终保存的文件名
|
||||
private ViewGroup layerChange; // 切换地图和相机的父控件
|
||||
private CheckBox capturePicture, cbMapType;//拍照
|
||||
private CheckBox capturePicture, cbMapType; //拍照
|
||||
private boolean isMapSlide = false;
|
||||
private boolean isOration = false;
|
||||
private SimpleDateFormat formatter;
|
||||
@ -137,12 +137,13 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
super.onCreate(savedInstanceState);
|
||||
SharedPreferences sharedPreferences = this.getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
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();
|
||||
sharedEdit.apply();
|
||||
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||
}else {
|
||||
if (pictures_time.equals(newFormat)){
|
||||
@ -594,8 +595,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) {
|
||||
|
@ -208,7 +208,7 @@ public class Constant {
|
||||
|
||||
public static TencentMap.OnMarkerClickListener markerClickListener=null;
|
||||
|
||||
public static final String NAVIN_FO="9.30";//版本
|
||||
public static final String NAVIN_FO="10.08";//版本日期
|
||||
/*联系我们的QQ群名称和QQ群号
|
||||
*/
|
||||
public static String REGION_JIG_NAME = "京津冀晋蒙-地图寻宝群";
|
||||
|
@ -277,12 +277,9 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
recyclerFilter.getDefaultFootView().setNoMoreHint("成功加载完毕");
|
||||
recyclerFilter.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
}
|
||||
|
||||
public void onRefresh() { }
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
}
|
||||
public void onLoadMore() { }
|
||||
});
|
||||
checkOk.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
|
@ -215,7 +215,6 @@ public class ForgetPawFragment extends BaseFragment implements View.OnClickListe
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
|
@ -82,7 +82,6 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
Log.d("TAG", "onSuccess: " + response.getMessage() + "");
|
||||
}
|
||||
|
||||
|
@ -76,14 +76,10 @@ public class MessageFragment extends BaseFragment implements View.OnClickListen
|
||||
|
||||
messageRecycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
|
||||
}
|
||||
public void onRefresh() { }
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
|
||||
}
|
||||
public void onLoadMore() { }
|
||||
});
|
||||
}
|
||||
private void initNetwork() {
|
||||
@ -131,9 +127,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListen
|
||||
case R.id.message_final:
|
||||
Objects.requireNonNull(getActivity()).finish();
|
||||
break;
|
||||
|
||||
case R.id.tv_read:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -95,9 +95,9 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
btnQuit.setOnClickListener(this);
|
||||
TextView mainGrade = (TextView) findViewById(R.id.main_grade);
|
||||
if (Constant.LEVEL != 0) {
|
||||
mainGrade.setText("LV."+Constant.LEVEL);
|
||||
mainGrade.setText("LV." + Constant.LEVEL);
|
||||
}
|
||||
if (Constant.USHERED!=null){
|
||||
if (Constant.USHERED != null) {
|
||||
initNetWork();
|
||||
}
|
||||
}
|
||||
@ -179,15 +179,15 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
||||
intentWithdraw.putExtra("tag", 15);
|
||||
startActivity(intentWithdraw);
|
||||
break;
|
||||
// Intent intentMap = new Intent(getActivity(), FragmentManagement.class);
|
||||
// intentMap.putExtra("tag", 19);
|
||||
// startActivity(intentMap);
|
||||
// Intent intentIssue = new Intent(getActivity(), FragmentManagement.class);
|
||||
// intentIssue.putExtra("tag", 20);
|
||||
// startActivity(intentIssue);
|
||||
// Intent intentSet = new Intent(getActivity(), FragmentManagement.class);
|
||||
// intentSet.putExtra("tag", 22);
|
||||
// startActivity(intentSet);
|
||||
/*Intent intentMap = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentMap.putExtra("tag", 19);
|
||||
startActivity(intentMap);
|
||||
Intent intentIssue = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentIssue.putExtra("tag", 20);
|
||||
startActivity(intentIssue);
|
||||
Intent intentSet = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentSet.putExtra("tag", 22);
|
||||
startActivity(intentSet);*/
|
||||
case R.id.rl_contact://联系我们
|
||||
Intent intentContact = new Intent(getActivity(), FragmentManagement.class);
|
||||
intentContact.putExtra("tag", 21);
|
||||
|
@ -181,11 +181,8 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
|
||||
}
|
||||
public void onNothingSelected(AdapterView<?> parent) {}
|
||||
});
|
||||
checkPot = findViewById(R.id.check_pot);
|
||||
checkPot.setOnClickListener(new View.OnClickListener() {
|
||||
@ -206,7 +203,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
checkPot.setTextColor(Color.WHITE);
|
||||
checkPot.setChecked(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bag);
|
||||
@ -266,10 +262,8 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
}
|
||||
public void onNothingSelected(AdapterView<?> parent) {}
|
||||
});
|
||||
//数据展示
|
||||
initShowPoi();
|
||||
@ -383,7 +377,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
linearExist.setVisibility(View.VISIBLE);
|
||||
spinnerExist.setSelection(showPoiEntity.getExistence(), true);
|
||||
}
|
||||
|
||||
String describe = showPoiEntity.getMemo();//任务描述
|
||||
if (describe != null && !describe.equals("")) {
|
||||
editOtherDescribe.setText(describe);
|
||||
@ -474,7 +467,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -506,7 +498,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
otherSaveByNetWork(poiEntity, isLocal);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}).start();
|
||||
// onBackPressed();
|
||||
@ -514,7 +505,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
Toast.makeText(getActivity(), "没有申请权限,请手动申请", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDenied(List<String> permissions, boolean never) {
|
||||
if (never) {
|
||||
@ -532,7 +522,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
Log.e("TAG", "poiUploadByNetWork: " + body + otherUploadList);
|
||||
return;
|
||||
}
|
||||
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("auditId", body);
|
||||
OkGoBuilder.getInstance()
|
||||
@ -546,7 +535,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
Objects.requireNonNull(getActivity()).onBackPressed();//回退
|
||||
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台上传中,请稍候...");
|
||||
WaitDialog.dismiss(3000);
|
||||
|
||||
}
|
||||
|
||||
private void otherSaveByNetWork(PoiEntity poiEntity, boolean isLocal) {
|
||||
@ -598,13 +586,11 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
}).start();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + poiSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
|
@ -485,6 +485,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();
|
||||
}
|
||||
|
||||
if (editNameContent.getText().toString() != null || editNameContent != null) {
|
||||
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
@ -497,6 +498,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "请输入名称", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.Uri;
|
||||
@ -138,7 +139,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
moveLatlng(latLng, null);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
@ -627,7 +627,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
if (!roadName.equals("")) {
|
||||
poiEntity.setName(roadName);
|
||||
} else {
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
|
||||
Calendar calendars = Calendar.getInstance();
|
||||
calendars.setTimeInMillis(System.currentTimeMillis());
|
||||
@ -656,6 +656,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
if (!desc.equals("")) {
|
||||
poiEntity.setMemo(desc);
|
||||
}
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(System.currentTimeMillis());
|
||||
|
@ -479,7 +479,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
onBackPressed();
|
||||
getActivity().onBackPressed();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -324,27 +324,30 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
}
|
||||
PoiDatabase roadDatabase = PoiDatabase.getInstance(getContext());
|
||||
PoiDao roadDao = roadDatabase.getPoiDao();
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<PoiEntity> roadAll = roadDao.getAllPoiByRecoded();
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
roadEntities.clear();
|
||||
roadEntities.addAll(roadAll);
|
||||
if (roadDao!=null){
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<PoiEntity> roadAll = roadDao.getAllPoiByRecoded();
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
roadEntities.clear();
|
||||
roadEntities.addAll(roadAll);
|
||||
// for (int i = 0; i < roadAll.size(); i++) {
|
||||
// if (roadAll.get(i).getType()!=6){
|
||||
// roadEntities.add(roadAll.get(i));
|
||||
// }
|
||||
// }
|
||||
Log.d("TAG", "run: " + roadEntities.toString());
|
||||
staySubmitAdapter.setAllRoad(roadEntities);
|
||||
staySubmitAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
Log.d("TAG", "run: " + roadEntities.toString());
|
||||
staySubmitAdapter.setAllRoad(roadEntities);
|
||||
staySubmitAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,5 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<string name="app_name">地图寻宝3.1</string>
|
||||
<string name="app_name">地图寻宝3</string>
|
||||
<string name="title_activity_home">HomeActivity</string>
|
||||
<!-- Strings used for fragments for navigation -->
|
||||
<string name="first_fragment_label">First Fragment</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user