修改UI界面问题,任务marker编辑点位问题,任务领取maker消失问题,内容管理APP显示问题
This commit is contained in:
@@ -3,7 +3,7 @@ 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"
|
||||
|
||||
@@ -29,7 +29,6 @@ import com.lzy.okgo.model.Response;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseActivity;
|
||||
import com.navinfo.outdoor.bean.BankPhoneBean;
|
||||
import com.navinfo.outdoor.bean.CityBean;
|
||||
import com.navinfo.outdoor.bean.JsonBean;
|
||||
import com.navinfo.outdoor.bean.UserBean;
|
||||
@@ -180,7 +179,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
boolean isQQNum_matcher = userqq.matches("[1-9][0-9]{4,14}");
|
||||
// 邮箱匹配结果
|
||||
boolean isEmail_matcher = usermailbox.matches( "^[\\w-\\+]+(\\.[\\w]+)*@[\\w-]+(\\.[\\w]+)*(\\.[a-z]{2,})$");
|
||||
//&& userqq.length() < 11 && userqq.length() > 5
|
||||
//userqq.length() < 11 && userqq.length() > 5
|
||||
if (TextUtils.isEmpty(userphone) || TextUtils.isEmpty(userqq) || TextUtils.isEmpty(usermailbox)|| TextUtils.isEmpty(region_id)) {
|
||||
if (region_id == null || region_id.equals("")) {
|
||||
Toast.makeText(this, "所在地区为空,请重新输入", Toast.LENGTH_SHORT).show();
|
||||
@@ -195,22 +194,21 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
|
||||
}else {
|
||||
httpParams.put("mobile",userphone);
|
||||
}
|
||||
if (userqq.equals("")) {
|
||||
if (!userqq.equals("")&&userqq!=null) {
|
||||
if (!isQQNum_matcher) {
|
||||
Toast.makeText(this, "QQ号输入错误", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}else {
|
||||
httpParams.put("qq",userqq);
|
||||
}
|
||||
return;
|
||||
}else {
|
||||
httpParams.put("qq",userqq);
|
||||
}
|
||||
if (!usermailbox.equals("")){
|
||||
if (!usermailbox.equals("")&&usermailbox!=null){
|
||||
if (!isEmail_matcher) {
|
||||
Toast.makeText(this, "邮箱格式错误", Toast.LENGTH_SHORT).show();
|
||||
}else {
|
||||
// httpParams.put("qq",userqq); //邮箱
|
||||
}
|
||||
return;
|
||||
}else {
|
||||
// httpParams.put("qq",userqq);
|
||||
}
|
||||
}
|
||||
netWork(httpParams);
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
package com.navinfo.outdoor.activity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@@ -11,26 +8,14 @@ import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||
import com.kongzue.dialog.util.BaseDialog;
|
||||
import com.kongzue.dialog.util.DialogSettings;
|
||||
import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.api.UserApplication;
|
||||
import com.navinfo.outdoor.base.BaseActivity;
|
||||
|
||||
import com.navinfo.outdoor.bean.RichTextBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -91,7 +76,6 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||
Toast.makeText(WebActivity.this, response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
@@ -100,7 +84,6 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()){
|
||||
|
||||
@@ -22,18 +22,14 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CapacityEvaluationAdapter extends RecyclerView.Adapter<CapacityEvaluationAdapter.ViewHolder> {
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> capacityList = new ArrayList<>();
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> capacityList ;
|
||||
private Context context;
|
||||
|
||||
public CapacityEvaluationAdapter(Context context) {
|
||||
public CapacityEvaluationAdapter(List<TaskPrefectureBean.BodyBean.ListBean> capacityList, Context context) {
|
||||
this.capacityList = capacityList;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public void setCapacityList(List<TaskPrefectureBean.BodyBean.ListBean> capacityList) {
|
||||
this.capacityList.addAll(capacityList);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
@@ -17,18 +17,14 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class EventPrefectureAdapter extends RecyclerView.Adapter<EventPrefectureAdapter.ViewHolder> {
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeans=new ArrayList<>();
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeans;
|
||||
private Context context;
|
||||
|
||||
public EventPrefectureAdapter(Context context) {
|
||||
public EventPrefectureAdapter(List<TaskPrefectureBean.BodyBean.ListBean> dataBeans, Context context) {
|
||||
this.dataBeans = dataBeans;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public void setDataBeans(List<TaskPrefectureBean.BodyBean.ListBean> dataBeans) {
|
||||
this.dataBeans.addAll(dataBeans);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
@@ -21,18 +21,14 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TaskExplainAdapter extends RecyclerView.Adapter<TaskExplainAdapter.ViewHolder> {
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> explainList = new ArrayList<>();
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> explainList ;
|
||||
private Context context;
|
||||
|
||||
public TaskExplainAdapter(Context context) {
|
||||
public TaskExplainAdapter(List<TaskPrefectureBean.BodyBean.ListBean> explainList, Context context) {
|
||||
this.explainList = explainList;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public void setExplainList(List<TaskPrefectureBean.BodyBean.ListBean> explainList) {
|
||||
this.explainList.addAll(explainList);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
@@ -17,18 +17,14 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TaskPrefectureAdapter extends RecyclerView.Adapter<TaskPrefectureAdapter.ViewHolder> {
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeans=new ArrayList<>();
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeans;
|
||||
private Context context;
|
||||
|
||||
public TaskPrefectureAdapter(Context context) {
|
||||
public TaskPrefectureAdapter(List<TaskPrefectureBean.BodyBean.ListBean> dataBeans, Context context) {
|
||||
this.dataBeans = dataBeans;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public void setDataBeans(List<TaskPrefectureBean.BodyBean.ListBean> dataBeans) {
|
||||
this.dataBeans.addAll(dataBeans);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
@@ -35,6 +35,7 @@ public class Constant {
|
||||
public static final String GET_ERR_MESSAGE2 = "manifest 中配置的 key 不正确";
|
||||
public static final String GET_ERR_MESSAGE3 = "自动加载libtencentloc.so失败";
|
||||
|
||||
|
||||
public static String BASE_FOLDER = SdkFolderCreate.getSDPath() + "/navinfoOutDoor";
|
||||
// 保存图片的目录
|
||||
public static String PICTURE_FOLDER;
|
||||
@@ -104,11 +105,11 @@ public class Constant {
|
||||
public static final int TREASURE_CHECKED_WORD = 40;//poi 对地图页面marker 的一个展示 确定
|
||||
public static final int CAPACITY_EVALUATION_PAGE = 1;//能力测评的页数
|
||||
public static final int POI_WORD = 2;//地图页面marker 的经纬都回传
|
||||
public static final int ORIGINAL_MARKER_WORD =4 ;//記錄原先的點擊marker
|
||||
public static final int FILTER_LIST_ITEM = 5;//点击筛选的item
|
||||
public static final int GATHER_GET = 6;//点击开始采集
|
||||
public static final int TREASURE_GATHER_GET_WORD = 7;//领取采集页面其他marker 的回传
|
||||
public static final int MAIN_BUTTON_VISIABLE = 8; // 控制主界面各个按钮显隐状态的what值
|
||||
public static final int UN_POLY_GEN_TASK = 9; // 面妆任务的立即采集
|
||||
public static final int POI_DRAWER = 10; //设置每个页面显示屏幕的位置
|
||||
public static final int GATHER_GET_RETURN = 11;//参加领取的返回
|
||||
public static final int MAIN_CHARGING_STATION = 13;//充电站的Fragment 对地图页面marker 的一个展示 编辑
|
||||
|
||||
@@ -92,7 +92,7 @@ public abstract class BaseFragment extends Fragment implements FragmentBackHandl
|
||||
Message message = new Message();
|
||||
message.obj = view;
|
||||
message.what = 0x200;
|
||||
handler.sendMessageDelayed(message, 500);
|
||||
handler.sendMessageDelayed(message, 1000);
|
||||
}
|
||||
|
||||
protected abstract int getLayout();
|
||||
|
||||
31
app/src/main/java/com/navinfo/outdoor/bean/BaseBean.java
Normal file
31
app/src/main/java/com/navinfo/outdoor/bean/BaseBean.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package com.navinfo.outdoor.bean;
|
||||
|
||||
public class BaseBean<T> {
|
||||
private Integer code;
|
||||
private String message;
|
||||
private T body;
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public T getBody() {
|
||||
return body;
|
||||
}
|
||||
|
||||
public void setBody(T body) {
|
||||
this.body = body;
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ import com.umeng.umcrash.UMCrash;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发现-能力测评
|
||||
@@ -38,7 +39,7 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
private XRecyclerView capacityEvaluationRecycler;
|
||||
private CapacityEvaluationAdapter capacityEvaluationAdapter;
|
||||
private int capacityPage = 1;
|
||||
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> capacityList ;
|
||||
|
||||
public static CapacityEvaluationFragment newInstance(Bundle bundle) {
|
||||
CapacityEvaluationFragment fragment = new CapacityEvaluationFragment();
|
||||
@@ -54,28 +55,29 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
|
||||
ivEvaluationTaskFinish = findViewById(R.id.iv_evaluation_task_finish);
|
||||
capacityEvaluationRecycler = findViewById(R.id.capacity_evaluation_recycler);
|
||||
ivEvaluationTaskFinish.setOnClickListener(this::onClick);
|
||||
capacityEvaluationRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
capacityEvaluationRecycler.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
||||
capacityEvaluationRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
capacityEvaluationRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
//取消上拉加载,刷新功能
|
||||
// capacityEvaluationRecycler.setPullRefreshEnabled(false);
|
||||
// capacityEvaluationRecycler.setLoadingMoreEnabled(false);
|
||||
capacityEvaluationAdapter = new CapacityEvaluationAdapter(getActivity());
|
||||
// capacityEvaluationRecycler.setPullRefreshEnabled(false);
|
||||
// capacityEvaluationRecycler.setLoadingMoreEnabled(false);
|
||||
capacityEvaluationAdapter = new CapacityEvaluationAdapter(capacityList,getActivity());
|
||||
capacityEvaluationRecycler.setAdapter(capacityEvaluationAdapter);
|
||||
capacityEvaluationRecycler.getDefaultFootView().setNoMoreHint("加载成功");
|
||||
capacityEvaluationRecycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
|
||||
capacityPage=1;
|
||||
initNewWork(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
|
||||
initNewWork(false);
|
||||
}
|
||||
});
|
||||
capacityEvaluationAdapter.setOnCapacityClick(new CapacityEvaluationAdapter.OnCapacityClick() {
|
||||
@@ -92,11 +94,11 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
|
||||
initNewWork();
|
||||
capacityList=new ArrayList<>();
|
||||
initNewWork(true);
|
||||
}
|
||||
|
||||
private void initNewWork() {
|
||||
private void initNewWork(boolean aNet) {
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("fid", "4");
|
||||
@@ -113,8 +115,8 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200){
|
||||
capacityEvaluationAdapter.setCapacityList(response.getBody().getList());
|
||||
capacityPage++;
|
||||
initTaskPrefectureBean(response,aNet);
|
||||
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -136,7 +138,35 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initTaskPrefectureBean(TaskPrefectureBean taskPrefectureBean, boolean aBoolean) {
|
||||
if (taskPrefectureBean.getCode() == 200) {
|
||||
if (aBoolean) {
|
||||
if (capacityList.size() > 0) {
|
||||
capacityList.clear();
|
||||
}
|
||||
if (taskPrefectureBean.getBody().getList()== null) {
|
||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
capacityList.addAll(taskPrefectureBean.getBody().getList());
|
||||
capacityPage++;
|
||||
}
|
||||
capacityEvaluationAdapter.notifyDataSetChanged();
|
||||
capacityEvaluationRecycler.refreshComplete();
|
||||
} else {
|
||||
if (taskPrefectureBean.getBody().getList() == null) {
|
||||
capacityEvaluationRecycler.setNoMore(true);
|
||||
} else {
|
||||
capacityList.addAll(taskPrefectureBean.getBody().getList());
|
||||
capacityEvaluationAdapter.notifyDataSetChanged();
|
||||
capacityEvaluationRecycler.loadMoreComplete();
|
||||
capacityPage++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
|
||||
@@ -112,19 +112,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
private String station;
|
||||
private LatLng latLng;
|
||||
private File file;
|
||||
private String takePhotoPath1;
|
||||
private String takePhotoPath2;
|
||||
private String takePhotoPath3;
|
||||
private String takePhotoPath4;
|
||||
private String takePhotoPath5;
|
||||
private String takePhotoPath6;
|
||||
private String takePhotoPath7;
|
||||
private String takePhotoPath8;
|
||||
private String takePhotoPath9;
|
||||
private String takePhotoPath10;
|
||||
private int taskId;
|
||||
private Integer chargingPileBody;
|
||||
private ArrayList<File> phoneLists;
|
||||
private NestedScrollView nestedScrollView;
|
||||
private Marker markerPile;
|
||||
private Point screenPilePositions;
|
||||
@@ -201,6 +188,8 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
moveLatlng(latLng, new TencentMap.CancelableCallback() {
|
||||
@Override
|
||||
public void onFinish() {
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
|
||||
markerPile.setIcon(pileDescriptor);
|
||||
screenPilePositions = tencentMap.getProjection().toScreenLocation(latLng);
|
||||
//创建Marker对象之前,设置属性
|
||||
if (markerPile != null) {
|
||||
@@ -213,12 +202,16 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_gray_chang_pile);
|
||||
markerPile.setIcon(pileDescriptor);
|
||||
checkBoxLife.setText("编辑");
|
||||
checkBoxLife.setTextColor(Color.BLACK);
|
||||
checkBoxLife.setChecked(false);
|
||||
}
|
||||
});
|
||||
}else {
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_gray_chang_pile);
|
||||
markerPile.setIcon(pileDescriptor);
|
||||
checkBoxLife.setText("编辑");
|
||||
checkBoxLife.setTextColor(Color.BLACK);
|
||||
latLng = tencentMap.getProjection().fromScreenLocation(screenPilePositions);
|
||||
@@ -602,7 +595,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
if (station != null) {
|
||||
PoiEntity showPoiEntity = new Gson().fromJson(station, PoiEntity.class);
|
||||
pid = showPoiEntity.getId();
|
||||
taskId = showPoiEntity.getTaskId();
|
||||
}
|
||||
// 添加信息:
|
||||
chargingPileEntity = (ChargingPileEntity) getArguments().getSerializable("chargingPileEntity");
|
||||
@@ -611,13 +603,12 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
if (name != null) {
|
||||
tvNameContent.setText(name + "");
|
||||
}
|
||||
|
||||
String p = chargingPileEntity.getP();
|
||||
if (p != null) {
|
||||
// 解密geo
|
||||
String decodeGeometry = Geohash.getInstance().decode(p);
|
||||
latLng = GeometryTools.createLatLng(decodeGeometry);
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_gray_chang_pile);
|
||||
markerPile = tencentMap.addMarker(new MarkerOptions(latLng).icon(pileDescriptor).anchor(0.5f,1.0f));
|
||||
markerPile.setZIndex(4);
|
||||
moveLatlng(latLng, null);
|
||||
@@ -713,8 +704,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* private void initPileMarker(LatLng latLng) {
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
|
||||
if (markerPile == null) {
|
||||
@@ -1082,21 +1071,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
tvPanorama.setTag(s);
|
||||
}
|
||||
file = null;
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intent, 101);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 102 && resultCode == RESULT_OK) {
|
||||
if (file == null || !file.exists()) {
|
||||
Toast.makeText(getActivity(), "没有拍摄照片", Toast.LENGTH_SHORT).show();
|
||||
@@ -1107,21 +1081,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
tvCoding.setTag(s);
|
||||
}
|
||||
file = null;
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intent, 102);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 103 && resultCode == RESULT_OK) {
|
||||
if (file == null || !file.exists()) {
|
||||
Toast.makeText(getActivity(), "没有拍摄照片", Toast.LENGTH_SHORT).show();
|
||||
@@ -1133,21 +1092,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
}
|
||||
file = null;
|
||||
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intent, 103);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 104 && resultCode == RESULT_OK) {
|
||||
if (file == null || !file.exists()) {
|
||||
Toast.makeText(getActivity(), "没有拍摄照片", Toast.LENGTH_SHORT).show();
|
||||
@@ -1158,21 +1102,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
tvFacility.setTag(s);
|
||||
}
|
||||
file = null;
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intent, 104);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 105 && resultCode == RESULT_OK) {
|
||||
if (file == null || !file.exists()) {
|
||||
Toast.makeText(getActivity(), "没有拍摄照片", Toast.LENGTH_SHORT).show();
|
||||
@@ -1184,21 +1114,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
}
|
||||
file = null;
|
||||
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intent, 105);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 106 && resultCode == RESULT_OK) {
|
||||
if (file == null || !file.exists()) {
|
||||
Toast.makeText(getActivity(), "没有拍摄照片", Toast.LENGTH_SHORT).show();
|
||||
@@ -1210,21 +1125,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
}
|
||||
|
||||
file = null;
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intent, 106);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 107 && resultCode == RESULT_OK) {
|
||||
if (file == null || !file.exists()) {
|
||||
Toast.makeText(getActivity(), "没有拍摄照片", Toast.LENGTH_SHORT).show();
|
||||
@@ -1235,21 +1136,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
tvUsable.setTag(s);
|
||||
}
|
||||
file = null;
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intent, 107);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 108 && resultCode == RESULT_OK) {
|
||||
if (file == null || !file.exists()) {
|
||||
Toast.makeText(getActivity(), "没有拍摄照片", Toast.LENGTH_SHORT).show();
|
||||
@@ -1260,21 +1147,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
tvAvailable.setTag(s);
|
||||
}
|
||||
file = null;
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intent, 108);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 109 && resultCode == RESULT_OK) {
|
||||
if (file == null || !file.exists()) {
|
||||
Toast.makeText(getActivity(), "没有拍摄照片", Toast.LENGTH_SHORT).show();
|
||||
@@ -1285,21 +1158,7 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
tvParking.setTag(s);
|
||||
}
|
||||
file = null;
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intent, 109);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
} else if (requestCode == 110 && resultCode == RESULT_OK) {
|
||||
if (file == null || !file.exists()) {
|
||||
Toast.makeText(getActivity(), "没有拍摄照片", Toast.LENGTH_SHORT).show();
|
||||
@@ -1310,21 +1169,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
|
||||
tvNumber.setTag(s);
|
||||
}
|
||||
file = null;
|
||||
/* int height = bitmap.getHeight();
|
||||
int width = bitmap.getWidth();
|
||||
if (height > width) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "请重新拍照,要求横屏拍照", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
|
||||
startActivityForResult(intent, 110);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.bean.PhoneBean;
|
||||
import com.navinfo.outdoor.bean.PoiUploadBean;
|
||||
import com.navinfo.outdoor.bean.TaskNameBean;
|
||||
import com.navinfo.outdoor.bean.UnPolygonTaskBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
@@ -100,19 +101,17 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
private EditText editDescribe;
|
||||
private RelativeLayout rlPanorama, rlName, rlInternalPhotos, rlElse, rlScutcheon, rlNull;
|
||||
private ImageView ivPanorama, ivName, ivInternal, ivElse, ivScutcheon;
|
||||
private TextView tvExamine;
|
||||
private TextView tvPanorama, tvNamePic, tvInternal, tvElse, tvScutcheon;
|
||||
private TextView tvExamine, tvPanorama, tvNamePic, tvInternal, tvElse, tvScutcheon;
|
||||
private EditText editNameContent, editSiteContent;
|
||||
private ArrayList<PhoneBean> poiBeans;
|
||||
private Button btnSaveLocal;
|
||||
private Button btnUploading;
|
||||
private Button btnSaveLocal, btnUploading;
|
||||
private PoiDatabase poiDatabase;
|
||||
private PoiDao poiDao;
|
||||
private CheckBox checkBoxLife;
|
||||
private CheckBox checkBoxRight;
|
||||
private CheckBox checkBoxLife,checkBoxRight;
|
||||
private Spinner spinnerType;
|
||||
String[] ctype = new String[]{"充电站", "充换电站", "充电桩组", "换电站"};//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 ,
|
||||
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
||||
|
||||
private int existence = 0;
|
||||
private ArrayAdapter<String> adapter;
|
||||
private LinearLayout linearChargingPile;
|
||||
@@ -156,7 +155,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
slidingPaneLayout.setScrollableView(nestedScrollView);
|
||||
}
|
||||
initHeader();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +243,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
rlInternalPhotos = findViewById(R.id.rl_internal_photos);
|
||||
rlInternalPhotos.setOnClickListener(this::onClick);
|
||||
rlNull = findViewById(R.id.rl_null);
|
||||
|
||||
rlElse = findViewById(R.id.rl_else);
|
||||
rlElse.setOnClickListener(this::onClick);
|
||||
rlScutcheon = findViewById(R.id.rl_scutcheon);
|
||||
@@ -284,6 +281,8 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
moveLatlng(latLng, new TencentMap.CancelableCallback() {
|
||||
@Override
|
||||
public void onFinish() {
|
||||
BitmapDescriptor stationDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
|
||||
markerStation.setIcon(stationDescriptor);
|
||||
screenStationPositions = tencentMap.getProjection().toScreenLocation(latLng);
|
||||
//创建Marker对象之前,设置属性
|
||||
if (markerStation != null) {
|
||||
@@ -293,15 +292,18 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
checkBoxLife.setTextColor(Color.WHITE);
|
||||
checkBoxLife.setChecked(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
BitmapDescriptor stationDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bags);
|
||||
markerStation.setIcon(stationDescriptor);
|
||||
checkBoxLife.setText("编辑");
|
||||
checkBoxLife.setTextColor(Color.BLACK);
|
||||
checkBoxLife.setChecked(false);
|
||||
}
|
||||
});
|
||||
}else {
|
||||
BitmapDescriptor stationDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bags);
|
||||
markerStation.setIcon(stationDescriptor);
|
||||
checkBoxLife.setText("编辑");
|
||||
checkBoxLife.setTextColor(Color.BLACK);
|
||||
latLng = tencentMap.getProjection().fromScreenLocation(screenStationPositions);
|
||||
@@ -332,10 +334,8 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
case 3:
|
||||
station_type = 4;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
}
|
||||
@@ -364,7 +364,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
existence = 1;
|
||||
break;
|
||||
case 2:
|
||||
|
||||
rlInternalPhotos.setVisibility(View.GONE);
|
||||
rlElse.setVisibility(View.GONE);
|
||||
rlScutcheon.setVisibility(View.GONE);
|
||||
@@ -373,15 +372,12 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
}
|
||||
});
|
||||
|
||||
//数据展示
|
||||
initShowPoi();
|
||||
|
||||
onLongDelPic();
|
||||
}
|
||||
|
||||
@@ -494,13 +490,12 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
latLng = new LatLng();
|
||||
latLng.setLatitude(Double.parseDouble(y));
|
||||
latLng.setLongitude(Double.parseDouble(x));
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
|
||||
markerStation = tencentMap.addMarker(new MarkerOptions(latLng).icon(pileDescriptor).anchor(0.5f,1.0f));
|
||||
BitmapDescriptor stationDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bags);
|
||||
markerStation = tencentMap.addMarker(new MarkerOptions(latLng).icon(stationDescriptor).anchor(0.5f,1.0f));
|
||||
markerStation.setZIndex(4);
|
||||
moveLatlng(latLng,null);
|
||||
}
|
||||
initPhone();
|
||||
|
||||
String describe = showPoiEntity.getMemo();//任务描述
|
||||
if (describe != null && !describe.equals("")) {
|
||||
editDescribe.setText(describe);
|
||||
@@ -515,7 +510,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}else if (station_type==4){
|
||||
spinnerType.setSelection(3, true);
|
||||
}
|
||||
|
||||
String telPhone = showPoiEntity.getTelPhone();
|
||||
if (telPhone != null && !telPhone.equals("")&&!telPhone.equals("null")) {
|
||||
String[] phones = telPhone.split("\\|");
|
||||
@@ -1246,6 +1240,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
dismissLoadingDialog();
|
||||
if (taskNameBean.getCode()==200){
|
||||
editNameContent.setTextColor(Color.BLACK);
|
||||
btnSaveLocal.setEnabled(true);
|
||||
btnUploading.setEnabled(true);
|
||||
List<String> body = taskNameBean.getBody();
|
||||
if (body!=null){
|
||||
for (int i = 0; i < body.size(); i++) {
|
||||
@@ -1261,6 +1258,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
Toast.makeText(getActivity(), "没有类似名称可以作业", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}else {
|
||||
editNameContent.setTextColor(Color.RED);
|
||||
btnSaveLocal.setEnabled(false);
|
||||
btnUploading.setEnabled(false);
|
||||
Toast.makeText(getActivity(), taskNameBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@@ -1495,26 +1495,25 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
// }
|
||||
// }).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (showPoiEntity != null) {
|
||||
if (showPoiEntity.getTaskStatus() == 5) {
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||
}else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
if (showPoiEntity!=null){
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity != null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
if (markerStation!=null){
|
||||
markerStation.remove();
|
||||
}
|
||||
@@ -1524,6 +1523,49 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
removablesLocality.clear();
|
||||
}
|
||||
|
||||
private void initEndReceiveTask(String url,PoiEntity poiEntity) {
|
||||
if (poiEntity.getTaskId() == 0) {
|
||||
Toast.makeText(getActivity(), "无此任务", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", poiEntity.getTaskId());
|
||||
httpParams.put("auditIds", "");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiDao.deletePoiEntity(poiEntity);
|
||||
chargingPileDao.deleteChargingFidPileEntity(poiEntity.getId());
|
||||
}
|
||||
}).start();
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||
List<Info> infoPhoto = new ArrayList<>();
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.navinfo.outdoor.adapter.EventPrefectureAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.bean.EventPrefectureBean;
|
||||
import com.navinfo.outdoor.bean.HasSubmitBean;
|
||||
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
@@ -59,10 +60,10 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
taskExplainBean = new ArrayList<>();
|
||||
initNetwork();
|
||||
initNetwork(true);
|
||||
}
|
||||
|
||||
private void initNetwork() {
|
||||
private void initNetwork(boolean aNet) {
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("fid", "2");
|
||||
@@ -79,15 +80,14 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (taskPrefectureBean.getCode() == 200){
|
||||
eventPrefectureAdapter.setDataBeans(taskPrefectureBean.getBody().getList());
|
||||
eventPage++;
|
||||
initTaskPrefectureBean(taskPrefectureBean,aNet);
|
||||
}else {
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
Log.d("TAG", "onSuccess: " + taskPrefectureBean.getMessage() + "sssssssssssss");
|
||||
|
||||
//initEventPrefecture(eventPrefectureBean,b);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -99,45 +99,35 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
});
|
||||
}
|
||||
|
||||
// private void initEventPrefecture(TaskPrefectureBean taskPrefectureBean, boolean start) {
|
||||
// if (taskPrefectureBean.getStatus() == 0) {
|
||||
// if (start) {
|
||||
// if (taskExplainBean.size() > 0) {
|
||||
// taskExplainBean.clear();
|
||||
// }
|
||||
// if (taskPrefectureBean.getBody() == null) {
|
||||
// Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
// } else {
|
||||
// taskExplainBean.addAll(taskPrefectureBean.getBody().getList());
|
||||
// page++;
|
||||
// }
|
||||
// eventPrefectureAdapter.notifyDataSetChanged();
|
||||
// eventRecycler.refreshComplete();
|
||||
// } else {
|
||||
// if (taskPrefectureBean.getBody() == null) {
|
||||
// eventRecycler.setNoMore(true);
|
||||
// } else {
|
||||
// taskExplainBean.addAll(taskPrefectureBean.getBody().getList());
|
||||
// eventPrefectureAdapter.notifyDataSetChanged();
|
||||
// eventRecycler.loadMoreComplete();
|
||||
// page++;
|
||||
// }
|
||||
// }
|
||||
// } else if (taskPrefectureBean.getStatus() == 2) {
|
||||
// if (start) {
|
||||
// if (taskExplainBean.size() > 0) {
|
||||
// taskExplainBean.clear();
|
||||
// eventPrefectureAdapter.notifyDataSetChanged();
|
||||
// }
|
||||
// eventRecycler.refreshComplete();
|
||||
// } else {
|
||||
// eventRecycler.setNoMore(true);
|
||||
// }
|
||||
// Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
// } else {
|
||||
// Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
// }
|
||||
// }
|
||||
private void initTaskPrefectureBean(TaskPrefectureBean taskPrefectureBean, boolean aBoolean) {
|
||||
if (taskPrefectureBean.getCode() == 200) {
|
||||
if (aBoolean) {
|
||||
if (taskExplainBean.size() > 0) {
|
||||
taskExplainBean.clear();
|
||||
}
|
||||
if (taskPrefectureBean.getBody().getList()== null) {
|
||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
taskExplainBean.addAll(taskPrefectureBean.getBody().getList());
|
||||
eventPage++;
|
||||
}
|
||||
eventPrefectureAdapter.notifyDataSetChanged();
|
||||
eventRecycler.refreshComplete();
|
||||
} else {
|
||||
if (taskPrefectureBean.getBody().getList() == null) {
|
||||
eventRecycler.setNoMore(true);
|
||||
} else {
|
||||
taskExplainBean.addAll(taskPrefectureBean.getBody().getList());
|
||||
eventPrefectureAdapter.notifyDataSetChanged();
|
||||
eventRecycler.loadMoreComplete();
|
||||
eventPage++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
@@ -146,24 +136,23 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
ivEventTask.setOnClickListener(this::onClick);
|
||||
eventRecycler = findViewById(R.id.event_recycler);
|
||||
eventRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
eventRecycler.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
||||
eventRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
eventRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
//取消上拉加载,刷新功能。
|
||||
// eventRecycler.setPullRefreshEnabled(false);
|
||||
// eventRecycler.setLoadingMoreEnabled(false);
|
||||
eventPrefectureAdapter = new EventPrefectureAdapter(getActivity());
|
||||
eventPrefectureAdapter = new EventPrefectureAdapter(taskExplainBean,getActivity());
|
||||
eventRecycler.setAdapter(eventPrefectureAdapter);
|
||||
eventRecycler.getDefaultFootView().setNoMoreHint("已全部加载完毕");
|
||||
eventRecycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
|
||||
eventPage=1;
|
||||
initNetwork(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
|
||||
initNetwork(false);
|
||||
}
|
||||
});
|
||||
eventPrefectureAdapter.setClickItem(new EventPrefectureAdapter.clickItem() {
|
||||
|
||||
@@ -52,7 +52,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
private PoiEntity poiEntity;
|
||||
private PoiDao poiDao;
|
||||
private ChargingPileDao chargingPileDao;
|
||||
private Marker poiMarker;
|
||||
|
||||
|
||||
|
||||
public static GatherGetFragment newInstance(Bundle bundle) {
|
||||
@@ -80,6 +80,10 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
obtain.what = Constant.GATHER_GET_RETURN;
|
||||
obtain.obj = aBoolean;
|
||||
EventBus.getDefault().post(obtain);
|
||||
Message obtains = Message.obtain();
|
||||
obtains.what = Constant.JOB_WORD_MONITOR;
|
||||
obtains.obj = true;
|
||||
EventBus.getDefault().post(obtains);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -193,18 +197,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
break;
|
||||
case R.id.btn_get_task://领取任务
|
||||
/* if (poiEntity.getTaskStatus() < 2) {
|
||||
double latitude = Constant.currentLocation.getLatitude();
|
||||
double longitude = Constant.currentLocation.getLongitude();
|
||||
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置
|
||||
LatLng endLatLng = new LatLng(Double.valueOf(poiEntity.getY()), Double.valueOf(poiEntity.getX()));
|
||||
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);
|
||||
if (geometry > 5000) {
|
||||
Toast.makeText(getActivity(), "作业不在领取范围内,无法领取", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (poiEntity != null) {
|
||||
int type = poiEntity.getType();
|
||||
if (type == 6) {//面状任务的领取类型
|
||||
@@ -223,6 +215,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
}
|
||||
break;
|
||||
case R.id.btn_gather://立即采集
|
||||
//如果是领取的任务或者是新得任务就只能在当前用户位置方圆5000以内才可以使用
|
||||
if (poiEntity.getTaskStatus() < 2) {
|
||||
double latitude = Constant.currentLocation.getLatitude();
|
||||
double longitude = Constant.currentLocation.getLongitude();
|
||||
@@ -239,7 +232,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
if (type == 6) {
|
||||
int taskStatus = poiEntity.getTaskStatus();
|
||||
if (taskStatus != 1) {
|
||||
|
||||
initPolygonTask(HttpInterface.RECEIVED_POLYGON_TASK, poiEntity.getTaskId(), true);
|
||||
} else {
|
||||
new Thread(new Runnable() {
|
||||
@@ -368,7 +360,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(getActivity(), chargingPileEntityList);
|
||||
}
|
||||
// senMessageMarker(chargingStationEntity.getType(), chargingStationEntity.getY(), chargingStationEntity.getX());
|
||||
if (statusId==1){
|
||||
if (statusId==1||statusId==5){
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), chargingStationEntity);
|
||||
}
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@@ -380,11 +372,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
obtain.what = Constant.GATHER_GET_MAP;
|
||||
obtain.obj = chargingStationEntity;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}/*else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}*/
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -397,11 +390,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
obtain.what = Constant.GATHER_GET_MAP;
|
||||
obtain.obj = taskIdPoiEntity;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -529,11 +523,18 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void run() {
|
||||
poiDao.deletePoiEntity(poiEntity);
|
||||
if(poiEntity.getType()==2){
|
||||
chargingPileDao.deleteChargingFidPileEntity(poiEntity.getId());
|
||||
}
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Log.d("TAG", "run: " + response.getMessage());
|
||||
initViewByTaskStatus(0);
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -585,9 +586,13 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void run() {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.UN_POLY_GEN_TASK;
|
||||
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();
|
||||
}
|
||||
});
|
||||
@@ -702,7 +707,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
||||
}
|
||||
//senMessageMarker(poiEntity.getType(), poiEntity.getY(), poiEntity.getX());
|
||||
if (statusId==1){
|
||||
if (statusId==1||statusId==5){
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiListEntity);
|
||||
}
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@@ -714,11 +719,13 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
obtain.what = Constant.GATHER_GET_MAP;
|
||||
obtain.obj = poiListEntity;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}/*else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}*/
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -731,11 +738,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
obtain.what = Constant.GATHER_GET_MAP;
|
||||
obtain.obj = taskIdPoiEntity;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -823,7 +831,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
||||
}
|
||||
//senMessageMarker(poiEntity.getType(), poiEntity.getY(), poiEntity.getX());
|
||||
if (statusId==1){
|
||||
if (statusId==1||statusId==5){
|
||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiListEntity);
|
||||
}
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@@ -835,11 +843,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
obtain.what = Constant.GATHER_GET_MAP;
|
||||
obtain.obj = poiListEntity;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}/*else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}*/
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -852,11 +861,13 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
obtain.what = Constant.GATHER_GET_MAP;
|
||||
obtain.obj = taskIdPoiEntity;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -229,48 +229,6 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
Toast.makeText(getActivity(), e.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
/*OkGo
|
||||
// 请求方式和请求url
|
||||
.<BankPhoneBean>post(HttpInterface.USER_BANKCARD_UP_DATA)
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
.params("userid", "1")
|
||||
.params("bankAccount", value)//银行id
|
||||
.params("idNumber", etBankAccount)//银行卡号
|
||||
.addFileParams("file", gatheringList)//银行卡拍照
|
||||
.tag(this)
|
||||
.execute(new DialogCallback<BankPhoneBean>(BankPhoneBean.class) {
|
||||
@Override
|
||||
public void onSuccess(Response<BankPhoneBean> response) {
|
||||
dismissLoadingDialog();
|
||||
Log.d("TAG", "onSuccess: " + response.toString() + "sssssssssssss");
|
||||
if (response.code() == 200) {
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "绑定成功", "确定", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
navInfoEditor.putString("bankAccount", value);
|
||||
navInfoEditor.commit();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
MessageDialog.show((AppCompatActivity) getActivity(), "绑定失败", "取消", "取消", "确定").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
// Toast.makeText(getContext(), "点击了确定", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<BankPhoneBean> response) {
|
||||
super.onError(response);
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), response.message(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + response.message());
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -282,7 +240,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
||||
return;
|
||||
}
|
||||
gatheringCamera.setTag(file.getAbsolutePath());
|
||||
// gatheringPath = PhotoPathUtil.getTakePhotoPath(data, "", "");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ import com.navinfo.outdoor.bean.Info;
|
||||
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||
import com.navinfo.outdoor.bean.PoiSaveBean;
|
||||
import com.navinfo.outdoor.bean.PoiUploadBean;
|
||||
import com.navinfo.outdoor.bean.UnPolygonTaskBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.DialogCallback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
@@ -198,6 +199,8 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
moveLatlng(latLng, new TencentMap.CancelableCallback() {
|
||||
@Override
|
||||
public void onFinish() {
|
||||
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
|
||||
markerOther.setIcon(otherDescriptor);
|
||||
screenOtherPositions = tencentMap.getProjection().toScreenLocation(latLng);
|
||||
//创建Marker对象之前,设置属性
|
||||
if (markerOther != null) {
|
||||
@@ -210,12 +213,16 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bag);
|
||||
markerOther.setIcon(otherDescriptor);
|
||||
checkPot.setText("编辑");
|
||||
checkPot.setTextColor(Color.BLACK);
|
||||
checkPot.setChecked(false);
|
||||
}
|
||||
});
|
||||
}else {
|
||||
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bag);
|
||||
markerOther.setIcon(otherDescriptor);
|
||||
checkPot.setText("编辑");
|
||||
checkPot.setTextColor(Color.BLACK);
|
||||
latLng = tencentMap.getProjection().fromScreenLocation(screenOtherPositions);
|
||||
@@ -320,8 +327,8 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
latLng = new LatLng();
|
||||
latLng.setLongitude(Double.parseDouble(x));
|
||||
latLng.setLatitude(Double.parseDouble(y));
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
|
||||
markerOther = tencentMap.addMarker(new MarkerOptions(latLng).icon(pileDescriptor) .anchor(0.5f,1.0f));
|
||||
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bag);
|
||||
markerOther = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor) .anchor(0.5f,1.0f));
|
||||
markerOther.setZIndex(4);
|
||||
moveLatlng(latLng, null);
|
||||
}
|
||||
@@ -646,30 +653,72 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
||||
file = null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (showPoiEntity != null) {
|
||||
if (showPoiEntity.getTaskStatus() == 5) {
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||
}else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
if (showPoiEntity != null) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity != null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
if (markerOther != null) {
|
||||
markerOther.remove();
|
||||
}
|
||||
}
|
||||
private void initEndReceiveTask(String url,PoiEntity poiEntity) {
|
||||
if (poiEntity.getTaskId() == 0) {
|
||||
Toast.makeText(getActivity(), "无此任务", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", poiEntity.getTaskId());
|
||||
httpParams.put("auditIds", "");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiDao.deletePoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||
|
||||
@@ -49,6 +49,7 @@ import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||
import com.navinfo.outdoor.bean.PhoneBean;
|
||||
import com.navinfo.outdoor.bean.PoiSaveBean;
|
||||
import com.navinfo.outdoor.bean.TaskNameBean;
|
||||
import com.navinfo.outdoor.bean.UnPolygonTaskBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
@@ -180,10 +181,12 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
checkBoxLife.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(checkBoxLife.isChecked()){
|
||||
if (checkBoxLife.isChecked()) {
|
||||
moveLatlng(latLng, new TencentMap.CancelableCallback() {
|
||||
@Override
|
||||
public void onFinish() {
|
||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
|
||||
markerPoi.setIcon(poiDescriptor);
|
||||
screenPoiPositions = tencentMap.getProjection().toScreenLocation(latLng);
|
||||
//创建Marker对象之前,设置属性
|
||||
if (markerPoi != null) {
|
||||
@@ -196,12 +199,16 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bags);
|
||||
markerPoi.setIcon(poiDescriptor);
|
||||
checkBoxLife.setText("编辑");
|
||||
checkBoxLife.setTextColor(Color.BLACK);
|
||||
checkBoxLife.setChecked(false);
|
||||
}
|
||||
});
|
||||
}else {
|
||||
} else {
|
||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bags);
|
||||
markerPoi.setIcon(poiDescriptor);
|
||||
checkBoxLife.setText("编辑");
|
||||
checkBoxLife.setTextColor(Color.BLACK);
|
||||
latLng = tencentMap.getProjection().fromScreenLocation(screenPoiPositions);
|
||||
@@ -379,11 +386,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
String y = showPoiEntity.getY();
|
||||
if (x != null && y != null) {
|
||||
latLng = new LatLng();
|
||||
latLng.setLatitude(Double.parseDouble
|
||||
(y));
|
||||
latLng.setLatitude(Double.parseDouble(y));
|
||||
latLng.setLongitude(Double.parseDouble(x));
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
|
||||
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(pileDescriptor) .anchor(0.5f,1.0f));
|
||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bags);
|
||||
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).anchor(0.5f, 1.0f));
|
||||
markerPoi.setZIndex(4);
|
||||
moveLatlng(latLng, null);
|
||||
}
|
||||
@@ -394,7 +400,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
editDescribe.setText(memo + "");
|
||||
}
|
||||
String telPhone = showPoiEntity.getTelPhone();
|
||||
if (telPhone != null && !telPhone.equals("")&&!telPhone.equals("null")) {
|
||||
if (telPhone != null && !telPhone.equals("") && !telPhone.equals("null")) {
|
||||
String[] phones = telPhone.split("\\|");
|
||||
for (int i = 0; i < phones.length; i++) {
|
||||
if (i == 0) {
|
||||
@@ -473,7 +479,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();
|
||||
}
|
||||
if (editNameContent.getText().toString()!=null||editNameContent!=null){
|
||||
if (editNameContent.getText().toString() != null || editNameContent != null) {
|
||||
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
@@ -482,7 +488,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
});
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "请输入名称", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
@@ -513,13 +519,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
if (getPhoneBean.getCode() == 200) {
|
||||
String code = getPhoneBean.getBody().getCode();
|
||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||
if (!Constant.CODE.equals(code)){
|
||||
if (!Constant.CODE.equals(code)) {
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "此地区区号为"+code+",请手动修改", "确定","取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
@Override
|
||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
Constant.CODE = code;
|
||||
Constant.TelLength=telLength;
|
||||
Constant.TelLength = telLength;
|
||||
/* for (int i = 0; i < poiBeans.size(); i++) {
|
||||
poiBeans.get(i).setArea(Constant.CODE);
|
||||
}
|
||||
@@ -529,8 +535,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
});
|
||||
}
|
||||
}else {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -574,9 +580,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
|
||||
@Subscribe
|
||||
public void onEvent(Message data) {
|
||||
if (data.what == Constant.POI_WORD) {
|
||||
latLng = (LatLng) data.obj;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -696,11 +700,14 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
.getRequest(new Callback<TaskNameBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskNameBean taskNameBean, int id) {
|
||||
if (getActivity()==null){
|
||||
if (getActivity() == null) {
|
||||
return;
|
||||
}
|
||||
dismissLoadingDialog();
|
||||
if (taskNameBean.getCode() == 200) {
|
||||
btnUploading.setEnabled(true);
|
||||
btnSaveLocal.setEnabled(true);
|
||||
editNameContent.setTextColor(Color.BLACK);
|
||||
List<String> body = taskNameBean.getBody();
|
||||
if (body != null) {
|
||||
for (int i = 0; i < body.size(); i++) {
|
||||
@@ -716,6 +723,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
Toast.makeText(getActivity(), "没有类似名称可以作业", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
editNameContent.setTextColor(Color.RED);
|
||||
btnUploading.setEnabled(false);
|
||||
btnSaveLocal.setEnabled(false);
|
||||
Toast.makeText(getActivity(), taskNameBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@@ -723,7 +733,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
if (getActivity()==null){
|
||||
if (getActivity() == null) {
|
||||
return;
|
||||
}
|
||||
dismissLoadingDialog();
|
||||
@@ -1052,31 +1062,75 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
super.onSaveInstanceState(outState);
|
||||
initPoiSharePre();
|
||||
}
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (showPoiEntity != null) {
|
||||
if (showPoiEntity.getTaskStatus() == 5) {
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||
}else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
if (showPoiEntity != null) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity != null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
if (markerPoi != null) {
|
||||
markerPoi.remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void initEndReceiveTask(String url,PoiEntity poiEntity) {
|
||||
if (poiEntity.getTaskId() == 0) {
|
||||
Toast.makeText(getActivity(), "无此任务", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", poiEntity.getTaskId());
|
||||
httpParams.put("auditIds", "");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiDao.deletePoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||
ArrayList<Info> infoPhoto = new ArrayList<>();
|
||||
@@ -1159,9 +1213,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
poiCheckResult.setMsg("请确定 点位");
|
||||
return poiCheckResult;
|
||||
}
|
||||
if (contactView.getPhoneList()!=-1){
|
||||
if (contactView.getPhoneList() != -1) {
|
||||
poiCheckResult.setCode(1);
|
||||
poiCheckResult.setMsg("您第"+contactView.getPhoneList()+"个手机号输入有误");
|
||||
poiCheckResult.setMsg("您第" + contactView.getPhoneList() + "个手机号输入有误");
|
||||
return poiCheckResult;
|
||||
}
|
||||
if (entity.getTelPhone() == null) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
@@ -80,7 +81,6 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
poiTaskXrv.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
poiTaskXrv.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
poiTaskXrv.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
//poiTaskXrv.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
||||
poiTaskXrv.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
@@ -96,6 +96,9 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
poiTaskAdapter = new PoiTaskAdapter(getContext(), listBeans);
|
||||
poiTaskXrv.setAdapter(poiTaskAdapter);
|
||||
poiTaskAdapter.notifyDataSetChanged();
|
||||
/* xrv_yodq.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
xrv_yodq.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||
import com.navinfo.outdoor.bean.PoiSaveBean;
|
||||
import com.navinfo.outdoor.bean.PoiVideoBean;
|
||||
import com.navinfo.outdoor.bean.RoadExtend;
|
||||
import com.navinfo.outdoor.bean.UnPolygonTaskBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.DialogCallback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
@@ -97,7 +98,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
private PoiDatabase poiDatabase;
|
||||
private PoiDao poiDao;
|
||||
private Button btnPoiVideoUpload;
|
||||
private String videoPath;
|
||||
private File fileZip;
|
||||
private FrameLayout fmPoiVideoPic;
|
||||
private NestedScrollView nestedScrollView;
|
||||
@@ -153,7 +153,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
moveLatlng(latLng,null);
|
||||
moveLatlng(latLng, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -233,10 +233,10 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
latLng = new LatLng();
|
||||
latLng.setLongitude(Double.parseDouble(x));
|
||||
latLng.setLatitude(Double.parseDouble(y));
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_bag);
|
||||
markerPoiVideo = tencentMap.addMarker(new MarkerOptions(latLng).icon(pileDescriptor) .anchor(0.5f,1.0f));
|
||||
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_bag);
|
||||
markerPoiVideo = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).anchor(0.5f, 1.0f));
|
||||
markerPoiVideo.setZIndex(4);
|
||||
moveLatlng(latLng,null);
|
||||
moveLatlng(latLng, null);
|
||||
}
|
||||
int work_type = showPoiEntity.getWork_type();
|
||||
showPictureType(work_type);
|
||||
@@ -424,7 +424,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
@Override
|
||||
public void onSuccess(OtherUploadPicBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200){
|
||||
if (response.getCode() == 200) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -443,8 +443,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -592,30 +592,79 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
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);
|
||||
}else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
if (showPoiEntity != null) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity != null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
if (markerPoiVideo!=null){
|
||||
if (markerPoiVideo != null) {
|
||||
markerPoiVideo.remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
||||
if (poiEntity.getTaskId() == 0) {
|
||||
Toast.makeText(getActivity(), "无此任务", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", poiEntity.getTaskId());
|
||||
httpParams.put("auditIds", "");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiDao.deletePoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||
String roadName = etRoadName.getText().toString().trim();
|
||||
|
||||
@@ -52,6 +52,7 @@ import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||
import com.navinfo.outdoor.bean.PoiVideoBean;
|
||||
import com.navinfo.outdoor.bean.RoadExtend;
|
||||
import com.navinfo.outdoor.bean.RoadSaveBean;
|
||||
import com.navinfo.outdoor.bean.UnPolygonTaskBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.DialogCallback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
@@ -154,7 +155,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
moveLatlng(latLng,null);
|
||||
moveLatlng(latLng, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -239,10 +240,10 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
latLng = new LatLng();
|
||||
latLng.setLongitude(Double.parseDouble(x));
|
||||
latLng.setLatitude(Double.parseDouble(y));
|
||||
BitmapDescriptor pileDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bag);
|
||||
markerRoad = tencentMap.addMarker(new MarkerOptions(latLng).icon(pileDescriptor).anchor(0.5f,1.0f));
|
||||
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bag);
|
||||
markerRoad = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).anchor(0.5f, 1.0f));
|
||||
markerRoad.setZIndex(4);
|
||||
moveLatlng(latLng,null);
|
||||
moveLatlng(latLng, null);
|
||||
}
|
||||
int work_type = showPoiEntity.getWork_type();
|
||||
showPictureType(work_type);
|
||||
@@ -323,7 +324,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
startActivityForResult(intent, 0x101);
|
||||
break;
|
||||
case R.id.road_upload:
|
||||
showLoadingDialog();
|
||||
showLoadingDialog();
|
||||
setLoadingDialogText("压缩中...");
|
||||
if (fmRoadPic.getTag() != null) {
|
||||
List<File> videoFileList = (List<File>) fmRoadPic.getTag();
|
||||
@@ -422,7 +423,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
long time = System.currentTimeMillis();
|
||||
httpParams.put("datetime", time);
|
||||
httpParams.put("file", fileZip);
|
||||
showLoadingDialog();
|
||||
showLoadingDialog();
|
||||
setLoadingDialogText("上传中...");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
@@ -434,7 +435,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
@Override
|
||||
public void onSuccess(OtherUploadPicBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode()==200){
|
||||
if (response.getCode() == 200) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -453,7 +454,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
});
|
||||
}
|
||||
}).start();
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
@@ -627,30 +628,75 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (showPoiEntity != null) {
|
||||
if (showPoiEntity.getTaskStatus() == 5) {
|
||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, showPoiEntity);
|
||||
}else {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||
EventBus.getDefault().unregister(this);
|
||||
super.onDestroy();
|
||||
if (showPoiEntity != null) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||
if (poiDaoPoiEntity != null) {
|
||||
if (poiDaoPoiEntity.getTaskStatus() == 5) {
|
||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
if (markerRoad!=null){
|
||||
if (markerRoad != null) {
|
||||
markerRoad.remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void initEndReceiveTask(String url, PoiEntity poiEntity) {
|
||||
if (poiEntity.getTaskId() == 0) {
|
||||
Toast.makeText(getActivity(), "无此任务", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("taskIds", poiEntity.getTaskId());
|
||||
httpParams.put("auditIds", "");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
.url(url)
|
||||
.params(httpParams)
|
||||
.cls(UnPolygonTaskBean.class)
|
||||
.token(Constant.ACCESS_TOKEN)
|
||||
.getRequest(new Callback<UnPolygonTaskBean>() {
|
||||
@Override
|
||||
public void onSuccess(UnPolygonTaskBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
poiDao.deletePoiEntity(poiEntity);
|
||||
}
|
||||
}).start();
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||
obtain.obj = true;
|
||||
EventBus.getDefault().post(obtain);
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||
String roadName = etRoadName.getText().toString().trim();
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.adapter.TaskExplainAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.bean.HasSubmitBean;
|
||||
import com.navinfo.outdoor.bean.TaskExplainInfo;
|
||||
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
@@ -38,6 +39,8 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
|
||||
private TaskExplainAdapter taskExplainAdapter;
|
||||
private int taskPage = 1;
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> explainList;
|
||||
|
||||
|
||||
public static TaskExplainFragment newInstance(Bundle bundle) {
|
||||
TaskExplainFragment fragment = new TaskExplainFragment();
|
||||
@@ -66,18 +69,18 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
//取消上啦加载下拉刷新
|
||||
// taskExplainRecycle.setPullRefreshEnabled(false);
|
||||
// taskExplainRecycle.setLoadingMoreEnabled(false);
|
||||
taskExplainAdapter = new TaskExplainAdapter(getActivity());
|
||||
taskExplainAdapter = new TaskExplainAdapter(explainList,getActivity());
|
||||
taskExplainRecycle.setAdapter(taskExplainAdapter);
|
||||
taskExplainRecycle.getDefaultFootView().setNoMoreHint("加载完毕");
|
||||
taskExplainRecycle.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
|
||||
taskPage=1;
|
||||
initNetWork(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
|
||||
initNetWork(false);
|
||||
}
|
||||
});
|
||||
taskExplainAdapter.setOnItemClick(new TaskExplainAdapter.OnItemClick() {
|
||||
@@ -95,10 +98,11 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
@Override
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
initNetWork();
|
||||
explainList = new ArrayList<>();
|
||||
initNetWork(true);
|
||||
}
|
||||
|
||||
private void initNetWork() {
|
||||
private void initNetWork(boolean aNet) {
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("fid", "3");
|
||||
@@ -115,8 +119,7 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200){
|
||||
taskExplainAdapter.setExplainList(response.getBody().getList());
|
||||
taskPage++;
|
||||
initTaskPrefectureBean(response,aNet);
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@@ -132,7 +135,35 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void initTaskPrefectureBean(TaskPrefectureBean taskPrefectureBean, boolean aBoolean) {
|
||||
if (taskPrefectureBean.getCode() == 200) {
|
||||
if (aBoolean) {
|
||||
if (explainList.size() > 0) {
|
||||
explainList.clear();
|
||||
}
|
||||
if (taskPrefectureBean.getBody().getList()== null) {
|
||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
explainList.addAll(taskPrefectureBean.getBody().getList());
|
||||
taskPage++;
|
||||
}
|
||||
taskExplainAdapter.notifyDataSetChanged();
|
||||
taskExplainRecycle.refreshComplete();
|
||||
} else {
|
||||
if (taskPrefectureBean.getBody().getList() == null) {
|
||||
taskExplainRecycle.setNoMore(true);
|
||||
} else {
|
||||
explainList.addAll(taskPrefectureBean.getBody().getList());
|
||||
taskExplainAdapter.notifyDataSetChanged();
|
||||
taskExplainRecycle.loadMoreComplete();
|
||||
taskPage++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.navinfo.outdoor.activity.WebActivity;
|
||||
import com.navinfo.outdoor.adapter.TaskPrefectureAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.bean.HasSubmitBean;
|
||||
import com.navinfo.outdoor.bean.TaskExplainBean;
|
||||
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||
import com.navinfo.outdoor.http.Callback;
|
||||
@@ -40,7 +41,6 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeanList;
|
||||
private TaskPrefectureAdapter taskPrefectureAdapter;
|
||||
private int taskPage = 1;
|
||||
private Integer taskBodyId;
|
||||
|
||||
|
||||
public static TaskPrefectureFragment newInstance(Bundle bundle) {
|
||||
@@ -61,26 +61,22 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
mIvFindTask.setOnClickListener(this::onClick);
|
||||
taskRecycler = findViewById(R.id.task_recycler);
|
||||
taskRecycler.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
// taskRecycler.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
||||
taskRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||
taskRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||
//取消上拉加载,刷新功能。
|
||||
// taskRecycler.setPullRefreshEnabled(false);
|
||||
// taskRecycler.setLoadingMoreEnabled(false);
|
||||
taskPrefectureAdapter = new TaskPrefectureAdapter(getActivity());
|
||||
taskRecycler.setAdapter(taskPrefectureAdapter);
|
||||
taskRecycler.getDefaultFootView().setNoMoreHint("已全部加载完毕");
|
||||
taskRecycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
|
||||
taskPage=1;
|
||||
initNetwork(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
|
||||
initNetwork(false);
|
||||
}
|
||||
});
|
||||
taskPrefectureAdapter = new TaskPrefectureAdapter(dataBeanList,getActivity());
|
||||
taskRecycler.setAdapter(taskPrefectureAdapter);
|
||||
taskPrefectureAdapter.setClickItem(new TaskPrefectureAdapter.clickItem() {
|
||||
@Override
|
||||
public void item(int id) {
|
||||
@@ -95,10 +91,10 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
protected void initData() {
|
||||
super.initData();
|
||||
dataBeanList = new ArrayList<>();
|
||||
initNetwork();
|
||||
initNetwork(true);
|
||||
}
|
||||
|
||||
private void initNetwork() {
|
||||
private void initNetwork(boolean aNet) {
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("fid", "1");
|
||||
@@ -114,12 +110,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
@Override
|
||||
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (taskPrefectureBean.getCode() == 200){
|
||||
taskPrefectureAdapter.setDataBeans(taskPrefectureBean.getBody().getList());
|
||||
taskPage++;
|
||||
}else {
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
initTaskPrefectureBean(taskPrefectureBean,aNet);
|
||||
|
||||
Log.d("TAG", "onSuccess: " + taskPrefectureBean.getMessage() + "");
|
||||
//initTaskSpecification(taskSpecificationBean,start);
|
||||
@@ -132,7 +123,35 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initTaskPrefectureBean(TaskPrefectureBean taskPrefectureBean, boolean aBoolean) {
|
||||
if (taskPrefectureBean.getCode() == 200) {
|
||||
if (aBoolean) {
|
||||
if (dataBeanList.size() > 0) {
|
||||
dataBeanList.clear();
|
||||
}
|
||||
if (taskPrefectureBean.getBody().getList()== null) {
|
||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
dataBeanList.addAll(taskPrefectureBean.getBody().getList());
|
||||
taskPage++;
|
||||
}
|
||||
taskPrefectureAdapter.notifyDataSetChanged();
|
||||
taskRecycler.refreshComplete();
|
||||
} else {
|
||||
if (taskPrefectureBean.getBody().getList() == null) {
|
||||
taskRecycler.setNoMore(true);
|
||||
} else {
|
||||
dataBeanList.addAll(taskPrefectureBean.getBody().getList());
|
||||
taskPrefectureAdapter.notifyDataSetChanged();
|
||||
taskRecycler.loadMoreComplete();
|
||||
taskPage++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "" + taskPrefectureBean.getMessage());
|
||||
}
|
||||
}
|
||||
/* private void initTaskSpecification(TaskPrefectureBean taskPrefectureBean, boolean start) {
|
||||
if (taskPrefectureBean.getStatus() == 0) {
|
||||
if (start) {
|
||||
|
||||
@@ -115,7 +115,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
private ImageView ivSubmit;
|
||||
private ImageView ivRefish;
|
||||
private SlidingUpPanelLayout sliding_layout;
|
||||
// private FragmentTransaction fragmentTransaction;
|
||||
// private FragmentTransaction fragmentTransaction;
|
||||
private Marker markerPoi;
|
||||
|
||||
private ImageView ivFilter;
|
||||
@@ -130,12 +130,12 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
private List<Removable> removables;
|
||||
private List<Removable> removableScreenMarker;
|
||||
private List<Removable> removablesLocality;
|
||||
private int treasurePage=1;
|
||||
private Handler handler=new Handler(new Handler.Callback() {
|
||||
private int treasurePage = 1;
|
||||
private Handler handler = new Handler(new Handler.Callback() {
|
||||
@Override
|
||||
public boolean handleMessage(@NonNull Message msg) {
|
||||
if(msg.what==0x100){
|
||||
isBack=false;
|
||||
if (msg.what == 0x100) {
|
||||
isBack = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -286,11 +286,12 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
treasureMap.getLayoutParams().height = widtHeight[1];
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到电话区号,电话位数
|
||||
*/
|
||||
private void initPhone() {
|
||||
String encode = Geohash.getInstance().encode(Constant.currentLocation.getLatitude(),Constant.currentLocation.getLongitude());
|
||||
String encode = Geohash.getInstance().encode(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());
|
||||
if (encode == null) {
|
||||
Toast.makeText(getActivity(), "没有确定经纬度", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@@ -308,9 +309,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
String code = getPhoneBean.getBody().getCode();
|
||||
Integer telLength = getPhoneBean.getBody().getTelLength();
|
||||
Constant.CODE = code;
|
||||
Constant.TelLength=telLength;
|
||||
}else {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
Constant.TelLength = telLength;
|
||||
} else {
|
||||
Toast.makeText(getActivity(), getPhoneBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,7 +364,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onSuccess(UserBean response, int id) {
|
||||
if (response.getCode() == 200) {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onSuccess: " + response.getCode() + response.getMessage() + "" + response.getBody());
|
||||
@@ -417,7 +418,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onSuccess(JobSearchBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode()==200){
|
||||
if (response.getCode() == 200) {
|
||||
JobSearchBean.BodyBean body = response.getBody();
|
||||
upload = response.getBody().getUpload();
|
||||
|
||||
@@ -505,7 +506,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg1);
|
||||
poiDescriptor.getFormater().setScale(50);
|
||||
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).alpha(0.9f)
|
||||
.anchor(0.5f,1.0f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
poiMarker.setZIndex(MARKER_DOT);
|
||||
@@ -516,7 +517,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
case 2://充电站
|
||||
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bg1);
|
||||
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor).alpha(0.9f)
|
||||
.anchor(0.5f,1.0f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
stationMarker.setZIndex(MARKER_DOT);
|
||||
@@ -528,7 +529,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
case 3://poi录像
|
||||
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_bg1);
|
||||
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).alpha(0.9f)
|
||||
.anchor(0.5f,1.0f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
poiVideoMarker.setTag(listBean);
|
||||
@@ -539,7 +540,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
case 4://道路录像
|
||||
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bg);
|
||||
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).alpha(0.9f)
|
||||
.anchor(0.5f,1.0f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
roadMarker.setZIndex(MARKER_DOT);
|
||||
@@ -551,7 +552,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
case 5://其他
|
||||
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bg1);
|
||||
Marker otherMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor).alpha(0.9f)
|
||||
.anchor(0.5f,1.0f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
otherMarker.setZIndex(MARKER_DOT);
|
||||
@@ -562,7 +563,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
case 6://面状任务
|
||||
BitmapDescriptor Descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_facet_bg1);
|
||||
Marker planarMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(Descriptor).alpha(0.9f)
|
||||
.anchor(0.5f,1.0f)
|
||||
.anchor(0.5f, 1.0f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
planarMarker.setZIndex(MARKER_DOT);
|
||||
@@ -577,7 +578,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
obtain.what = Constant.JOB_SEARCH_WORD;
|
||||
obtain.obj = response;
|
||||
EventBus.getDefault().post(obtain);
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@@ -678,10 +679,10 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
} else if (poiEntity.getType() == 6) {
|
||||
descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_facet_bag);
|
||||
}
|
||||
MapManager.getInstance().moveLatlng(latLng,null);
|
||||
MapManager.getInstance().moveLatlng(latLng, null);
|
||||
if (bigMarker == null) {
|
||||
bigMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(descriptor)
|
||||
.anchor(0.5f,1f)
|
||||
.anchor(0.5f, 1f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
} else {
|
||||
@@ -698,6 +699,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
setMainButtonVisiable(View.GONE);
|
||||
FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
|
||||
Bundle bundle = new Bundle();
|
||||
/* bundle.putBoolean("boolean",aBoolean);*/
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
gatherGetFragment = GatherGetFragment.newInstance(bundle);
|
||||
fragmentTransaction.replace(R.id.frame_layout, gatherGetFragment);
|
||||
@@ -802,7 +804,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor)
|
||||
.flat(true)
|
||||
.anchor(0.5f,1f)
|
||||
.anchor(0.5f, 1f)
|
||||
.clockwise(false));
|
||||
poiMarker.setClickable(true);
|
||||
poiMarker.setZIndex(MARKER_DOT);
|
||||
@@ -820,7 +822,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor)
|
||||
.flat(true)
|
||||
.anchor(0.5f,1f)
|
||||
.anchor(0.5f, 1f)
|
||||
.clockwise(false));
|
||||
stationMarker.setClickable(true);
|
||||
stationMarker.setZIndex(MARKER_DOT);
|
||||
@@ -836,7 +838,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_have_bg1);
|
||||
}
|
||||
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor)
|
||||
.anchor(0.5f,1f)
|
||||
.anchor(0.5f, 1f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
poiVideoMarker.setClickable(true);
|
||||
@@ -853,7 +855,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.grayroad);
|
||||
}
|
||||
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor)
|
||||
.anchor(0.5f,1f)
|
||||
.anchor(0.5f, 1f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
roadMarker.setClickable(true);
|
||||
@@ -870,7 +872,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.grayother);
|
||||
}
|
||||
Marker otherMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor)
|
||||
.anchor(0.5f,1f)
|
||||
.anchor(0.5f, 1f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
otherMarker.setClickable(true);
|
||||
@@ -887,7 +889,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
Descriptor = BitmapDescriptorFactory.fromResource(R.drawable.grayfacet);
|
||||
}
|
||||
Marker planarMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(Descriptor)
|
||||
.anchor(0.5f,1f)
|
||||
.anchor(0.5f, 1f)
|
||||
.clockwise(false)
|
||||
.flat(true));
|
||||
planarMarker.setClickable(true);
|
||||
@@ -1028,6 +1030,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
PoiEntity poiEntity = (PoiEntity) data.obj;
|
||||
initMarker(poiEntity,true);
|
||||
} else if (data.what == Constant.GATHER_GET_MAP) { //地图界面点击采集 点击开始采集
|
||||
if (bigMarker != null) {
|
||||
bigMarker.setVisible(false);
|
||||
}
|
||||
PoiEntity poiEntity = (PoiEntity) data.obj;
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
@@ -1097,7 +1102,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
removableScreenMarker.get(i).remove();
|
||||
}
|
||||
removableScreenMarker.clear();
|
||||
|
||||
}
|
||||
} else if (data.what == Constant.MAIN_BUTTON_VISIABLE) {//控制主界面各个按钮显隐状态的what值
|
||||
setMainButtonVisiable((Integer) data.obj);
|
||||
@@ -1120,7 +1124,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
removableScreenMarker.get(i).remove();
|
||||
}
|
||||
removableScreenMarker.clear();
|
||||
|
||||
} else if (data.what == Constant.CHARGING_STATION) {//充电站的充电桩-新增
|
||||
if ((HashMap<String, Object>) data.obj != null) {
|
||||
HashMap<String, Object> stationHashMap = (HashMap<String, Object>) data.obj;
|
||||
@@ -1212,22 +1215,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
if (latLng != null) {
|
||||
MapManager.getInstance().animateMapLocation2TopCenter(latLng, 0.5f, 0.25f);
|
||||
}
|
||||
|
||||
} else if (data.what == Constant.UN_POLY_GEN_TASK) {//面妆任务立即采集 领取
|
||||
if ((boolean) data.obj) {
|
||||
|
||||
frameLayout.setVisibility(View.GONE);
|
||||
sliding_layout.setPanelHeight(0);
|
||||
setMainButtonVisiable(View.VISIBLE);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
||||
}
|
||||
if (bigMarker != null) {
|
||||
bigMarker.setVisible(false);
|
||||
}
|
||||
for (int i = 0; i < removableScreenMarker.size(); i++) {
|
||||
removableScreenMarker.get(i).remove();
|
||||
}
|
||||
removableScreenMarker.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1612,7 +1599,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
});
|
||||
}
|
||||
|
||||
TencentMap.OnMarkerClickListener markerClickListener=new TencentMap.OnMarkerClickListener() {
|
||||
TencentMap.OnMarkerClickListener markerClickListener = new TencentMap.OnMarkerClickListener() {
|
||||
@Override
|
||||
public boolean onMarkerClick(Marker marker) {
|
||||
FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
|
||||
@@ -1625,6 +1612,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
if (markerPoi != null) {
|
||||
markerPoi.remove();
|
||||
}
|
||||
|
||||
if (bigMarker != null) {
|
||||
bigMarker.setVisible(false);
|
||||
}
|
||||
@@ -1633,32 +1621,50 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
removableScreenMarker.clear();
|
||||
if (poiEntity.getTaskStatus()==1){//已领取
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
initMarker(poiEntity, true);
|
||||
}else {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("poiEntity", poiEntity);
|
||||
switch (poiEntity.getType()) {
|
||||
case 1:
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
initMarker(poiEntity,false);
|
||||
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
||||
showSlidingFragment(poiFragment);
|
||||
break;
|
||||
case 2:
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
initMarker(poiEntity,false);
|
||||
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
|
||||
showSlidingFragment(chargingStationFragment);
|
||||
break;
|
||||
case 3:
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
initMarker(poiEntity,false);
|
||||
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
|
||||
showSlidingFragment(poiVideoFragment);
|
||||
break;
|
||||
case 4:
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
initMarker(poiEntity,false);
|
||||
RoadFragment roadFragment = RoadFragment.newInstance(bundle);
|
||||
showSlidingFragment(roadFragment);
|
||||
break;
|
||||
case 5:
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
initMarker(poiEntity,false);
|
||||
OtherFragment otherFragment = OtherFragment.newInstance(bundle);
|
||||
showSlidingFragment(otherFragment);
|
||||
@@ -1670,7 +1676,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
JobSearchBean.BodyBean.ListBean listBean = (JobSearchBean.BodyBean.ListBean) marker.getTag();
|
||||
if (listBean != null) {
|
||||
@@ -1701,6 +1706,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
poiListEntity.setX(latPolygon.get(0).longitude + "");
|
||||
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
||||
}
|
||||
if (marker!=null){
|
||||
marker.remove();
|
||||
}
|
||||
initMarker(poiListEntity, true);
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "数据为空", Toast.LENGTH_SHORT).show();
|
||||
@@ -1713,11 +1721,11 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
|
||||
@Override
|
||||
public boolean onBackPressed() {
|
||||
if (!isBack){
|
||||
if (!isBack) {
|
||||
isBack = true;
|
||||
Toast.makeText(getActivity(), "双击退出程序", Toast.LENGTH_SHORT).show();
|
||||
handler.sendEmptyMessageDelayed(0x100,2000);
|
||||
}else {
|
||||
handler.sendEmptyMessageDelayed(0x100, 2000);
|
||||
} else {
|
||||
getActivity().finish();
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,6 @@ public class OkGoBuilder<T> {
|
||||
}
|
||||
|
||||
public OkGoBuilder url(String url) {
|
||||
this.url = url;
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
BIN
app/src/main/res/drawable-hdpi/marker_chang_pile_bag.png
Normal file
BIN
app/src/main/res/drawable-hdpi/marker_chang_pile_bag.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-hdpi/marker_gray_chang_pile.png
Normal file
BIN
app/src/main/res/drawable-hdpi/marker_gray_chang_pile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -13,7 +13,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:text="Welcome"
|
||||
android:text="@string/tv_login_title"
|
||||
android:textColor="@color/colorWhite"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -25,7 +25,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:text="欢迎来到地图寻宝"
|
||||
android:text="@string/tv_login_deck"
|
||||
android:textColor="@color/colorWhite"
|
||||
android:textSize="35sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -38,7 +38,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:text="用户名"
|
||||
android:text="@string/tv_login_name"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_login_deck"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_login_deck" />
|
||||
<EditText
|
||||
@@ -46,7 +46,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:hint=" ID/手机号"
|
||||
android:hint="@string/et_login_name"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
@@ -75,7 +75,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:text="密码"
|
||||
android:text="@string/tv_login_paw"
|
||||
app:layout_constraintLeft_toLeftOf="@id/et_login_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_login_name" />
|
||||
<EditText
|
||||
@@ -83,7 +83,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:hint=" 请输入密码"
|
||||
android:hint="@string/et_login_paw"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:inputType="textPassword"
|
||||
@@ -95,7 +95,6 @@
|
||||
android:textCursorDrawable="@drawable/text_color"
|
||||
android:theme="@style/MyEditText"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
app:layout_constraintLeft_toLeftOf="@id/login_paw"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/login_paw" />
|
||||
@@ -123,7 +122,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:text="免责声明"
|
||||
android:text="@string/tv_statement"
|
||||
android:textColor="@color/colorWhite"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_login_check"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_login_check"
|
||||
@@ -136,7 +135,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="注册"
|
||||
android:text="@string/tv_register"
|
||||
app:layout_constraintRight_toLeftOf="@id/tv_forget_paw"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_login_paw" />
|
||||
|
||||
@@ -146,7 +145,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="忘记密码"
|
||||
android:text="@string/tv_forget_paw"
|
||||
app:layout_constraintRight_toRightOf="@id/et_login_paw"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_login_paw" />
|
||||
|
||||
@@ -160,7 +159,7 @@
|
||||
android:layout_marginRight="40dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:gravity="center"
|
||||
android:text="登录"
|
||||
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"
|
||||
|
||||
@@ -61,4 +61,12 @@
|
||||
android:text="去测评>"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_results" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/colormap"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -36,5 +36,13 @@
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_title" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/colormap"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_dest" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -53,4 +53,14 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="#C0BFBF"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/colormap"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_createTime" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -28,6 +28,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
style="@style/text_style_toolbar_title"
|
||||
android:layout_toRightOf="@id/iv_find_task"
|
||||
android:text="我的等级" />
|
||||
android:text="@string/tv_privilege_title" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -23,6 +23,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:text="测试1"
|
||||
android:textSize="15sp" />
|
||||
<TextView
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="#C0BFBF"/>
|
||||
|
||||
|
||||
@@ -38,7 +38,10 @@
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#C0BFBF"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/colormap"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_createTime" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -148,6 +148,17 @@
|
||||
11.4如果出现您对本条款的违反行为,图新保留针对该违反行为采取法律所能提供的所有补救手段的权利。如果您在使用本软件或参与本活动期间发现有任何在您看来属于
|
||||
不正当或在其它方面违反本条款的内容,您应及时向图新举报。\n\n
|
||||
</string>
|
||||
<string name="tv_privilege_title">我的特权</string>
|
||||
<string name="tv_login_title">Welcome</string>
|
||||
<string name="tv_login_deck">欢迎来到地图寻宝</string>
|
||||
<string name="tv_login_name">用户名</string>
|
||||
<string name="et_login_name">ID/手机号</string>
|
||||
<string name="tv_login_paw">密码</string>
|
||||
<string name="et_login_paw">请输入密码</string>
|
||||
<string name="tv_statement">免责声明</string>
|
||||
<string name="tv_register">注册</string>
|
||||
<string name="tv_forget_paw">忘记密码</string>
|
||||
<string name="btn_login">登录</string>
|
||||
|
||||
<string name="map_regard">北京四维图新科技股份有限公司(简称:四维图新,深交所股票代码:002405)是中国领先的数字地图内容、车联网及动态交通信息服务、地理位置相关的商业智能解决方案提供商。\n\n
|
||||
地图寻宝是由北京四维图团队打造的兼职赚钱类应用。只要您有碎片时间,完成小任务即可有现金收入。\n\n
|
||||
|
||||
Reference in New Issue
Block a user