修改刷新后数据不显示的问题
This commit is contained in:
parent
ae15085f30
commit
c0b0222f7d
@ -42,4 +42,5 @@ public class LinkActivity extends BaseActivity implements View.OnClickListener {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -64,7 +64,6 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
if (!EventBus.getDefault().isRegistered(this)) {//加上判断
|
||||
EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -278,11 +277,11 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
|
@ -142,7 +142,14 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.PICTURE_VIDEO_WORD;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
@Subscribe
|
||||
public void onEvent(Message data) { }
|
||||
|
||||
|
@ -155,7 +155,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
btnSwitch.setOnClickListener(this);
|
||||
//相机记录器
|
||||
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
||||
|
||||
ivZoomAdd = findViewById(R.id.iv_zoom_add);
|
||||
ivZoomAdd.setOnClickListener(this);
|
||||
ivZoomDel = findViewById(R.id.iv_zoom_del);
|
||||
@ -164,7 +163,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
ivLocation.setOnClickListener(this);
|
||||
camera = findViewById(R.id.camera);
|
||||
camera.setOnClickListener(this);
|
||||
ImageView imageView = findViewById(R.id.iv_image);
|
||||
ImageView imageView = findViewById(R.id.image_view);
|
||||
imageView.setOnClickListener(this);
|
||||
capturePicture = findViewById(R.id.capture_picture);
|
||||
if (poi_video_type == 2) {
|
||||
@ -315,7 +314,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
setResult(0x111, intent);
|
||||
finish();
|
||||
break;
|
||||
case R.id.iv_image:
|
||||
case R.id.image_view:
|
||||
benSwitch();
|
||||
break;
|
||||
case R.id.btn_switch:
|
||||
@ -409,7 +408,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
ivPicImage.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
//小图
|
||||
private void initMapBig() {
|
||||
isMapSlide = false;
|
||||
@ -418,7 +416,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
ivLocation.setVisibility(View.GONE);
|
||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
||||
}
|
||||
|
||||
//大图
|
||||
private void initMapShort() {
|
||||
isMapSlide = true;
|
||||
@ -451,7 +448,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
obtain.what = Constant.PICTURE_VIDEO_WORD;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -513,7 +509,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) {
|
||||
@ -527,7 +523,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
} else {
|
||||
if (oldCurrentLocation != null) {
|
||||
LatLng startLatLng = new LatLng(oldCurrentLocation.getLatitude(), oldCurrentLocation.getLongitude()); //旧的坐标,
|
||||
LatLng startLatLng = new LatLng(oldCurrentLocation.getLatitude(), oldCurrentLocation.getLongitude());//旧的坐标
|
||||
LatLng endLatLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());//新的坐标
|
||||
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);//米
|
||||
if (poi_video_type == 1) {
|
||||
@ -543,7 +539,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
oldCurrentLocation = Constant.currentLocation;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
public void initMarker() {
|
||||
@ -585,17 +581,14 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
|
||||
private void stopTimer() {
|
||||
|
||||
if (timer != null) {
|
||||
timer.cancel();
|
||||
timer = null;
|
||||
}
|
||||
|
||||
if (timerTask != null) {
|
||||
timerTask.cancel();
|
||||
timerTask = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -53,7 +53,6 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
private String region_id;
|
||||
private SharedPreferences.Editor navInfoEditor;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.activity_user;
|
||||
@ -198,10 +197,8 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
Toast.makeText(this, "此功能未开通", Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void netWork(HttpParams httpParams) {
|
||||
showLoadingDialog();
|
||||
OkGoBuilder.getInstance()
|
||||
@ -239,7 +236,6 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/*public static boolean isEmail(String email) {
|
||||
if (null == email || "".equals(email)) return false;
|
||||
Matcher m = compile.matcher(email);
|
||||
@ -288,22 +284,17 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
pvOptions.show();
|
||||
}
|
||||
|
||||
|
||||
private void initJsonData() {//解析数据 (省市区三级联动)
|
||||
/*
|
||||
* 注意:assets 目录下的Json文件仅供参考,实际使用可自行替换文件
|
||||
/* 注意:assets 目录下的Json文件仅供参考,实际使用可自行替换文件
|
||||
* 关键逻辑在于循环体
|
||||
*/
|
||||
String JsonData = new GetJsonDataUtil().getJson(UserActivity.this, "prov_city_county.json");//获取assets目录下的json文件数据
|
||||
ArrayList<JsonBean> jsonBean = parseData(JsonData);//用GOON 转成实体
|
||||
|
||||
/*
|
||||
* 添加省份数据
|
||||
/* 添加省份数据
|
||||
* 注意:如果是添加的JavaBean实体,则实体类需要实现 IPickerViewData 接口,
|
||||
* PickerView会通过getPickerViewText方法获取字符串显示出来。
|
||||
*/
|
||||
options1Items = jsonBean;
|
||||
|
||||
for (int i = 0; i < jsonBean.size(); i++) {//遍历省份
|
||||
ArrayList<String> CityList = new ArrayList<>();//该省的城市列表(第二级)
|
||||
ArrayList<ArrayList<CityBean>> city_AreaList = new ArrayList<>();//该省的所有地区列表(第三级)
|
||||
@ -327,12 +318,10 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
Province_AreaList.add(City_AreaList);//添加该省所有地区数据
|
||||
city_AreaList.add(AreaList);//添加该省所有地区数据的bean
|
||||
}
|
||||
/*
|
||||
* 添加城市数据
|
||||
/*添加城市数据
|
||||
*/
|
||||
options2Items.add(CityList);
|
||||
/*
|
||||
* 添加地区数据
|
||||
/* 添加地区数据
|
||||
*/
|
||||
options3Items.add(Province_AreaList);
|
||||
cityItems.add(city_AreaList);
|
||||
@ -354,5 +343,4 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
return detail;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -32,9 +32,6 @@ import cn.jzvd.JzvdStd;
|
||||
*/
|
||||
public class VideoActivity extends BaseActivity implements View.OnClickListener {
|
||||
|
||||
private String videoPath;
|
||||
private JzvdStd jzvdStd;
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
return R.layout.activity_video;
|
||||
@ -43,8 +40,8 @@ public class VideoActivity extends BaseActivity implements View.OnClickListener
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
videoPath = getIntent().getStringExtra("video");
|
||||
jzvdStd = findViewById(R.id.jz_video);
|
||||
String videoPath = getIntent().getStringExtra("video");
|
||||
JzvdStd jzvdStd = findViewById(R.id.jz_video);
|
||||
ImageView imageVideo = findViewById(R.id.iv_video);
|
||||
imageVideo.setOnClickListener(this);
|
||||
jzvdStd.setUp(videoPath,"", Jzvd.SCREEN_NORMAL);
|
||||
|
@ -24,7 +24,7 @@ public class Constant {
|
||||
*/
|
||||
public static final CharSequence NETWORK_UNAVAILABLE = "当前网络不可用,请检查网络设置";
|
||||
|
||||
/**
|
||||
/*
|
||||
* 位置权限
|
||||
*/
|
||||
public static final String SET_LOCATION_PERMISSION = "请在“设置”中给予“TengXunMap”位置权限,否则当前功能将不可使用";
|
||||
@ -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.23";//版本
|
||||
public static final String NAVIN_FO="9.24";//版本
|
||||
|
||||
/**
|
||||
* 联系我们的QQ群名称和QQ群号
|
||||
|
@ -102,21 +102,20 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
||||
@Override
|
||||
public void onSuccess(MeasureBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
|
||||
//单选
|
||||
List<MeasureBean.BodyBean.MultiChoiceBean> multiChoice = response.getBody().getMultiChoice();
|
||||
if (multiChoice != null) {
|
||||
if (response.getBody().getMultiChoice() != null) {
|
||||
List<MeasureBean.BodyBean.MultiChoiceBean> multiChoice = response.getBody().getMultiChoice();
|
||||
for (int i = 0; i < multiChoice.size(); i++) {
|
||||
baleen.add(new BolBean(multiChoice.get(i).getId(), multiChoice.get(i).getQuestion(), multiChoice.get(i).getOption(), true));
|
||||
examId = multiChoice.get(i).getExamId();
|
||||
}
|
||||
}
|
||||
//多选
|
||||
List<MeasureBean.BodyBean.SingleChoiceBean> singleChoice1 = response.getBody().getSingleChoice();
|
||||
if (singleChoice1 != null) {
|
||||
for (int i = 0; i < singleChoice1.size(); i++) {
|
||||
baleen.add(new BolBean(singleChoice1.get(i).getId(), singleChoice1.get(i).getQuestion(), singleChoice1.get(i).getOption(), false));
|
||||
examId = singleChoice1.get(i).getExamId();
|
||||
if (response.getBody().getSingleChoice() != null) {
|
||||
List<MeasureBean.BodyBean.SingleChoiceBean> singleChoice = response.getBody().getSingleChoice();
|
||||
for (int i = 0; i < singleChoice.size(); i++) {
|
||||
baleen.add(new BolBean(singleChoice.get(i).getId(), singleChoice.get(i).getQuestion(), singleChoice.get(i).getOption(), false));
|
||||
examId = singleChoice.get(i).getExamId();
|
||||
}
|
||||
}
|
||||
if (baleen != null) {
|
||||
|
@ -840,8 +840,10 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
|
||||
@Subscribe
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.CHARGING_PILE_WORD) {
|
||||
latLng = (LatLng) data.obj;
|
||||
if (data.what == Constant.PICTURE_VIDEO_WORD) {
|
||||
if ((boolean) data.obj) {
|
||||
initPileSharePre();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -686,6 +686,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void initRemovePileSharePre() {
|
||||
|
||||
//获取SharedPreferences对象,方法中两个参数的意思为:第一个name
|
||||
@ -729,9 +730,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
|
||||
@Subscribe
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.CHARGING_STATION_WORD) { // 移动充电站点位
|
||||
latLng = (LatLng) data.obj;
|
||||
} else if (data.what == Constant.CHARGING_PILE_STATION) { // 新增充电桩
|
||||
if (data.what == Constant.CHARGING_PILE_STATION) { // 新增充电桩
|
||||
ChargingPileEntity chargingPileEntity = (ChargingPileEntity) data.obj;
|
||||
List<ChargingPileEntity> currentChargingPileList = chargingPileAdapter.getChargingPileEntities();
|
||||
m:
|
||||
@ -751,6 +750,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
chargingPileAdapter.notifyDataSetChanged();
|
||||
} else if (data.what == Constant.PILE_MARKER_SHOW) {
|
||||
initPileMarkerShow();
|
||||
}else if (data.what == Constant.PICTURE_VIDEO_WORD) {
|
||||
if ((boolean) data.obj) {
|
||||
initStationSharePre();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1015,6 +1018,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
poiEntity.setTaskStatus(2);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -1462,7 +1466,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
poiEntity.setCreateTime(format);
|
||||
poiEntity.setExistence(existence);
|
||||
poiEntity.setType(2);
|
||||
poiEntity.setTaskStatus(2);
|
||||
return poiEntity;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,8 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
if (!hidden) {
|
||||
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
|
||||
if (slidingPaneLayout != null) {
|
||||
slidingPaneLayout.setScrollableView(recyclerFilter); }
|
||||
slidingPaneLayout.setScrollableView(recyclerFilter);
|
||||
}
|
||||
initHeader();
|
||||
}
|
||||
}
|
||||
@ -92,7 +93,8 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
Bundle arguments = getArguments();
|
||||
if (arguments != null) {
|
||||
isSliding = arguments.getBoolean("isSliding", true);
|
||||
Log.d("TAG", "onCaress's: " + isSliding); }
|
||||
Log.d("TAG", "onCaress's: " + isSliding);
|
||||
}
|
||||
if (isSliding) {
|
||||
// 监听到返回按钮点击事件
|
||||
Message obtain = Message.obtain();
|
||||
@ -131,7 +133,8 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
if (allPoi != null) {
|
||||
for (int i = 0; i < allPoi.size(); i++) {
|
||||
if (allPoi.get(i).getTaskStatus() == 0 || allPoi.get(i).getTaskStatus() == 1) {
|
||||
poiEntities.add(allPoi.get(i)); }
|
||||
poiEntities.add(allPoi.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
filterAdapter.setAllPoi(poiEntities);
|
||||
@ -263,7 +266,9 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
recyclerFilter.setAdapter(filterAdapter);
|
||||
recyclerFilter.setScrollAlphaChangeListener(new XRecyclerView.ScrollAlphaChangeListener() {
|
||||
@Override
|
||||
public void onAlphaChange(int alpha) {}
|
||||
public void onAlphaChange(int alpha) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int setLimitHeight() {
|
||||
return 0;
|
||||
@ -272,9 +277,12 @@ 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
|
||||
@ -304,8 +312,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
public void item(PoiEntity poiEntity, boolean isChockBox) {
|
||||
if (isChockBox) {
|
||||
btnChock.add(poiEntity);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
for (int i = 0; i < btnChock.size(); i++) {
|
||||
if (poiEntity.getId().equals(btnChock.get(i).getId())) {
|
||||
btnChock.remove(poiEntity);
|
||||
@ -342,10 +349,12 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
obtain.what = Constant.TREASURE_FRAGMENT;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
|
||||
Message obtains = Message.obtain();
|
||||
obtains.what = Constant.JOB_WORD_MONITOR;
|
||||
obtains.obj = true;
|
||||
EventBus.getDefault().post(obtains);
|
||||
|
||||
onBackPressed();
|
||||
break;
|
||||
case R.id.cl_number:
|
||||
@ -458,12 +467,14 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
case 2:
|
||||
Constant.TASK_STARTUP = 1;
|
||||
break;
|
||||
/* case 3:
|
||||
/*
|
||||
case 3:
|
||||
Constant.TASK_STATUS = 2;
|
||||
break;
|
||||
case 4:
|
||||
Constant.TASK_STATUS = 3;
|
||||
break;*/
|
||||
break;
|
||||
*/
|
||||
}
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
|
@ -57,6 +57,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
private ImageView gatheringCamera;
|
||||
private ArrayList<BankPathBean> jsonBean;
|
||||
private String value;
|
||||
private SharedPreferences.Editor navInfoEditor;
|
||||
|
||||
public static GatheringFragment newInstance(Bundle bundle) {
|
||||
GatheringFragment fragment = new GatheringFragment();
|
||||
@ -74,7 +75,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
SharedPreferences navInfo = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.SHARED_PREFERENCES, Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor navInfoEditor = navInfo.edit();
|
||||
navInfoEditor = navInfo.edit();
|
||||
ImageView ivGathering = findViewById(R.id.iv_gathering);
|
||||
ivGathering.setOnClickListener(this);
|
||||
ImageView imageBank = findViewById(R.id.iv_bank);
|
||||
@ -90,19 +91,16 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
if (Constant.NAME != null) {
|
||||
tvName.setText(Constant.NAME);
|
||||
}
|
||||
/*
|
||||
String bankAccount = navInfo.getString("bankAccount", null);
|
||||
String bank = navInfo.getString("bankName", null);
|
||||
String idNumber = navInfo.getString("idNumber", null);
|
||||
if (bankAccount!=null&&!bankAccount.equals("")&&bank!=null&&!bank.equals("")&&idNumber!=null&&!idNumber.equals("")){
|
||||
etBankNum.setText(idNumber);
|
||||
tvBank.setText(bank);
|
||||
value=bankAccount;
|
||||
btnBank.setText("重新绑定");
|
||||
}*/
|
||||
if (Constant.ID_NUMBER != null && Constant.BACKGROUND_NAME != null && Constant.BACKGROUND != null) {
|
||||
if (Constant.ID_NUMBER != null && Constant.BACKGROUND != null) {
|
||||
etBankNum.setText(Constant.ID_NUMBER);
|
||||
tvBank.setText(Constant.BACKGROUND_NAME);
|
||||
if (Constant.BACKGROUND_NAME==null){
|
||||
String bank = navInfo.getString("bankName", null);
|
||||
if (bank!=null&&!bank.equals("")){
|
||||
tvBank.setText(bank);
|
||||
}
|
||||
}else {
|
||||
tvBank.setText(Constant.BACKGROUND_NAME);
|
||||
}
|
||||
value = Constant.BACKGROUND;
|
||||
btnBank.setText("重新绑定");
|
||||
}
|
||||
@ -252,6 +250,10 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
Constant.BACKGROUND = value;
|
||||
Constant.BACKGROUND_NAME = bank;
|
||||
Constant.ID_NUMBER = etBankAccount;
|
||||
navInfoEditor.putString("bankAccount", value);
|
||||
navInfoEditor.putString("idNumber", etBankAccount);
|
||||
navInfoEditor.putString("bankName",bank);
|
||||
navInfoEditor.commit();
|
||||
getActivity().finish();
|
||||
return false;
|
||||
}
|
||||
|
@ -322,8 +322,10 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
|
||||
@Subscribe
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.OTHER_WORD) {
|
||||
latLng = (LatLng) data.obj;
|
||||
if (data.what == Constant.PICTURE_VIDEO_WORD) {
|
||||
if ((boolean) data.obj) {
|
||||
initOtherSharePre();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -502,6 +504,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
poiEntity.setTaskStatus(2);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -775,7 +778,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
poiEntity.setCreateTime(format);
|
||||
poiEntity.setExistence(existence);
|
||||
poiEntity.setType(5);
|
||||
poiEntity.setTaskStatus(2);
|
||||
return poiEntity;
|
||||
}
|
||||
|
||||
|
@ -573,7 +573,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onEvent(Message data) { }
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.PICTURE_VIDEO_WORD) {
|
||||
if ((boolean) data.obj) {
|
||||
initPoiSharePre();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -752,6 +758,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
poiEntity.setTaskStatus(2);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -1072,7 +1079,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
poiEntity.setCreateTime(format);
|
||||
poiEntity.setExistence(existence);
|
||||
poiEntity.setType(1);
|
||||
poiEntity.setTaskStatus(2);
|
||||
return poiEntity;
|
||||
}
|
||||
|
||||
|
@ -74,9 +74,9 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
tvTaskTitle.setText("其他任务列表");
|
||||
break;
|
||||
}
|
||||
ImageView ivPoiTaskFinish = (ImageView) findViewById(R.id.iv_poiTask_finish);
|
||||
ImageView ivPoiTaskFinish = findViewById(R.id.iv_poiTask_finish);
|
||||
ivPoiTaskFinish.setOnClickListener(this);
|
||||
poiTaskXrv = (XRecyclerView) findViewById(R.id.poiTask_xrv);
|
||||
poiTaskXrv = findViewById(R.id.poiTask_xrv);
|
||||
poiTaskXrv.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
poiTaskXrv.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
poiTaskXrv.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
@ -95,7 +95,6 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
poiTaskAdapter = new PoiTaskAdapter(getContext(), listBeans);
|
||||
poiTaskXrv.setAdapter(poiTaskAdapter);
|
||||
poiTaskAdapter.notifyDataSetChanged();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -339,23 +339,44 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
@Override
|
||||
public void run() {
|
||||
ZipUtil.zipFiles(videoFileList, fileZip, null);
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.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(poiDaoPoiEntity.getBodyId(), fileZip);
|
||||
Constant.isPresent=false;
|
||||
}
|
||||
});
|
||||
if (showPoiEntity.getId()==null){
|
||||
if (showPoiEntity == null || 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;
|
||||
}
|
||||
});
|
||||
}
|
||||
}else {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.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(poiDaoPoiEntity.getBodyId(), fileZip);
|
||||
Constant.isPresent=false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
@ -384,6 +405,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
poiEntity.setTaskStatus(2);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -554,11 +576,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
super.onDestroyView();
|
||||
if (showPoiEntity != null) {
|
||||
if (showPoiEntity.getTaskStatus() == 5) {
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);//结束领取
|
||||
|
||||
} else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
@ -661,7 +680,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
String format = formatter.format(calendar.getTime());
|
||||
poiEntity.setCreateTime(format);
|
||||
poiEntity.setType(3);
|
||||
poiEntity.setTaskStatus(2);
|
||||
if (fmPoiVideoPic.getTag() == null) {
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
if (fileListByUUID != null) {
|
||||
|
@ -182,7 +182,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
initShowPoi();
|
||||
//禁用可操作性控件
|
||||
// disables();
|
||||
|
||||
}
|
||||
|
||||
private void initShowPoi() {
|
||||
@ -344,25 +343,45 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
@Override
|
||||
public void run() {
|
||||
ZipUtil.zipFiles(videoFileList, fileZip, null);//压缩
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
initPoiSaveLocal(true);
|
||||
}
|
||||
});
|
||||
if (showPoiEntity.getId()==null){
|
||||
if (showPoiEntity == null || 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;
|
||||
}
|
||||
});
|
||||
}
|
||||
}else {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.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(poiDaoPoiEntity.getBodyId(), fileZip);
|
||||
Constant.isPresent = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiVideoUpload(poiDaoPoiEntity.getBodyId(), fileZip);
|
||||
Constant.isPresent = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}).start();
|
||||
} else {
|
||||
@ -391,6 +410,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
Toast.makeText(getActivity(), poiCheckResult.getMsg() + "", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
poiEntity.setTaskStatus(2);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -670,7 +690,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
String format = formatter.format(calendar.getTime());
|
||||
poiEntity.setCreateTime(format);
|
||||
poiEntity.setType(4);
|
||||
poiEntity.setTaskStatus(2);
|
||||
if (fmRoadPic.getTag() == null) {
|
||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||
if (fileListByUUID != null) {
|
||||
|
@ -293,8 +293,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
sharedEdit = sharedPreferences.edit();
|
||||
//fragment 管理器
|
||||
supportFragmentManager = Objects.requireNonNull(getActivity()).getSupportFragmentManager();
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
builder = new AlertDialog.Builder(Objects.requireNonNull(getActivity()));
|
||||
sliding_layout = findViewById(R.id.sliding_layout);
|
||||
frameLayout = findViewById(R.id.frame_layout);
|
||||
@ -366,6 +364,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
tencentMap.animateCamera(cameraSigma, new TencentMap.CancelableCallback() {
|
||||
@Override
|
||||
public void onFinish() {
|
||||
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
|
||||
poiDao = poiDatabase.getPoiDao();
|
||||
refreshFilterData();
|
||||
//上传用户位置金纬度
|
||||
iniUserLocation();
|
||||
|
@ -3,18 +3,15 @@ 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";//正式接口
|
||||
public static final String IP_TEXT = "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
|
||||
public static final String IP_TEXT = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
|
||||
|
||||
|
||||
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 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";//接口*/
|
||||
/* 用户版本升级
|
||||
|
@ -57,7 +57,10 @@ public class PoiSaveUtils {
|
||||
* 批量上传数据到服务端
|
||||
*/
|
||||
public void uploadPoiEntityBatch(List<PoiEntity> poiEntityList) {
|
||||
if (poiEntityList == null || poiEntityList.isEmpty()) {
|
||||
if (poiEntityList == null) {
|
||||
return;
|
||||
}
|
||||
if (poiEntityList.size()==0){
|
||||
return;
|
||||
}
|
||||
anInt = 0;
|
||||
@ -295,6 +298,7 @@ public class PoiSaveUtils {
|
||||
if (execute.code() != 200) {
|
||||
return;
|
||||
}
|
||||
assert execute.body() != null;
|
||||
String bodyStr = execute.body().string();
|
||||
if (bodyStr == null) {
|
||||
return;
|
||||
|
@ -154,16 +154,15 @@
|
||||
style="@style/login_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginBottom="261dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/btn_login"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/et_login_paw"
|
||||
app:layout_constraintStart_toStartOf="@+id/et_login_paw"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_statement" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_login_check"
|
||||
app:layout_constraintVertical_bias="0.20" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_view"
|
||||
|
@ -47,9 +47,9 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_default="percent"
|
||||
app:layout_constraintWidth_percent="0.4" />
|
||||
</FrameLayout>
|
||||
</FrameLayout>
|
||||
<ImageView
|
||||
android:id="@+id/iv_image"
|
||||
android:id="@+id/image_view"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="157dp"
|
||||
app:layout_constraintHeight_default="percent"
|
||||
|
@ -216,7 +216,6 @@
|
||||
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"
|
||||
|
@ -220,13 +220,14 @@
|
||||
style="@style/login_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="50dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:gravity="center"
|
||||
android:text="提交"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_forgetPaw_confirm_paw" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_forgetPaw_confirm_paw"
|
||||
app:layout_constraintVertical_bias="0.20" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -276,12 +276,14 @@
|
||||
style="@style/login_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="35dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_marginEnd="35dp"
|
||||
android:gravity="center"
|
||||
android:text="注册"
|
||||
app:layout_constraintLeft_toLeftOf="@id/iv_register_check"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_register_check" />
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_register_check"
|
||||
app:layout_constraintVertical_bias="0.20" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
x
Reference in New Issue
Block a user