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