添加发现页面的调试接口
This commit is contained in:
parent
cdd9af4fee
commit
e209eae9a0
@ -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"
|
||||||
|
@ -26,19 +26,19 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
|||||||
private ImageView ivIcon;
|
private ImageView ivIcon;
|
||||||
private WebView nWebView;
|
private WebView nWebView;
|
||||||
private String content = "<div>\n" +
|
private String content = "<div>\n" +
|
||||||
"<h2>定义和用法</h2>\n" +
|
"<a>测试</a>\n" +
|
||||||
"\n" +
|
// "\n" +
|
||||||
"<p>\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" +
|
// "\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" +
|
// "</p>\n" +
|
||||||
"\n" +
|
// "\n" +
|
||||||
"<p style=\"color: red; margin-left: 20px\"><style> 标签用于为 HTML 文档定义样式信息。</p>\n" +
|
// "<p style=\"color: red; margin-left: 20px\"><style> 标签用于为 HTML 文档定义样式信息。</p>\n" +
|
||||||
"\n" +
|
// "\n" +
|
||||||
"<p style=\"background-color: lightblue; margin-left: 20px\">在 style 中,您可以规定在浏览器中如何呈现 HTML 文档。</p>\n" +
|
// "<p style=\"background-color: lightblue; margin-left: 20px\">在 style 中,您可以规定在浏览器中如何呈现 HTML 文档。</p>\n" +
|
||||||
"\n" +
|
// "\n" +
|
||||||
"<p style=\"font-family: verdana; margin-left: 20px\">type 属性是必需的,定义 style 元素的内容。唯一可能的值是 \"text/css\"。</p>\n" +
|
// "<p style=\"font-family: verdana; margin-left: 20px\">type 属性是必需的,定义 style 元素的内容。唯一可能的值是 \"text/css\"。</p>\n" +
|
||||||
"\n" +
|
// "\n" +
|
||||||
"<p style=\"font-size: 20px; margin-left: 20px\">style 元素位于 head 部分中。</p>\n" +
|
// "<p style=\"font-size: 20px; margin-left: 20px\">style 元素位于 head 部分中。</p>\n" +
|
||||||
"</div>";
|
"</div>";
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
|
@ -15,18 +15,21 @@ import com.bumptech.glide.load.resource.bitmap.CircleCrop;
|
|||||||
import com.bumptech.glide.request.RequestOptions;
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.bean.CapacityMeasureBean;
|
import com.navinfo.outdoor.bean.CapacityMeasureBean;
|
||||||
|
import com.navinfo.outdoor.bean.TaskExplainBean;
|
||||||
|
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
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<CapacityMeasureBean.BodyBean.DataBean> capacityList = new ArrayList<>();
|
private List<TaskPrefectureBean.BodyBean.ListBean> capacityList = new ArrayList<>();
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
public CapacityEvaluationAdapter(Context context) {
|
public CapacityEvaluationAdapter(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCapacityList(List<CapacityMeasureBean.BodyBean.DataBean> capacityList) {
|
public void setCapacityList(List<TaskPrefectureBean.BodyBean.ListBean> capacityList) {
|
||||||
this.capacityList.addAll(capacityList);
|
this.capacityList.addAll(capacityList);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
@ -41,8 +44,8 @@ public class CapacityEvaluationAdapter extends RecyclerView.Adapter<CapacityEval
|
|||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
holder.tvCapacity.setText(capacityList.get(position).getTitle());
|
holder.tvCapacity.setText(capacityList.get(position).getTitle());
|
||||||
holder.tvResults.setText(capacityList.get(position).getStatus());
|
holder.tvResults.setText(capacityList.get(position).getStatus() + "");
|
||||||
Glide.with(context).load(capacityList.get(position).getSrc()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapacity);
|
Glide.with(context).load(capacityList.get(position).getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapacity);
|
||||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -15,19 +15,20 @@ import com.bumptech.glide.load.resource.bitmap.CircleCrop;
|
|||||||
import com.bumptech.glide.request.RequestOptions;
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.bean.CapacityMeasureBean;
|
import com.navinfo.outdoor.bean.CapacityMeasureBean;
|
||||||
|
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class CapacityItemAdapter extends RecyclerView.Adapter<CapacityItemAdapter.ViewHolder> {
|
public class CapacityItemAdapter extends RecyclerView.Adapter<CapacityItemAdapter.ViewHolder> {
|
||||||
private List<CapacityMeasureBean.BodyBean.DataBean> capItemList = new ArrayList<>();
|
private List<TaskPrefectureBean.BodyBean.ListBean> capItemList = new ArrayList<>();
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
public CapacityItemAdapter(Context context) {
|
public CapacityItemAdapter(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCapItemList(List<CapacityMeasureBean.BodyBean.DataBean> capItemList) {
|
public void setCapItemList(List<TaskPrefectureBean.BodyBean.ListBean> capItemList) {
|
||||||
this.capItemList.addAll(capItemList);
|
this.capItemList.addAll(capItemList);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
@ -42,8 +43,8 @@ public class CapacityItemAdapter extends RecyclerView.Adapter<CapacityItemAdapte
|
|||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
holder.tvCapItem.setText(capItemList.get(position).getTitle());
|
holder.tvCapItem.setText(capItemList.get(position).getTitle());
|
||||||
holder.tvReaus.setText(capItemList.get(position).getStatus());
|
holder.tvReaus.setText(capItemList.get(position).getStatus()+"");
|
||||||
Glide.with(context).load(capItemList.get(position).getSrc()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapItem);
|
Glide.with(context).load(capItemList.get(position).getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivCapItem);
|
||||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -11,19 +11,20 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
|
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.bean.EventPrefectureBean;
|
import com.navinfo.outdoor.bean.EventPrefectureBean;
|
||||||
|
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
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<EventPrefectureBean.BodyBean.DataBean> dataBeans=new ArrayList<>();
|
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeans=new ArrayList<>();
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
public EventPrefectureAdapter(Context context) {
|
public EventPrefectureAdapter(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataBeans(List<EventPrefectureBean.BodyBean.DataBean> dataBeans) {
|
public void setDataBeans(List<TaskPrefectureBean.BodyBean.ListBean> dataBeans) {
|
||||||
this.dataBeans.addAll(dataBeans);
|
this.dataBeans.addAll(dataBeans);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
@ -37,15 +38,15 @@ public class EventPrefectureAdapter extends RecyclerView.Adapter<EventPrefecture
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
EventPrefectureBean.BodyBean.DataBean dataBean = dataBeans.get(position);
|
TaskPrefectureBean.BodyBean.ListBean listBean = dataBeans.get(position);
|
||||||
holder.tvTitle.setText(dataBean.getTitle());
|
holder.tvTitle.setText(listBean.getTitle());
|
||||||
holder.tvDest.setText(dataBean.getSubtitle());
|
holder.tvDest.setText(listBean.getSubtitle());
|
||||||
holder.tvTime.setText(dataBean.getCreatetime());
|
holder.tvTime.setText(listBean.getCreatetime());
|
||||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (clickItem!=null){
|
if (clickItem!=null){
|
||||||
clickItem.item(dataBean.getId());
|
clickItem.item(listBean.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -15,19 +15,20 @@ import com.bumptech.glide.load.resource.bitmap.CircleCrop;
|
|||||||
import com.bumptech.glide.request.RequestOptions;
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.bean.TaskExplainInfo;
|
import com.navinfo.outdoor.bean.TaskExplainInfo;
|
||||||
|
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
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<TaskExplainInfo.BodyBean.DataBean> explainList = new ArrayList<>();
|
private List<TaskPrefectureBean.BodyBean.ListBean> explainList = new ArrayList<>();
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
public TaskExplainAdapter(Context context) {
|
public TaskExplainAdapter(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setExplainList(List<TaskExplainInfo.BodyBean.DataBean> explainList) {
|
public void setExplainList(List<TaskPrefectureBean.BodyBean.ListBean> explainList) {
|
||||||
this.explainList.addAll(explainList);
|
this.explainList.addAll(explainList);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
@ -42,7 +43,7 @@ public class TaskExplainAdapter extends RecyclerView.Adapter<TaskExplainAdapter.
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
Glide.with(context).load(explainList.get(position).getSrc()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivExplain);
|
Glide.with(context).load(explainList.get(position).getIconurl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(holder.ivExplain);
|
||||||
holder.tvExplain.setText(explainList.get(position).getTitle());
|
holder.tvExplain.setText(explainList.get(position).getTitle());
|
||||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -11,19 +11,20 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
|
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.bean.TaskExplainBean;
|
import com.navinfo.outdoor.bean.TaskExplainBean;
|
||||||
|
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
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<TaskExplainBean.BodyBean.DataBean> dataBeans=new ArrayList<>();
|
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeans=new ArrayList<>();
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
public TaskPrefectureAdapter(Context context) {
|
public TaskPrefectureAdapter(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDataBeans(List<TaskExplainBean.BodyBean.DataBean> dataBeans) {
|
public void setDataBeans(List<TaskPrefectureBean.BodyBean.ListBean> dataBeans) {
|
||||||
this.dataBeans.addAll(dataBeans);
|
this.dataBeans.addAll(dataBeans);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
@ -37,7 +38,7 @@ public class TaskPrefectureAdapter extends RecyclerView.Adapter<TaskPrefectureAd
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
TaskExplainBean.BodyBean.DataBean dataBean = dataBeans.get(position);
|
TaskPrefectureBean.BodyBean.ListBean dataBean = dataBeans.get(position);
|
||||||
holder.tvTitle.setText(dataBean.getTitle());
|
holder.tvTitle.setText(dataBean.getTitle());
|
||||||
holder.tvDest.setText(dataBean.getSubtitle());
|
holder.tvDest.setText(dataBean.getSubtitle());
|
||||||
holder.tvTime.setText(dataBean.getCreatetime());
|
holder.tvTime.setText(dataBean.getCreatetime());
|
||||||
|
@ -63,7 +63,6 @@ public abstract class BaseDrawerFragment extends BaseFragment {
|
|||||||
obtain.what= Constant.TREASURE_FRAGMENT;
|
obtain.what= Constant.TREASURE_FRAGMENT;
|
||||||
obtain.obj=isSliding;
|
obtain.obj=isSliding;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
|
|
||||||
Message mainButtonVisiableMsg = Message.obtain();
|
Message mainButtonVisiableMsg = Message.obtain();
|
||||||
mainButtonVisiableMsg.what= Constant.MAIN_BUTTON_VISIABLE;
|
mainButtonVisiableMsg.what= Constant.MAIN_BUTTON_VISIABLE;
|
||||||
mainButtonVisiableMsg.obj= View.VISIBLE;
|
mainButtonVisiableMsg.obj= View.VISIBLE;
|
||||||
|
@ -0,0 +1,184 @@
|
|||||||
|
package com.navinfo.outdoor.bean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class TaskPrefectureBean {
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
private String message;
|
||||||
|
private BodyBean 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 BodyBean getBody() {
|
||||||
|
return body;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBody(BodyBean body) {
|
||||||
|
this.body = body;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class BodyBean {
|
||||||
|
private Integer pageNum;
|
||||||
|
private Integer pageSize;
|
||||||
|
private Integer totalPage;
|
||||||
|
private Integer total;
|
||||||
|
private List<ListBean> list;
|
||||||
|
|
||||||
|
public Integer getPageNum() {
|
||||||
|
return pageNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageNum(Integer pageNum) {
|
||||||
|
this.pageNum = pageNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPageSize() {
|
||||||
|
return pageSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageSize(Integer pageSize) {
|
||||||
|
this.pageSize = pageSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTotalPage() {
|
||||||
|
return totalPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalPage(Integer totalPage) {
|
||||||
|
this.totalPage = totalPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTotal() {
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotal(Integer total) {
|
||||||
|
this.total = total;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ListBean> getList() {
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(List<ListBean> list) {
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ListBean {
|
||||||
|
private Integer id;
|
||||||
|
private String title;
|
||||||
|
private String subtitle;
|
||||||
|
private Object context;
|
||||||
|
private String iconurl;
|
||||||
|
private Integer createpid;
|
||||||
|
private String createtime;
|
||||||
|
private Integer fid;
|
||||||
|
private Integer updatepid;
|
||||||
|
private String updatetime;
|
||||||
|
private Object status;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubtitle() {
|
||||||
|
return subtitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubtitle(String subtitle) {
|
||||||
|
this.subtitle = subtitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getContext() {
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContext(Object context) {
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIconurl() {
|
||||||
|
return iconurl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIconurl(String iconurl) {
|
||||||
|
this.iconurl = iconurl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCreatepid() {
|
||||||
|
return createpid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatepid(Integer createpid) {
|
||||||
|
this.createpid = createpid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreatetime() {
|
||||||
|
return createtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatetime(String createtime) {
|
||||||
|
this.createtime = createtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFid() {
|
||||||
|
return fid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFid(Integer fid) {
|
||||||
|
this.fid = fid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUpdatepid() {
|
||||||
|
return updatepid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdatepid(Integer updatepid) {
|
||||||
|
this.updatepid = updatepid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdatetime() {
|
||||||
|
return updatetime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdatetime(String updatetime) {
|
||||||
|
this.updatetime = updatetime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Object status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -10,12 +10,14 @@ import android.widget.Toast;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||||
import com.navinfo.outdoor.adapter.CapacityEvaluationAdapter;
|
import com.navinfo.outdoor.adapter.CapacityEvaluationAdapter;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.CapacityMeasureBean;
|
import com.navinfo.outdoor.bean.CapacityMeasureBean;
|
||||||
import com.navinfo.outdoor.bean.TaskExplainInfo;
|
import com.navinfo.outdoor.bean.TaskExplainInfo;
|
||||||
|
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;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
@ -31,13 +33,9 @@ import java.util.ArrayList;
|
|||||||
* 发现-能力测评
|
* 发现-能力测评
|
||||||
*/
|
*/
|
||||||
public class CapacityEvaluationFragment extends BaseFragment implements View.OnClickListener {
|
public class CapacityEvaluationFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private ImageView ivEvaluationTaskFinish;
|
private ImageView ivEvaluationTaskFinish;
|
||||||
private XRecyclerView capacityEvaluationRecycler;
|
private XRecyclerView capacityEvaluationRecycler;
|
||||||
private CapacityEvaluationAdapter capacityEvaluationAdapter;
|
private CapacityEvaluationAdapter capacityEvaluationAdapter;
|
||||||
private ArrayList<TaskExplainInfo.BodyBean.DataBean> capacityList;
|
|
||||||
|
|
||||||
public static CapacityEvaluationFragment newInstance(Bundle bundle) {
|
public static CapacityEvaluationFragment newInstance(Bundle bundle) {
|
||||||
CapacityEvaluationFragment fragment = new CapacityEvaluationFragment();
|
CapacityEvaluationFragment fragment = new CapacityEvaluationFragment();
|
||||||
@ -89,23 +87,27 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
capacityList = new ArrayList<>();
|
|
||||||
initNewWork(true);
|
initNewWork();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNewWork(boolean b) {
|
private void initNewWork() {
|
||||||
|
HttpParams httpParams = new HttpParams();
|
||||||
|
httpParams.put("fid","1");
|
||||||
|
httpParams.put("pageNum","1");
|
||||||
|
httpParams.put("pageSize","2");
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.MSG_LISt)
|
.url(HttpInterface.MSG_LISt)
|
||||||
.method(OkGoBuilder.GET)
|
.method(OkGoBuilder.GET)
|
||||||
.cls(CapacityMeasureBean.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.json(new JSONObject())
|
.params(httpParams)
|
||||||
.callback(new Callback<CapacityMeasureBean>() {
|
.callback(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(CapacityMeasureBean response, int id) {
|
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
capacityEvaluationAdapter.setCapacityList(response.getBody().getData());
|
capacityEvaluationAdapter.setCapacityList(response.getBody().getList());
|
||||||
Log.d("TAG", "onSuccess: " + response.getMsg() + "sssssssssssss");
|
Log.d("TAG", "onSuccess: " + response.getMessage() + "sssssssssssss");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -12,8 +12,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.adapter.CapacityItemAdapter;
|
import com.navinfo.outdoor.adapter.CapacityItemAdapter;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.CapacityMeasureBean;
|
import com.navinfo.outdoor.bean.TaskPrefectureBean;
|
||||||
import com.navinfo.outdoor.bean.TaskExplainInfo;
|
|
||||||
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;
|
||||||
@ -22,8 +21,6 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
|||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 能力测评的第二个页面
|
* 能力测评的第二个页面
|
||||||
*/
|
*/
|
||||||
@ -32,13 +29,14 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
|||||||
private ImageView ivCapItemFinish;
|
private ImageView ivCapItemFinish;
|
||||||
private XRecyclerView capacityRlv;
|
private XRecyclerView capacityRlv;
|
||||||
private CapacityItemAdapter capacityItemAdapter;
|
private CapacityItemAdapter capacityItemAdapter;
|
||||||
private ArrayList<TaskExplainInfo.BodyBean.DataBean> capItemList;
|
|
||||||
|
|
||||||
public static CapacityEvaluationFragment2 newInstance(Bundle bundle) {
|
public static CapacityEvaluationFragment2 newInstance(Bundle bundle) {
|
||||||
CapacityEvaluationFragment2 fragment = new CapacityEvaluationFragment2();
|
CapacityEvaluationFragment2 fragment = new CapacityEvaluationFragment2();
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
return R.layout.fragment_capacity_evaluation2;
|
return R.layout.fragment_capacity_evaluation2;
|
||||||
@ -81,7 +79,7 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
capItemList = new ArrayList<>();
|
|
||||||
initNetWorks(true);
|
initNetWorks(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,14 +88,14 @@ public class CapacityEvaluationFragment2 extends BaseFragment implements View.On
|
|||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.MSG_LISt)
|
.url(HttpInterface.MSG_LISt)
|
||||||
.method(OkGoBuilder.GET)
|
.method(OkGoBuilder.GET)
|
||||||
.cls(CapacityMeasureBean.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.json(new JSONObject())
|
.json(new JSONObject())
|
||||||
.callback(new Callback<CapacityMeasureBean>() {
|
.callback(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(CapacityMeasureBean response, int id) {
|
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
capacityItemAdapter.setCapItemList(response.getBody().getData());
|
capacityItemAdapter.setCapItemList(response.getBody().getList());
|
||||||
Log.d("TAG", "onSuccess: " + response.getMsg() + "sssssssssssss");
|
Log.d("TAG", "onSuccess: " + response.getMessage() + "sssssssssssss");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -84,9 +84,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
String[] ctype = new String[]{"全部", "poi", "道路", "充电站", "其他"};
|
String[] ctype = new String[]{"全部", "poi", "道路", "充电站", "其他"};
|
||||||
private ArrayAdapter<String> adapter;
|
private ArrayAdapter<String> adapter;
|
||||||
private LinearLayout linearChargingPile;
|
private LinearLayout linearChargingPile;
|
||||||
|
private static ChargingStationFragment fragment;
|
||||||
|
|
||||||
public static ChargingStationFragment newInstance(Bundle bundle) {
|
public static ChargingStationFragment newInstance(Bundle bundle) {
|
||||||
ChargingStationFragment fragment = new ChargingStationFragment();
|
fragment = new ChargingStationFragment();
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
@ -105,6 +106,28 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
obtain.what = Constant.MAIN_HEADER;
|
obtain.what = Constant.MAIN_HEADER;
|
||||||
obtain.obj = header;
|
obtain.obj = header;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
|
ImageView ivChargingFinal = header.findViewById(R.id.iv_charging_final);
|
||||||
|
ivChargingFinal.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Bundle arguments = getArguments();
|
||||||
|
if (arguments!=null) {
|
||||||
|
isSliding= arguments.getBoolean("isSliding",true);
|
||||||
|
Log.d("TAG", "onCreatessss: "+isSliding);
|
||||||
|
}
|
||||||
|
if (isSliding) {
|
||||||
|
// 监听到返回按钮点击事件
|
||||||
|
Message obtain = Message.obtain();
|
||||||
|
obtain.what= Constant.TREASURE_FRAGMENT;
|
||||||
|
obtain.obj=isSliding;
|
||||||
|
EventBus.getDefault().post(obtain);
|
||||||
|
Message mainButtonVisiableMsg = Message.obtain();
|
||||||
|
mainButtonVisiableMsg.what= Constant.MAIN_BUTTON_VISIABLE;
|
||||||
|
mainButtonVisiableMsg.obj= View.VISIBLE;
|
||||||
|
EventBus.getDefault().post(mainButtonVisiableMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
@ -118,6 +141,29 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
obtain.what = Constant.MAIN_HEADER;
|
obtain.what = Constant.MAIN_HEADER;
|
||||||
obtain.obj = header;
|
obtain.obj = header;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
|
// ImageView ivChargingFinal = header.findViewById(R.id.iv_charging_final);
|
||||||
|
// ivChargingFinal.setOnClickListener(new View.OnClickListener() {
|
||||||
|
// @Override
|
||||||
|
// public void onClick(View v) {
|
||||||
|
// // fragment.dismissLoadingDialog();
|
||||||
|
// Bundle arguments = getArguments();
|
||||||
|
// if (arguments!=null) {
|
||||||
|
// isSliding= arguments.getBoolean("isSliding",true);
|
||||||
|
// Log.d("TAG", "onCreatessss: "+isSliding);
|
||||||
|
// }
|
||||||
|
// if (isSliding) {
|
||||||
|
// // 监听到返回按钮点击事件
|
||||||
|
// Message obtain = Message.obtain();
|
||||||
|
// obtain.what= Constant.TREASURE_FRAGMENT;
|
||||||
|
// obtain.obj=isSliding;
|
||||||
|
// EventBus.getDefault().post(obtain);
|
||||||
|
// Message mainButtonVisiableMsg = Message.obtain();
|
||||||
|
// mainButtonVisiableMsg.what= Constant.MAIN_BUTTON_VISIABLE;
|
||||||
|
// mainButtonVisiableMsg.obj= View.VISIBLE;
|
||||||
|
// EventBus.getDefault().post(mainButtonVisiableMsg);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -10,11 +10,13 @@ import android.widget.Toast;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.activity.WebActivity;
|
import com.navinfo.outdoor.activity.WebActivity;
|
||||||
import com.navinfo.outdoor.adapter.EventPrefectureAdapter;
|
import com.navinfo.outdoor.adapter.EventPrefectureAdapter;
|
||||||
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.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;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
@ -33,9 +35,9 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
|
|
||||||
private ImageView ivEventTask;
|
private ImageView ivEventTask;
|
||||||
private XRecyclerView eventRecycler;
|
private XRecyclerView eventRecycler;
|
||||||
private List<EventPrefectureBean.BodyBean.DataBean> taskExplainBean;
|
private List<TaskPrefectureBean.BodyBean.ListBean> taskExplainBean;
|
||||||
private EventPrefectureAdapter eventPrefectureAdapter;
|
private EventPrefectureAdapter eventPrefectureAdapter;
|
||||||
private int page = 1;
|
|
||||||
|
|
||||||
public static EventPrefectureFragment newInstance(Bundle bundle) {
|
public static EventPrefectureFragment newInstance(Bundle bundle) {
|
||||||
EventPrefectureFragment fragment = new EventPrefectureFragment();
|
EventPrefectureFragment fragment = new EventPrefectureFragment();
|
||||||
@ -54,22 +56,26 @@ 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(true);
|
initNetwork();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetwork(boolean b) {
|
private void initNetwork() {
|
||||||
|
HttpParams httpParams = new HttpParams();
|
||||||
|
httpParams.put("fid", "1");
|
||||||
|
httpParams.put("pageNum", "1");
|
||||||
|
httpParams.put("pageSize", "2");
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.listEvent)
|
.url(HttpInterface.listEvent)
|
||||||
.method(OkGoBuilder.GET)
|
.method(OkGoBuilder.GET)
|
||||||
.cls(EventPrefectureBean.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.json(new JSONObject())
|
.params(httpParams)
|
||||||
.callback(new Callback<EventPrefectureBean>() {
|
.callback(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(EventPrefectureBean eventPrefectureBean, int id) {
|
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
eventPrefectureAdapter.setDataBeans(eventPrefectureBean.getBody().getData());
|
eventPrefectureAdapter.setDataBeans(taskPrefectureBean.getBody().getList());
|
||||||
Log.d("TAG", "onSuccess: " + eventPrefectureBean.getMsg() + "sssssssssssss");
|
Log.d("TAG", "onSuccess: " + taskPrefectureBean.getMessage() + "sssssssssssss");
|
||||||
//initEventPrefecture(eventPrefectureBean,b);
|
//initEventPrefecture(eventPrefectureBean,b);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,45 +88,45 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
}).build();
|
}).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initEventPrefecture(EventPrefectureBean eventPrefectureBean, boolean start) {
|
// private void initEventPrefecture(TaskPrefectureBean taskPrefectureBean, boolean start) {
|
||||||
if (eventPrefectureBean.getStatus() == 0) {
|
// if (taskPrefectureBean.getStatus() == 0) {
|
||||||
if (start) {
|
// if (start) {
|
||||||
if (taskExplainBean.size() > 0) {
|
// if (taskExplainBean.size() > 0) {
|
||||||
taskExplainBean.clear();
|
// taskExplainBean.clear();
|
||||||
}
|
// }
|
||||||
if (eventPrefectureBean.getBody() == null) {
|
// if (taskPrefectureBean.getBody() == null) {
|
||||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||||
} else {
|
// } else {
|
||||||
taskExplainBean.addAll(eventPrefectureBean.getBody().getData());
|
// taskExplainBean.addAll(taskPrefectureBean.getBody().getList());
|
||||||
page++;
|
// page++;
|
||||||
}
|
// }
|
||||||
eventPrefectureAdapter.notifyDataSetChanged();
|
// eventPrefectureAdapter.notifyDataSetChanged();
|
||||||
eventRecycler.refreshComplete();
|
// eventRecycler.refreshComplete();
|
||||||
} else {
|
// } else {
|
||||||
if (eventPrefectureBean.getBody() == null) {
|
// if (taskPrefectureBean.getBody() == null) {
|
||||||
eventRecycler.setNoMore(true);
|
// eventRecycler.setNoMore(true);
|
||||||
} else {
|
// } else {
|
||||||
taskExplainBean.addAll(eventPrefectureBean.getBody().getData());
|
// taskExplainBean.addAll(taskPrefectureBean.getBody().getList());
|
||||||
eventPrefectureAdapter.notifyDataSetChanged();
|
// eventPrefectureAdapter.notifyDataSetChanged();
|
||||||
eventRecycler.loadMoreComplete();
|
// eventRecycler.loadMoreComplete();
|
||||||
page++;
|
// page++;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} else if (eventPrefectureBean.getStatus() == 2) {
|
// } else if (taskPrefectureBean.getStatus() == 2) {
|
||||||
if (start) {
|
// if (start) {
|
||||||
if (taskExplainBean.size() > 0) {
|
// if (taskExplainBean.size() > 0) {
|
||||||
taskExplainBean.clear();
|
// taskExplainBean.clear();
|
||||||
eventPrefectureAdapter.notifyDataSetChanged();
|
// eventPrefectureAdapter.notifyDataSetChanged();
|
||||||
}
|
// }
|
||||||
eventRecycler.refreshComplete();
|
// eventRecycler.refreshComplete();
|
||||||
} else {
|
// } else {
|
||||||
eventRecycler.setNoMore(true);
|
// eventRecycler.setNoMore(true);
|
||||||
}
|
// }
|
||||||
Toast.makeText(getActivity(), eventPrefectureBean.getMsg(), Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
} else {
|
// } else {
|
||||||
Toast.makeText(getActivity(), eventPrefectureBean.getMsg(), Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
|
@ -8,10 +8,12 @@ import android.view.View;
|
|||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||||
import com.kongzue.dialog.interfaces.OnMenuItemClickListener;
|
import com.kongzue.dialog.interfaces.OnMenuItemClickListener;
|
||||||
@ -23,15 +25,17 @@ import com.navinfo.outdoor.base.BaseDrawerFragment;
|
|||||||
import com.navinfo.outdoor.room.PoiDao;
|
import com.navinfo.outdoor.room.PoiDao;
|
||||||
import com.navinfo.outdoor.room.PoiDatabase;
|
import com.navinfo.outdoor.room.PoiDatabase;
|
||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class FilterFragment extends BaseDrawerFragment implements View.OnClickListener {
|
public class FilterFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||||
private Button btnFilter;
|
private Button btnFilter;
|
||||||
private XRecyclerView recyclerFilter;
|
private XRecyclerView recyclerFilter;
|
||||||
private TextView tvType, tvExclusive, tvPhotograph,tvNumber;
|
private TextView tvType, tvExclusive, tvPhotograph, tvNumber;
|
||||||
private ConstraintLayout clPhotograph, clExclusive, clType,clNumber;
|
private ConstraintLayout clPhotograph, clExclusive, clType, clNumber;
|
||||||
private PoiDatabase poiDatabase;
|
private PoiDatabase poiDatabase;
|
||||||
private PoiDao poiDao;
|
private PoiDao poiDao;
|
||||||
private FilterAdapter filterAdapter;
|
private FilterAdapter filterAdapter;
|
||||||
@ -53,10 +57,37 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
obtain.what = Constant.MAIN_HEADER;
|
obtain.what = Constant.MAIN_HEADER;
|
||||||
obtain.obj = header;
|
obtain.obj = header;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
|
ImageView ivFilterFinal = header.findViewById(R.id.iv_filter_final);
|
||||||
|
ivFilterFinal.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Bundle arguments = getArguments();
|
||||||
|
if (arguments != null) {
|
||||||
|
isSliding = arguments.getBoolean("isSliding", true);
|
||||||
|
Log.d("TAG", "onCreatessss: " + isSliding);
|
||||||
|
}
|
||||||
|
if (isSliding) {
|
||||||
|
// 监听到返回按钮点击事件
|
||||||
|
Message obtain = Message.obtain();
|
||||||
|
obtain.what = Constant.TREASURE_FRAGMENT;
|
||||||
|
obtain.obj = isSliding;
|
||||||
|
EventBus.getDefault().post(obtain);
|
||||||
|
Message mainButtonVisiableMsg = Message.obtain();
|
||||||
|
mainButtonVisiableMsg.what = Constant.MAIN_BUTTON_VISIABLE;
|
||||||
|
mainButtonVisiableMsg.obj = View.VISIBLE;
|
||||||
|
EventBus.getDefault().post(mainButtonVisiableMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
@ -65,6 +96,28 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
obtain.what = Constant.MAIN_HEADER;
|
obtain.what = Constant.MAIN_HEADER;
|
||||||
obtain.obj = header;
|
obtain.obj = header;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
|
// ImageView ivFilterFinal = header.findViewById(R.id.iv_filter_final);
|
||||||
|
// ivFilterFinal.setOnClickListener(new View.OnClickListener() {
|
||||||
|
// @Override
|
||||||
|
// public void onClick(View v) {
|
||||||
|
// Bundle arguments = getArguments();
|
||||||
|
// if (arguments != null) {
|
||||||
|
// isSliding = arguments.getBoolean("isSliding", true);
|
||||||
|
// Log.d("TAG", "onCreatessss: " + isSliding);
|
||||||
|
// }
|
||||||
|
// if (isSliding) {
|
||||||
|
// // 监听到返回按钮点击事件
|
||||||
|
// Message obtain = Message.obtain();
|
||||||
|
// obtain.what = Constant.TREASURE_FRAGMENT;
|
||||||
|
// obtain.obj = isSliding;
|
||||||
|
// EventBus.getDefault().post(obtain);
|
||||||
|
// Message mainButtonVisiableMsg = Message.obtain();
|
||||||
|
// mainButtonVisiableMsg.what = Constant.MAIN_BUTTON_VISIABLE;
|
||||||
|
// mainButtonVisiableMsg.obj = View.VISIBLE;
|
||||||
|
// EventBus.getDefault().post(mainButtonVisiableMsg);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -72,6 +125,11 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
return R.layout.fragment_filter;
|
return R.layout.fragment_filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
poiEntities.clear();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
@ -159,7 +217,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
break;
|
break;
|
||||||
case R.id.cl_number:
|
case R.id.cl_number:
|
||||||
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"200", "500","1000"}, new OnMenuItemClickListener() {
|
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"200", "500", "1000"}, new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(String text, int index) {
|
public void onClick(String text, int index) {
|
||||||
tvNumber.setText(text);
|
tvNumber.setText(text);
|
||||||
@ -167,7 +225,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case R.id.cl_photograph:
|
case R.id.cl_photograph:
|
||||||
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部","专属任务", "普通任务"}, new OnMenuItemClickListener() {
|
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部", "专属任务", "普通任务"}, new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(String text, int index) {
|
public void onClick(String text, int index) {
|
||||||
tvPhotograph.setText(text);
|
tvPhotograph.setText(text);
|
||||||
@ -176,7 +234,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case R.id.cl_exclusive:
|
case R.id.cl_exclusive:
|
||||||
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部","poi", "道路", "充电站", "其他"}, new OnMenuItemClickListener() {
|
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部", "poi", "道路", "充电站", "其他"}, new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(String text, int index) {
|
public void onClick(String text, int index) {
|
||||||
tvExclusive.setText(text);
|
tvExclusive.setText(text);
|
||||||
@ -184,12 +242,12 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case R.id.cl_type:
|
case R.id.cl_type:
|
||||||
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部","已领取", "待提交","未领取"}, new OnMenuItemClickListener() {
|
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部", "已领取", "待提交", "未领取"}, new OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(String text, int index) {
|
public void onClick(String text, int index) {
|
||||||
tvType.setText(text);
|
tvType.setText(text);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package com.navinfo.outdoor.fragment;
|
|||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
@ -44,7 +45,29 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
obtain.what = Constant.MAIN_HEADER;
|
obtain.what = Constant.MAIN_HEADER;
|
||||||
obtain.obj = header;
|
obtain.obj = header;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
|
//点击按钮返回上一页
|
||||||
|
ImageView ivOtherFinal = header.findViewById(R.id.iv_other_final);
|
||||||
|
ivOtherFinal.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Bundle arguments = getArguments();
|
||||||
|
if (arguments!=null) {
|
||||||
|
isSliding= arguments.getBoolean("isSliding",true);
|
||||||
|
Log.d("TAG", "onCreatessss: "+isSliding);
|
||||||
|
}
|
||||||
|
if (isSliding) {
|
||||||
|
// 监听到返回按钮点击事件
|
||||||
|
Message obtain = Message.obtain();
|
||||||
|
obtain.what= Constant.TREASURE_FRAGMENT;
|
||||||
|
obtain.obj=isSliding;
|
||||||
|
EventBus.getDefault().post(obtain);
|
||||||
|
Message mainButtonVisiableMsg = Message.obtain();
|
||||||
|
mainButtonVisiableMsg.what= Constant.MAIN_BUTTON_VISIABLE;
|
||||||
|
mainButtonVisiableMsg.obj= View.VISIBLE;
|
||||||
|
EventBus.getDefault().post(mainButtonVisiableMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
private CheckBox checkBoxRight;
|
private CheckBox checkBoxRight;
|
||||||
private String phone;
|
private String phone;
|
||||||
private PoiEntity showPoiEntity;
|
private PoiEntity showPoiEntity;
|
||||||
|
private View ivPoiFinal;
|
||||||
|
|
||||||
public static PoiFragment newInstance(Bundle bundle) {
|
public static PoiFragment newInstance(Bundle bundle) {
|
||||||
PoiFragment fragment = new PoiFragment();
|
PoiFragment fragment = new PoiFragment();
|
||||||
@ -106,8 +107,28 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
obtain.what = Constant.MAIN_HEADER;
|
obtain.what = Constant.MAIN_HEADER;
|
||||||
obtain.obj = header;
|
obtain.obj = header;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
|
ImageView ivPoiFinal = header.findViewById(R.id.iv_poi_final);
|
||||||
|
ivPoiFinal.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Bundle arguments = getArguments();
|
||||||
|
if (arguments!=null) {
|
||||||
|
isSliding= arguments.getBoolean("isSliding",true);
|
||||||
|
Log.d("TAG", "onCreatessss: "+isSliding);
|
||||||
|
}
|
||||||
|
if (isSliding) {
|
||||||
|
// 监听到返回按钮点击事件
|
||||||
|
Message obtain1 = Message.obtain();
|
||||||
|
obtain1.what= Constant.TREASURE_FRAGMENT;
|
||||||
|
obtain1.obj=isSliding;
|
||||||
|
EventBus.getDefault().post(obtain1);
|
||||||
|
Message mainButtonVisiableMsg = Message.obtain();
|
||||||
|
mainButtonVisiableMsg.what= Constant.MAIN_BUTTON_VISIABLE;
|
||||||
|
mainButtonVisiableMsg.obj= View.VISIBLE;
|
||||||
|
EventBus.getDefault().post(mainButtonVisiableMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -149,7 +170,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
rlInternalPhotos.setOnClickListener(this::onClick);
|
rlInternalPhotos.setOnClickListener(this::onClick);
|
||||||
rlCard = findViewById(R.id.rl_card);
|
rlCard = findViewById(R.id.rl_card);
|
||||||
rlCard.setOnClickListener(this::onClick);
|
rlCard.setOnClickListener(this::onClick);
|
||||||
|
// ivPoiFinal = findViewById(R.id.iv_poi_final);
|
||||||
|
// ivPoiFinal.setOnClickListener(this::onClick);
|
||||||
rlElse = findViewById(R.id.rl_else);
|
rlElse = findViewById(R.id.rl_else);
|
||||||
rlElse.setOnClickListener(this::onClick);
|
rlElse.setOnClickListener(this::onClick);
|
||||||
recyclerPhone = findViewById(R.id.recycler_phone);
|
recyclerPhone = findViewById(R.id.recycler_phone);
|
||||||
@ -379,6 +401,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
startActivityForResult(intentElse, 105);
|
startActivityForResult(intentElse, 105);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import android.graphics.Bitmap;
|
|||||||
import android.media.MediaMetadataRetriever;
|
import android.media.MediaMetadataRetriever;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@ -76,7 +77,22 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
ivPoiVideoFinal.setOnClickListener(new View.OnClickListener() {
|
ivPoiVideoFinal.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
getActivity().finish();
|
Bundle arguments = getArguments();
|
||||||
|
if (arguments!=null) {
|
||||||
|
isSliding= arguments.getBoolean("isSliding",true);
|
||||||
|
Log.d("TAG", "onCreatessss: "+isSliding);
|
||||||
|
}
|
||||||
|
if (isSliding) {
|
||||||
|
// 监听到返回按钮点击事件
|
||||||
|
Message obtain = Message.obtain();
|
||||||
|
obtain.what= Constant.TREASURE_FRAGMENT;
|
||||||
|
obtain.obj=isSliding;
|
||||||
|
EventBus.getDefault().post(obtain);
|
||||||
|
Message mainButtonVisiableMsg = Message.obtain();
|
||||||
|
mainButtonVisiableMsg.what= Constant.MAIN_BUTTON_VISIABLE;
|
||||||
|
mainButtonVisiableMsg.obj= View.VISIBLE;
|
||||||
|
EventBus.getDefault().post(mainButtonVisiableMsg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import android.graphics.Bitmap;
|
|||||||
import android.media.MediaMetadataRetriever;
|
import android.media.MediaMetadataRetriever;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@ -75,9 +76,35 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
obtain.what = Constant.MAIN_HEADER;
|
obtain.what = Constant.MAIN_HEADER;
|
||||||
obtain.obj = header;
|
obtain.obj = header;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
|
ImageView ivRoadFinal = header.findViewById(R.id.iv_road_final);
|
||||||
|
ivRoadFinal.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Bundle arguments = getArguments();
|
||||||
|
if (arguments!=null) {
|
||||||
|
isSliding= arguments.getBoolean("isSliding",true);
|
||||||
|
Log.d("TAG", "onCreatessss: "+isSliding);
|
||||||
|
}
|
||||||
|
if (isSliding) {
|
||||||
|
// 监听到返回按钮点击事件
|
||||||
|
Message obtain = Message.obtain();
|
||||||
|
obtain.what= Constant.TREASURE_FRAGMENT;
|
||||||
|
obtain.obj=isSliding;
|
||||||
|
EventBus.getDefault().post(obtain);
|
||||||
|
Message mainButtonVisiableMsg = Message.obtain();
|
||||||
|
mainButtonVisiableMsg.what= Constant.MAIN_BUTTON_VISIABLE;
|
||||||
|
mainButtonVisiableMsg.obj= View.VISIBLE;
|
||||||
|
EventBus.getDefault().post(mainButtonVisiableMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
@ -116,7 +143,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
// infos = new ArrayList<>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,11 +9,13 @@ import android.widget.ImageView;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||||
import com.navinfo.outdoor.adapter.TaskExplainAdapter;
|
import com.navinfo.outdoor.adapter.TaskExplainAdapter;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.TaskExplainInfo;
|
import com.navinfo.outdoor.bean.TaskExplainInfo;
|
||||||
|
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;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
@ -30,9 +32,9 @@ import java.util.ArrayList;
|
|||||||
public class TaskExplainFragment extends BaseFragment implements View.OnClickListener {
|
public class TaskExplainFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private ImageView ivFindTaskExplain;
|
private ImageView ivFindTaskExplain;
|
||||||
private XRecyclerView taskExplainRecycle;
|
private XRecyclerView taskExplainRecycle;
|
||||||
private ArrayList<TaskExplainInfo.BodyBean.DataBean> dataBeans;
|
|
||||||
private TaskExplainAdapter taskExplainAdapter;
|
private TaskExplainAdapter taskExplainAdapter;
|
||||||
private int page1 = 1;
|
|
||||||
|
|
||||||
public static TaskExplainFragment newInstance(Bundle bundle) {
|
public static TaskExplainFragment newInstance(Bundle bundle) {
|
||||||
TaskExplainFragment fragment = new TaskExplainFragment();
|
TaskExplainFragment fragment = new TaskExplainFragment();
|
||||||
@ -89,29 +91,32 @@ public class TaskExplainFragment extends BaseFragment implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
dataBeans = new ArrayList<>();
|
initNetWork();
|
||||||
initNetWork(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetWork(boolean b) {
|
private void initNetWork() {
|
||||||
|
HttpParams httpParams = new HttpParams();
|
||||||
|
httpParams.put("fid", "1");
|
||||||
|
httpParams.put("pageNum", "1");
|
||||||
|
httpParams.put("pageSize", "2");
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.listTaskExplain)
|
.url(HttpInterface.listTaskExplain)
|
||||||
.method(OkGoBuilder.GET)
|
.method(OkGoBuilder.GET)
|
||||||
.cls(TaskExplainInfo.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.json(new JSONObject())
|
.params(httpParams)
|
||||||
.callback(new Callback<TaskExplainInfo>() {
|
.callback(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskExplainInfo response, int id) {
|
public void onSuccess(TaskPrefectureBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
taskExplainAdapter.setExplainList(response.getBody().getData());
|
taskExplainAdapter.setExplainList(response.getBody().getList());
|
||||||
Log.d("TAG", "onSuccess: " + response.getMsg() + "");
|
Log.d("TAG", "onSuccess: " + response.getMessage() + "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
// Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
}).build();
|
||||||
|
@ -10,11 +10,13 @@ import android.widget.Toast;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.activity.WebActivity;
|
import com.navinfo.outdoor.activity.WebActivity;
|
||||||
import com.navinfo.outdoor.adapter.TaskPrefectureAdapter;
|
import com.navinfo.outdoor.adapter.TaskPrefectureAdapter;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.TaskExplainBean;
|
import com.navinfo.outdoor.bean.TaskExplainBean;
|
||||||
|
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;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
@ -24,24 +26,26 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
|||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发现-任务专区
|
* 发现-任务专区
|
||||||
*/
|
*/
|
||||||
public class TaskPrefectureFragment extends BaseFragment implements View.OnClickListener{
|
public class TaskPrefectureFragment extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private ImageView mIvFindTask;
|
private ImageView mIvFindTask;
|
||||||
private XRecyclerView taskRecycler;
|
private XRecyclerView taskRecycler;
|
||||||
private List<TaskExplainBean.BodyBean.DataBean> dataBeanList;
|
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeanList;
|
||||||
private TaskPrefectureAdapter taskPrefectureAdapter;
|
private TaskPrefectureAdapter taskPrefectureAdapter;
|
||||||
private int page=1;
|
|
||||||
|
|
||||||
public static TaskPrefectureFragment newInstance(Bundle bundle) {
|
public static TaskPrefectureFragment newInstance(Bundle bundle) {
|
||||||
TaskPrefectureFragment fragment = new TaskPrefectureFragment();
|
TaskPrefectureFragment fragment = new TaskPrefectureFragment();
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
return R.layout.task_prefecture_fragment;
|
return R.layout.task_prefecture_fragment;
|
||||||
@ -54,7 +58,7 @@ 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.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
|
||||||
taskRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
taskRecycler.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
|
||||||
taskRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
taskRecycler.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
|
||||||
//取消上拉加载,刷新功能。
|
//取消上拉加载,刷新功能。
|
||||||
@ -78,7 +82,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
public void item(int id) {
|
public void item(int id) {
|
||||||
Intent intent = new Intent(getContext(), WebActivity.class);
|
Intent intent = new Intent(getContext(), WebActivity.class);
|
||||||
intent.putExtra("id",id);
|
intent.putExtra("id", id);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -87,79 +91,83 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
dataBeanList=new ArrayList<>();
|
dataBeanList = new ArrayList<>();
|
||||||
initNetwork(true);
|
initNetwork();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetwork(boolean start) {
|
private void initNetwork() {
|
||||||
|
HttpParams httpParams = new HttpParams();
|
||||||
|
httpParams.put("fid", "1");
|
||||||
|
httpParams.put("pageNum", "1");
|
||||||
|
httpParams.put("pageSize", "2");
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.listTask)
|
.url(HttpInterface.listTask)
|
||||||
.method(OkGoBuilder.GET)
|
.method(OkGoBuilder.GET)
|
||||||
.cls(TaskExplainBean.class)
|
.cls(TaskPrefectureBean.class)
|
||||||
.json(new JSONObject())
|
.params(httpParams)
|
||||||
.callback(new Callback<TaskExplainBean>() {
|
.callback(new Callback<TaskPrefectureBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(TaskExplainBean taskSpecificationBean, int id) {
|
public void onSuccess(TaskPrefectureBean taskPrefectureBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
taskPrefectureAdapter.setDataBeans(taskSpecificationBean.getBody().getData());
|
taskPrefectureAdapter.setDataBeans(taskPrefectureBean.getBody().getList());
|
||||||
Log.d("TAG", "onSuccess: "+taskSpecificationBean.getMsg()+"");
|
Log.d("TAG", "onSuccess: " + taskPrefectureBean.getMessage() + "");
|
||||||
//initTaskSpecification(taskSpecificationBean,start);
|
//initTaskSpecification(taskSpecificationBean,start);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Log.d("TAG", "onError: "+e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
}).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initTaskSpecification(TaskExplainBean taskSpecificationBean, boolean start) {
|
// private void initTaskSpecification(TaskPrefectureBean taskPrefectureBean, boolean start) {
|
||||||
if (taskSpecificationBean.getStatus()==0) {
|
// if (taskPrefectureBean.getStatus() == 0) {
|
||||||
if (start) {
|
// if (start) {
|
||||||
if (dataBeanList.size() > 0) {
|
// if (dataBeanList.size() > 0) {
|
||||||
dataBeanList.clear();
|
// dataBeanList.clear();
|
||||||
}
|
// }
|
||||||
if (taskSpecificationBean.getBody() == null) {
|
// if (taskPrefectureBean.getBody() == null) {
|
||||||
Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getActivity(), "没有相关数据", Toast.LENGTH_SHORT).show();
|
||||||
} else {
|
// } else {
|
||||||
dataBeanList.addAll(taskSpecificationBean.getBody().getData());
|
// dataBeanList.addAll(taskPrefectureBean.getBody().getList());
|
||||||
page++;
|
// page++;
|
||||||
}
|
// }
|
||||||
taskPrefectureAdapter.notifyDataSetChanged();
|
// taskPrefectureAdapter.notifyDataSetChanged();
|
||||||
taskRecycler.refreshComplete();
|
// taskRecycler.refreshComplete();
|
||||||
} else {
|
// } else {
|
||||||
if (taskSpecificationBean.getBody() == null) {
|
// if (taskPrefectureBean.getBody() == null) {
|
||||||
taskRecycler.setNoMore(true);
|
// taskRecycler.setNoMore(true);
|
||||||
} else {
|
// } else {
|
||||||
dataBeanList.addAll(taskSpecificationBean.getBody().getData());
|
// dataBeanList.addAll(taskPrefectureBean.getBody().getList());
|
||||||
taskPrefectureAdapter.notifyDataSetChanged();
|
// taskPrefectureAdapter.notifyDataSetChanged();
|
||||||
taskRecycler.loadMoreComplete();
|
// taskRecycler.loadMoreComplete();
|
||||||
page++;
|
// page++;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} else if (taskSpecificationBean.getStatus() == 2) {
|
// } else if (taskPrefectureBean.getStatus() == 2) {
|
||||||
if (start) {
|
// if (start) {
|
||||||
if (dataBeanList.size() > 0) {
|
// if (dataBeanList.size() > 0) {
|
||||||
dataBeanList.clear();
|
// dataBeanList.clear();
|
||||||
taskPrefectureAdapter.notifyDataSetChanged();
|
// taskPrefectureAdapter.notifyDataSetChanged();
|
||||||
}
|
// }
|
||||||
taskRecycler.refreshComplete();
|
// taskRecycler.refreshComplete();
|
||||||
}else {
|
// } else {
|
||||||
taskRecycler.setNoMore(true);
|
// taskRecycler.setNoMore(true);
|
||||||
}
|
// }
|
||||||
Toast.makeText(getActivity(), taskSpecificationBean.getMsg(), Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
} else {
|
// } else {
|
||||||
Toast.makeText(getActivity(), taskSpecificationBean.getMsg(), Toast.LENGTH_SHORT).show();
|
// Toast.makeText(getActivity(), taskPrefectureBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()){
|
switch (v.getId()) {
|
||||||
case R.id.iv_find_task:
|
case R.id.iv_find_task:
|
||||||
getActivity().finish();
|
getActivity().finish();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -477,15 +477,15 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
public void initHeader(View view) {
|
public void initHeader(View view) {
|
||||||
dragView.removeAllViews();
|
dragView.removeAllViews();
|
||||||
dragView.addView(view);
|
dragView.addView(view);
|
||||||
view.findViewById(R.id.iv_final).setOnClickListener(new View.OnClickListener() {
|
// view.findViewById(R.id.iv_final).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onClick(View v) {
|
// public void onClick(View v) {
|
||||||
frameLayout.setVisibility(View.GONE);
|
// frameLayout.setVisibility(View.GONE);
|
||||||
sliding_layout.setPanelHeight(0);
|
// sliding_layout.setPanelHeight(0);
|
||||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
// sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.HIDDEN);
|
||||||
setMainButtonVisiable(View.VISIBLE);
|
// setMainButtonVisiable(View.VISIBLE);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,13 +2,15 @@ package com.navinfo.outdoor.http;
|
|||||||
|
|
||||||
public class HttpInterface {
|
public class HttpInterface {
|
||||||
//http://172.21.91.160:8000/api/user/list
|
//http://172.21.91.160:8000/api/user/list
|
||||||
public static final String IP1 = "http://172.21.91.160:8000/api/1/";
|
//发现接口
|
||||||
|
//http://172.23.139.4:8002/m4/findAndMessage/1/msg_list?fid=1&pageNum=1&pageSize=2
|
||||||
|
public static final String IP1 = "http://172.23.139.4:8002/m4/findAndMessage/1/";
|
||||||
public static final String IPm4 = "https://mockapi.eolinker.com/m5LxPbRb58eec57f4943420b1eb3b4e95b93968619a2973/m4/1/";
|
public static final String IPm4 = "https://mockapi.eolinker.com/m5LxPbRb58eec57f4943420b1eb3b4e95b93968619a2973/m4/1/";
|
||||||
//发现:测试接口
|
//发现:测试接口
|
||||||
public static final String listTask = IP1 + "task/list";//任务专区
|
public static final String listTask = IP1 + "msg_list";//任务专区
|
||||||
public static final String listEvent = IP1 + "task/list";//活动专区
|
public static final String listEvent = IP1 + "msg_list";//活动专区
|
||||||
public static final String listTaskExplain = IP1 + "task/info";//任务说明
|
public static final String listTaskExplain = IP1 + "msg_list";//任务说明
|
||||||
public static final String MSG_LISt = IPm4 + "msg_list";//发现查询接口
|
public static final String MSG_LISt = IP1 + "msg_list";//发现查询接口
|
||||||
public static final String MSG_CONTENT = IPm4 + "msg_content";//发现 -富文本详情页请求
|
public static final String MSG_CONTENT = IPm4 + "msg_content";//发现 -富文本详情页请求
|
||||||
public static final String EXAM_CONTENT = IPm4 + "exam_content";//发现 -能力测评获取试题接口
|
public static final String EXAM_CONTENT = IPm4 + "exam_content";//发现 -能力测评获取试题接口
|
||||||
public static final String EXAM_SUBMIT = IPm4 + "exam_submit";//发现 -能力测评提交试卷 post
|
public static final String EXAM_SUBMIT = IPm4 + "exam_submit";//发现 -能力测评提交试卷 post
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_final"
|
android:id="@+id/iv_charging_final"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_final"
|
android:id="@+id/iv_filter_final"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_final"
|
android:id="@+id/iv_other_final"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_01"
|
android:id="@+id/tv_01"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -23,7 +22,7 @@
|
|||||||
android:text="01基本资料填写"
|
android:text="01基本资料填写"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/linear_pot"
|
android:id="@+id/linear_pot"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_final"
|
android:id="@+id/iv_poi_final"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_final"
|
android:id="@+id/iv_road_final"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user