修改页面bug
This commit is contained in:
@@ -27,18 +27,18 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||
private WebView nWebView;
|
||||
private String content = "<div>\n" +
|
||||
"<a>测试</a>\n" +
|
||||
// "\n" +
|
||||
// "<p>\n" +
|
||||
// "\t<img src=\"https://exp-picture.cdn.bcebos.com/560be432939c2cf72dff4caa452c5b1b1fde12e1.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80\">\n" +
|
||||
// "</p>\n" +
|
||||
// "\n" +
|
||||
// "<p style=\"color: red; margin-left: 20px\"><style> 标签用于为 HTML 文档定义样式信息。</p>\n" +
|
||||
// "\n" +
|
||||
// "<p style=\"background-color: lightblue; margin-left: 20px\">在 style 中,您可以规定在浏览器中如何呈现 HTML 文档。</p>\n" +
|
||||
// "\n" +
|
||||
// "<p style=\"font-family: verdana; margin-left: 20px\">type 属性是必需的,定义 style 元素的内容。唯一可能的值是 \"text/css\"。</p>\n" +
|
||||
// "\n" +
|
||||
// "<p style=\"font-size: 20px; margin-left: 20px\">style 元素位于 head 部分中。</p>\n" +
|
||||
"\n" +
|
||||
"<p>\n" +
|
||||
"\t<img src=\"https://exp-picture.cdn.bcebos.com/560be432939c2cf72dff4caa452c5b1b1fde12e1.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80\">\n" +
|
||||
"</p>\n" +
|
||||
"\n" +
|
||||
"<p style=\"color: red; margin-left: 20px\"><style> 标签用于为 HTML 文档定义样式信息。</p>\n" +
|
||||
"\n" +
|
||||
"<p style=\"background-color: lightblue; margin-left: 20px\">在 style 中,您可以规定在浏览器中如何呈现 HTML 文档。</p>\n" +
|
||||
"\n" +
|
||||
"<p style=\"font-family: verdana; margin-left: 20px\">type 属性是必需的,定义 style 元素的内容。唯一可能的值是 \"text/css\"。</p>\n" +
|
||||
"\n" +
|
||||
"<p style=\"font-size: 20px; margin-left: 20px\">style 元素位于 head 部分中。</p>\n" +
|
||||
"</div>";
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
|
||||
@@ -43,6 +43,15 @@ public class MessageAdapter extends RecyclerView.Adapter<MessageAdapter.ViewHold
|
||||
holder.tvMessageTitle.setText(messageList.get(position).getTitle());
|
||||
holder.tvMessageDest.setText(messageList.get(position).getSubtitle());
|
||||
holder.tvMessageTime.setText(messageList.get(position).getCreatetime());
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (messageClickItem!=null){
|
||||
messageClickItem.item(messageList.get(position).getId());
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -63,4 +72,13 @@ public class MessageAdapter extends RecyclerView.Adapter<MessageAdapter.ViewHold
|
||||
tvMessageTime = itemView.findViewById(R.id.tv_message_time);
|
||||
}
|
||||
}
|
||||
public messageClickItem messageClickItem;
|
||||
|
||||
public void setMessageClickItem(MessageAdapter.messageClickItem messageClickItem) {
|
||||
this.messageClickItem = messageClickItem;
|
||||
}
|
||||
|
||||
public interface messageClickItem{
|
||||
void item(int aInt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,26 +8,20 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.bean.CapacityMeasureBean;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.tencent.mapsdk.internal.aaa.getContext;
|
||||
|
||||
public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.ViewHolder> {
|
||||
private List<PoiEntity> allRoad = new ArrayList<>();
|
||||
@@ -91,6 +85,25 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
||||
allRoad.get(position).setChecked(isChecked);
|
||||
}
|
||||
});
|
||||
if (poiEntity.getIsLocalData() == 1){
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onClickItem!=null){
|
||||
onClickItem.item(position,poiEntity);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else {
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onClickItem!=null){
|
||||
onClickItem.item(position,poiEntity);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -124,4 +137,14 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public onClickItem onClickItem ;
|
||||
|
||||
public void setOnClickItem(StaySubmitAdapter.onClickItem onClickItem) {
|
||||
this.onClickItem = onClickItem;
|
||||
}
|
||||
|
||||
public interface onClickItem {
|
||||
void item(int position, PoiEntity allRoad);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,6 +82,8 @@ public class Constant {
|
||||
public static final int CHARGING_PILE_BODY = 36;//充电装的body
|
||||
public static final int CHARGING_PILE_PHONE = 37;//充电桩的照片
|
||||
public static final int EVENT_WHAT_CURRENT_MARKER = 41; // 显示当前正在编辑的POI类型数据的Event的What值
|
||||
//CompleteTask
|
||||
public static final int EVENT_WHAT_COMPLETE_TASK = 42; // 点击记录跳转开始采集
|
||||
|
||||
|
||||
public static String USER_ATTESTATION_NAME; //实名认证姓名 银行卡
|
||||
|
||||
@@ -4,6 +4,7 @@ public class UserPriceExchangeBean {
|
||||
|
||||
private Integer code;
|
||||
private String message;
|
||||
private Integer body;
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
@@ -20,4 +21,12 @@ public class UserPriceExchangeBean {
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Integer getBody() {
|
||||
return body;
|
||||
}
|
||||
|
||||
public void setBody(Integer body) {
|
||||
this.body = body;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
@@ -8,6 +9,7 @@ import android.widget.RelativeLayout;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.WebActivity;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
|
||||
/**
|
||||
@@ -54,10 +56,16 @@ public class AboutFragment extends BaseFragment implements View.OnClickListener
|
||||
getActivity().finish();
|
||||
break;
|
||||
case R.id.rl_about:
|
||||
Intent intent = new Intent(getContext(), WebActivity.class);
|
||||
startActivity(intent);
|
||||
break;
|
||||
case R.id.rl_serve:
|
||||
Intent serveIntent = new Intent(getContext(), WebActivity.class);
|
||||
startActivity(serveIntent);
|
||||
break;
|
||||
case R.id.rl_privilege:
|
||||
Intent privilegeIntent = new Intent(getContext(), WebActivity.class);
|
||||
startActivity(privilegeIntent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ import static android.app.Activity.RESULT_OK;
|
||||
public class ChargingStationFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||
|
||||
private EditText editDescribe;
|
||||
private RelativeLayout rlPanorama, rlName, rlInternalPhotos, rlElse, rlScutcheon;
|
||||
private RelativeLayout rlPanorama, rlName, rlInternalPhotos, rlElse, rlScutcheon,rlNull;
|
||||
private ImageView ivPanorama, ivName, ivInternal, ivElse, ivScutcheon;
|
||||
private TextView tvExamine;
|
||||
private EditText editNameContent, editSiteContent;
|
||||
@@ -235,6 +235,8 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
rlName.setOnClickListener(this::onClick);
|
||||
rlInternalPhotos = findViewById(R.id.rl_internal_photos);
|
||||
rlInternalPhotos.setOnClickListener(this::onClick);
|
||||
rlNull = findViewById(R.id.rl_null);
|
||||
|
||||
rlElse = findViewById(R.id.rl_else);
|
||||
rlElse.setOnClickListener(this::onClick);
|
||||
rlScutcheon = findViewById(R.id.rl_scutcheon);
|
||||
@@ -322,6 +324,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
rlInternalPhotos.setVisibility(View.VISIBLE);
|
||||
rlElse.setVisibility(View.VISIBLE);
|
||||
rlScutcheon.setVisibility(View.VISIBLE);
|
||||
rlNull.setVisibility(View.VISIBLE);
|
||||
existence = 0;
|
||||
break;
|
||||
case 1:
|
||||
@@ -329,6 +332,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
rlInternalPhotos.setVisibility(View.GONE);
|
||||
rlElse.setVisibility(View.GONE);
|
||||
rlScutcheon.setVisibility(View.GONE);
|
||||
rlNull.setVisibility(View.GONE);
|
||||
existence = 1;
|
||||
break;
|
||||
case 2:
|
||||
@@ -336,6 +340,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
rlInternalPhotos.setVisibility(View.GONE);
|
||||
rlElse.setVisibility(View.GONE);
|
||||
rlScutcheon.setVisibility(View.GONE);
|
||||
rlNull.setVisibility(View.GONE);
|
||||
existence = 2;
|
||||
break;
|
||||
}
|
||||
@@ -422,9 +427,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
}
|
||||
} else {
|
||||
if (Constant.CODE == null || Constant.CODE.equals("")) {
|
||||
poiBeans.add(new PhoneBean("电话*", "", "", R.drawable.icon_add_bg));
|
||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
||||
} else {
|
||||
poiBeans.add(new PhoneBean("电话*", "", Constant.CODE, R.drawable.icon_add_bg));
|
||||
poiBeans.add(new PhoneBean("电话", "", Constant.CODE, R.drawable.icon_add_bg));
|
||||
}
|
||||
}
|
||||
body = showPoiEntity.getBodyId();
|
||||
|
||||
@@ -308,7 +308,6 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
||||
obtain.what = Constant.FILTER_LIST_ITEM;
|
||||
obtain.obj = poiEntity;
|
||||
EventBus.getDefault().post(obtain);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -223,7 +223,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
initCompleteTask(HttpInterface.COMPLETE, poiEntity.getTaskId(), taskIdPoiEntity);
|
||||
initCompleteTask(HttpInterface.COMPLETE, poiEntity.getTaskId(),true, taskIdPoiEntity);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -258,10 +258,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
public void run() {
|
||||
poiEntity.setTaskStatus(0);
|
||||
initViewByTaskStatus(0);
|
||||
// btnGetTask.setVisibility(View.VISIBLE);
|
||||
// btnCancelGet.setVisibility(View.GONE);
|
||||
// btnGather.setVisibility(View.VISIBLE);
|
||||
// btnFinishGather.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -345,12 +341,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// poiEntity.setTaskStatus(1);
|
||||
// initViewByTaskStatus(1);
|
||||
btnGetTask.setVisibility(View.GONE);
|
||||
btnCancelGet.setVisibility(View.VISIBLE);
|
||||
btnFinishGather.setVisibility(View.VISIBLE);
|
||||
btnGather.setVisibility(View.GONE);
|
||||
poiEntity.setTaskStatus(1);
|
||||
initViewByTaskStatus(1);
|
||||
if (isSaver) {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.GATHER_GET_MAP;
|
||||
@@ -430,10 +422,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
public void run() {
|
||||
// poiEntity.setTaskStatus(1);
|
||||
// initViewByTaskStatus(1);
|
||||
|
||||
btnGetTask.setVisibility(View.GONE);
|
||||
btnCancelGet.setVisibility(View.VISIBLE);
|
||||
|
||||
if (aBoolean) {
|
||||
initCompleteTask(HttpInterface.COMPLETE, GatherGetFragment.this.poiEntity.getTaskId(), polygonEntity);
|
||||
initCompleteTask(HttpInterface.COMPLETE, GatherGetFragment.this.poiEntity.getTaskId(), true, polygonEntity);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -501,8 +495,10 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
|
||||
/**
|
||||
* @param url 面妆任务立即采集
|
||||
* @param b
|
||||
*
|
||||
*/
|
||||
private void initCompleteTask(String url, int taskId, PoiEntity poiEntity) {
|
||||
private void initCompleteTask(String url, int taskId, boolean b, PoiEntity poiEntity) {
|
||||
if (taskId == 0) {
|
||||
Toast.makeText(getContext(), "无此任务", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@@ -526,9 +522,9 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// onBackPressed();
|
||||
// poiEntity.setTaskStatus(3);
|
||||
// initViewByTaskStatus(3);
|
||||
|
||||
// poiEntity.setTaskStatus(1);
|
||||
// initViewByTaskStatus(1);
|
||||
btnGather.setVisibility(View.GONE);
|
||||
btnFinishGather.setVisibility(View.VISIBLE);
|
||||
|
||||
@@ -745,10 +741,6 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
||||
public void run() {
|
||||
poiEntity.setTaskStatus(1);
|
||||
initViewByTaskStatus(1);
|
||||
// btnGetTask.setVisibility(View.GONE);
|
||||
// btnCancelGet.setVisibility(View.VISIBLE);
|
||||
// btnFinishGather.setVisibility(View.VISIBLE);
|
||||
// btnGather.setVisibility(View.GONE);
|
||||
if (isSaver) {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = Constant.GATHER_GET_MAP;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -12,6 +13,7 @@ import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.WebActivity;
|
||||
import com.navinfo.outdoor.adapter.MessageAdapter;
|
||||
import com.navinfo.outdoor.adapter.TaskPrefectureAdapter;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
@@ -56,7 +58,16 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
messageRecycler.setLoadingMoreEnabled(false);
|
||||
messageAdapter = new MessageAdapter(getContext());
|
||||
messageRecycler.setAdapter(messageAdapter);
|
||||
messageAdapter.setMessageClickItem(new MessageAdapter.messageClickItem() {
|
||||
@Override
|
||||
public void item(int id) {
|
||||
Intent intent = new Intent(getContext(), WebActivity.class);
|
||||
intent.putExtra("id", id);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
messageRecycler.getDefaultFootView().setNoMoreHint("已全部加载完毕");
|
||||
|
||||
messageRecycler.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
|
||||
@@ -107,6 +107,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
private LinearLayout linearContact;
|
||||
private ContactView contactView;
|
||||
private ArrayList<File> poiPicList;
|
||||
private String tagPanorama;
|
||||
|
||||
public static PoiFragment newInstance(Bundle bundle) {
|
||||
PoiFragment fragment = new PoiFragment();
|
||||
@@ -252,7 +253,20 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
initShowPoi();
|
||||
//禁用所有可操作控件
|
||||
//disables();
|
||||
|
||||
// ivPanorama.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
// @Override
|
||||
// public boolean onLongClick(View v) {
|
||||
// DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
|
||||
// MessageDialog.show((AppCompatActivity) getContext(), "提示", "对否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||
// @Override
|
||||
// public boolean onClick(BaseDialog baseDialog, View v) {
|
||||
// tagPanorama.isEmpty();
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
// return true;
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
@@ -288,13 +302,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
if (!StringUtils.isEmpty(phones[i])) {
|
||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||
String[] split = phones[i].split("-");
|
||||
if (split!=null&&split.length>1) {
|
||||
if (split != null && split.length > 1) {
|
||||
poiBeans.add(new PhoneBean("电话", split[1] + "", split[0] + "", R.drawable.icon_add_bg));
|
||||
} else {
|
||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
||||
}
|
||||
} else {
|
||||
if (phones[i]!=null) {
|
||||
if (phones[i] != null) {
|
||||
poiBeans.add(new PhoneBean("电话", phones[i] + "", "", R.drawable.icon_add_bg));
|
||||
} else {
|
||||
poiBeans.add(new PhoneBean("电话", "", "", R.drawable.icon_add_bg));
|
||||
@@ -305,13 +319,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
if (!StringUtils.isEmpty(phones[i])) {
|
||||
if (phones[i].contains("-")) { // 包含区号数据的电话
|
||||
String[] split = phones[i].split("-");
|
||||
if (split!=null&&split.length>1) {
|
||||
if (split != null && split.length > 1) {
|
||||
poiBeans.add(new PhoneBean("", split[1] + "", split[0] + "", R.drawable.icon_del_bg));
|
||||
} else {
|
||||
poiBeans.add(new PhoneBean("", "", "", R.drawable.icon_del_bg));
|
||||
}
|
||||
} else {
|
||||
if (phones[i]!=null) {
|
||||
if (phones[i] != null) {
|
||||
poiBeans.add(new PhoneBean("", phones[i] + "", "", R.drawable.icon_del_bg));
|
||||
} else {
|
||||
poiBeans.add(new PhoneBean("", "", "", R.drawable.icon_del_bg));
|
||||
@@ -357,10 +371,11 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
}
|
||||
}
|
||||
if (showPoiEntity.getTaskStatus() == 3){
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -548,7 +563,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
String list = contactView.getList();
|
||||
poiEntity.setTelPhone(list);
|
||||
}
|
||||
String tagPanorama = (String) ivPanorama.getTag();
|
||||
tagPanorama = (String) ivPanorama.getTag();
|
||||
if (tagPanorama == null) {
|
||||
Toast.makeText(getActivity(), "请拍照 全景图", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
|
||||
@@ -312,7 +312,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
String formats = formatters.format(calendars.getTime());
|
||||
String city = Constant.currentLocation.getCity();//返回当前位置的城市.
|
||||
String district = Constant.currentLocation.getDistrict();//返回当前位置的区县.
|
||||
StringBuffer sb = new StringBuffer("poi录像上报");
|
||||
StringBuffer sb = new StringBuffer("道路录像上报");
|
||||
if (city != null && !"".equals(city)) {
|
||||
sb.append("-");
|
||||
sb.append(city);
|
||||
@@ -420,7 +420,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
}
|
||||
OkGo
|
||||
// 请求方式和请求url
|
||||
.<OtherUploadPicBean>post(HttpInterface.POI_VIDEO_UPLOAD_PIC)
|
||||
.<OtherUploadPicBean>post(HttpInterface.ROAD_TASK_UPLOAD_PIC)
|
||||
// 请求的 tag, 主要用于取消对应的请求
|
||||
.params("auditId", body)
|
||||
.params("file", fileZip)
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.navinfo.outdoor.fragment;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -12,18 +11,12 @@ import android.widget.CompoundButton;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||
import com.kongzue.dialog.interfaces.OnMenuItemClickListener;
|
||||
import com.kongzue.dialog.util.BaseDialog;
|
||||
@@ -31,19 +24,17 @@ import com.kongzue.dialog.util.DialogSettings;
|
||||
import com.kongzue.dialog.v3.BottomMenu;
|
||||
import com.kongzue.dialog.v3.MessageDialog;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.adapter.StaySubmitAdapter;
|
||||
import com.navinfo.outdoor.api.UserApplication;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.room.PoiDao;
|
||||
import com.navinfo.outdoor.room.PoiDatabase;
|
||||
import com.navinfo.outdoor.room.PoiEntity;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -90,6 +81,20 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
stayXrv.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL));
|
||||
staySubmitAdapter = new StaySubmitAdapter(getContext());
|
||||
stayXrv.setAdapter(staySubmitAdapter);
|
||||
staySubmitAdapter.setOnClickItem(new StaySubmitAdapter.onClickItem() {
|
||||
@Override
|
||||
public void item(int position, PoiEntity poiEntity) {
|
||||
// Intent subIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||
// subIntent.putExtra("poiEntity", poiEntity);
|
||||
// subIntent.putExtra("tag", 4);
|
||||
// startActivity(subIntent);
|
||||
|
||||
// Message obtain = Message.obtain();
|
||||
// obtain.what = Constant.EVENT_WHAT_COMPLETE_TASK;
|
||||
// obtain.obj = poiEntity;
|
||||
// EventBus.getDefault().post(obtain);
|
||||
}
|
||||
});
|
||||
cbSelect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
@@ -105,14 +110,15 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
// super.initData();
|
||||
// }
|
||||
|
||||
public List<PoiEntity> initRoadWord(int type){
|
||||
|
||||
public List<PoiEntity> initRoadWord(int type) {
|
||||
newEntities.clear();
|
||||
for (int i = 0; i < roadEntities.size(); i++) {
|
||||
PoiEntity poiEntity = roadEntities.get(i);
|
||||
if (type==0){
|
||||
if (type == 0) {
|
||||
newEntities.add(poiEntity);
|
||||
}else {
|
||||
if (poiEntity.getType()==type){
|
||||
} else {
|
||||
if (poiEntity.getType() == type) {
|
||||
newEntities.add(poiEntity);
|
||||
}
|
||||
}
|
||||
@@ -125,10 +131,10 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.cl_stay_type://1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
|
||||
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部","poi", "充电站", "poi录像", "道路录像","其他","面状任务"}, new OnMenuItemClickListener() {
|
||||
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部", "poi", "充电站", "poi录像", "道路录像", "其他", "面状任务"}, new OnMenuItemClickListener() {
|
||||
@Override
|
||||
public void onClick(String text, int index) {
|
||||
switch (index){
|
||||
switch (index) {
|
||||
case 0:
|
||||
List<PoiEntity> entities = initRoadWord(0);
|
||||
staySubmitAdapter.setAllRoad(entities);
|
||||
@@ -138,7 +144,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
staySubmitAdapter.setAllRoad(poiEntities);
|
||||
break;
|
||||
case 2:
|
||||
List<PoiEntity> stationEntities= initRoadWord(2);
|
||||
List<PoiEntity> stationEntities = initRoadWord(2);
|
||||
staySubmitAdapter.setAllRoad(stationEntities);
|
||||
break;
|
||||
case 3:
|
||||
@@ -179,7 +185,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
public void refreshData() {
|
||||
roadDatabase = PoiDatabase.getInstance(getContext());
|
||||
roadDao = roadDatabase.getPoiDao();
|
||||
if (roadEntities ==null) {
|
||||
if (roadEntities == null) {
|
||||
roadEntities = new ArrayList<>();
|
||||
}
|
||||
if (newEntities == null) {
|
||||
|
||||
@@ -444,7 +444,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void initMarker(PoiEntity poiEntity) {
|
||||
sliding_layout.setPanelHeight(0);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
||||
@@ -528,7 +527,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
switch (Integer.valueOf(poiEntity.getType())) {
|
||||
case 1://poi
|
||||
|
||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_have_bg);
|
||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.graypoi);
|
||||
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).alpha(0.9f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
@@ -540,7 +539,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
|
||||
break;
|
||||
case 2://充电站
|
||||
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_have_bg);
|
||||
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.graycharge);
|
||||
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor).alpha(0.9f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
@@ -560,7 +559,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
removablesLocality.add(poiVideoMarker);
|
||||
break;
|
||||
case 4://道路录像
|
||||
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_have_bg);
|
||||
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.grayroad);
|
||||
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).alpha(0.9f)
|
||||
.flat(true)
|
||||
.clockwise(false));
|
||||
@@ -841,7 +840,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
}
|
||||
} else if (data.what == Constant.GATHER_GET_RETURN) {//item 点击页面的返回事件的处理
|
||||
if ((boolean) data.obj) {
|
||||
|
||||
frameLayout.setVisibility(View.GONE);
|
||||
sliding_layout.setPanelHeight(1000);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||
@@ -893,6 +891,40 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
int type = data.arg1;
|
||||
showPoiMarkerByType(type, latLng);
|
||||
}
|
||||
// else if (data.what == Constant.EVENT_WHAT_COMPLETE_TASK){
|
||||
// // 如果当前fragment是筛选,则移除该fragment
|
||||
// FilterFragment filterFragment = (FilterFragment) supportFragmentManager.findFragmentByTag(FilterFragment.class.getName());
|
||||
// if (filterFragment != null) {
|
||||
// fragmentTransaction.remove(filterFragment);
|
||||
// //fragmentTransaction.commit();
|
||||
// }
|
||||
// PoiEntity poiEntity = (PoiEntity) data.obj;
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putSerializable("poiEntity", poiEntity);
|
||||
// switch (poiEntity.getType()) {
|
||||
// case 1:
|
||||
// PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
||||
// showSlidingFragment(poiFragment);
|
||||
// break;
|
||||
// case 2:
|
||||
// ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
|
||||
// showSlidingFragment(chargingStationFragment);
|
||||
// break;
|
||||
// case 3:
|
||||
// PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
|
||||
// showSlidingFragment(poiVideoFragment);
|
||||
// break;
|
||||
// case 4:
|
||||
// RoadFragment roadFragment = RoadFragment.newInstance(bundle);
|
||||
// showSlidingFragment(roadFragment);
|
||||
// break;
|
||||
// case 5:
|
||||
// OtherFragment otherFragment = OtherFragment.newInstance(bundle);
|
||||
// showSlidingFragment(otherFragment);
|
||||
// break;
|
||||
// }
|
||||
// frameLayout.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -912,7 +944,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
||||
|
||||
private void initFilterMarker(List<PoiEntity> poiEntities) {
|
||||
sliding_layout.setPanelHeight(1000);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
||||
for (int i = 0; i < poiEntities.size(); i++) {
|
||||
LatLng position = new LatLng(Double.valueOf(poiEntities.get(i).getY()), Double.valueOf(poiEntities.get(i).getX()));
|
||||
tencentMap.addMarker(new MarkerOptions(position));
|
||||
|
||||
@@ -163,8 +163,7 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
||||
@Override
|
||||
public void onSuccess(UserPriceExchangeBean response, int id) {
|
||||
dismissLoadingDialog();
|
||||
// Toast.makeText(getContext(), "获取成功", Toast.LENGTH_SHORT).show();
|
||||
|
||||
Toast.makeText(getContext(), "提现成功", Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onSuccess: " + response.toString() + "tttttttt");
|
||||
}
|
||||
|
||||
|
||||
@@ -64,10 +64,16 @@ public class HttpInterface {
|
||||
public static final String RECEIVED_POI_VIDEO_TASK = IPm6 + "poivideotask/1/receivedPoivideotask";//poi录像任务获取
|
||||
// 172.23.139.4:8003/poivideotask/1/submitPoivideotask
|
||||
public static final String INSIDE_API_LIST = IPm6 + "poivideotask/1/submitPoivideotask";//poi录像 保存
|
||||
//172.23.139.4:8003/roadtask/1/submitRoadtask?taskId=0&name=段哥&address=二娃&memo=1rn7exd5uhxy&workType=2
|
||||
public static final String ROAD_TASK_SUBMIT = IPm6+"roadtask/1/submitRoadtask";
|
||||
|
||||
//172.23.139.4:8003/poivideotask/1/uploadpic
|
||||
public static final String POI_VIDEO_UPLOAD_PIC = IPm6 + "poivideotask/1/uploadpic";//poi录像-上传
|
||||
|
||||
//172.23.139.4:8003/roadtask/1/submitRoadtask?taskId=0&name=段哥&address=二娃&memo=1rn7exd5uhxy&workType=2
|
||||
public static final String ROAD_TASK_SUBMIT = IPm6+"roadtask/1/submitRoadtask";//道路录像-保存本地
|
||||
|
||||
//172.23.139.4:8003/roadtask/1/uploadpic
|
||||
public static final String ROAD_TASK_UPLOAD_PIC=IPm6+"roadtask/1/uploadpic";//道路录像—上传
|
||||
|
||||
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
|
||||
public static final String GET_PHONE = IPm6 + "m4/task/1/getPhone"; //任务搜索
|
||||
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
|
||||
|
||||
Reference in New Issue
Block a user