修改富文本url和空指针异常
This commit is contained in:
parent
a2afb3dc92
commit
201e381d1f
@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.2'
|
||||
// ndkVersion '23.0.7123448'
|
||||
ndkVersion '23.0.7123448'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.navinfo.outdoor"
|
||||
|
@ -69,7 +69,7 @@ public class WebActivity extends BaseActivity implements View.OnClickListener {
|
||||
Map<String, String> map = (HashMap<String, String>) bundle.getSerializable("map");
|
||||
if (map!=null&&!map.isEmpty()){
|
||||
for(Map.Entry<String, String> entry : map.entrySet()){
|
||||
httpParams.put(entry.getKey(),entry.getValue());
|
||||
httpParams.put(entry.getKey(),entry.getValue());
|
||||
}
|
||||
}
|
||||
OkGoBuilder.getInstance().Builder(this)
|
||||
|
@ -44,7 +44,7 @@ public class IssueProblemAdapter extends RecyclerView.Adapter<IssueProblemAdapte
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onIssueClick != null) {
|
||||
onIssueClick.onClick(position);
|
||||
onIssueClick.onClick(issueList.get(position).getId());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -48,7 +48,6 @@ public class PoiTaskAdapter extends RecyclerView.Adapter<PoiTaskAdapter.ViewHold
|
||||
}else if (listBean.getAuditStatus() == -1){
|
||||
holder.tvAuditStatus.setText("待审核");
|
||||
}
|
||||
|
||||
holder.tvMany.setText("¥0.0");
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class TaskExplainAdapter extends RecyclerView.Adapter<TaskExplainAdapter.
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mOnItemClick != null) {
|
||||
mOnItemClick.onClick(position);
|
||||
mOnItemClick.onClick(explainList.get(position).getId());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -44,7 +44,7 @@ public class TaskExplainAdapter2 extends RecyclerView.Adapter<TaskExplainAdapter
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mOnItemClick2!=null){
|
||||
mOnItemClick2.onClick2(position);
|
||||
mOnItemClick2.onClick2(explainList2.get(position).getId());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.navinfo.outdoor.base;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
@ -25,10 +26,14 @@ import com.navinfo.outdoor.R;
|
||||
import com.kongzue.dialog.interfaces.OnBackClickListener;
|
||||
import com.kongzue.dialog.v3.WaitDialog;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.WebActivity;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.util.BackHandlerHelper;
|
||||
import com.navinfo.outdoor.util.FragmentBackHandler;
|
||||
import com.navinfo.outdoor.util.NetWorkUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
@ -171,6 +176,15 @@ public abstract class BaseFragment extends Fragment implements FragmentBackHandl
|
||||
}
|
||||
}
|
||||
|
||||
protected void intint2WebActivity(String url, HashMap<String, String> paramMap) {
|
||||
Intent intent = new Intent(getContext(), WebActivity.class);
|
||||
if (paramMap !=null) {
|
||||
intent.putExtra("map", paramMap);
|
||||
}
|
||||
intent.putExtra("url", url);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
protected void initMvp() {
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ import com.bumptech.glide.request.RequestOptions;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.WebActivity;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
|
||||
/**
|
||||
* 关于页面的fragment
|
||||
@ -56,16 +57,13 @@ 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);
|
||||
intint2WebActivity(HttpInterface.ABOUT_MAP, null);
|
||||
break;
|
||||
case R.id.rl_serve:
|
||||
Intent serveIntent = new Intent(getContext(), WebActivity.class);
|
||||
startActivity(serveIntent);
|
||||
intint2WebActivity(HttpInterface.MAP_AGREEMENT, null);
|
||||
break;
|
||||
case R.id.rl_privilege:
|
||||
Intent privilegeIntent = new Intent(getContext(), WebActivity.class);
|
||||
startActivity(privilegeIntent);
|
||||
intint2WebActivity(HttpInterface.MAP_PRIVACY, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1240,6 +1240,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
.getRequest(new Callback<TaskNameBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskNameBean taskNameBean, int id) {
|
||||
if (getActivity()==null){
|
||||
return;
|
||||
}
|
||||
dismissLoadingDialog();
|
||||
if (taskNameBean.getCode()==200){
|
||||
List<String> body = taskNameBean.getBody();
|
||||
@ -1264,6 +1267,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
if (getActivity()==null){
|
||||
return;
|
||||
}
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
|
@ -27,6 +27,7 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -169,9 +170,9 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
||||
eventPrefectureAdapter.setClickItem(new EventPrefectureAdapter.clickItem() {
|
||||
@Override
|
||||
public void item(int aInt) {
|
||||
Intent intent = new Intent(getContext(), WebActivity.class);
|
||||
intent.putExtra("id",aInt);
|
||||
startActivity(intent);
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id",aInt+"");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -116,17 +116,17 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (hasSubmitBean.getCode() == 200){
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||
if (hasSubmitBeanBody!=null){
|
||||
otherAuditProcess.setText(hasSubmitBeanBody.getAuditingCount()+"");
|
||||
otherAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
|
||||
otherAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
|
||||
if (hasSubmitBeanBody != null) {
|
||||
otherAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||
otherAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||
otherAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||
hasPage++;
|
||||
}
|
||||
|
||||
}else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
Log.d("TAG", "onSuccess: " + hasSubmitBean.getBody() + "");
|
||||
@ -156,15 +156,15 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (hasSubmitBean.getCode() == 200){
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||
if (hasSubmitBeanBody!=null){
|
||||
chargingAuditProcess.setText(hasSubmitBeanBody.getAuditingCount()+"");
|
||||
chargingAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
|
||||
chargingAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
|
||||
if (hasSubmitBeanBody != null) {
|
||||
chargingAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||
chargingAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||
chargingAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||
}
|
||||
}else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
Log.d("TAG", "onSuccess: " + hasSubmitBean.getBody() + "");
|
||||
@ -174,7 +174,7 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
public void onError(Throwable e, int id) {
|
||||
dismissLoadingDialog();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
Toast.makeText(getActivity(), e.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(getActivity(), e.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -194,15 +194,15 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (hasSubmitBean.getCode() == 200){
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||
if (hasSubmitBeanBody!=null){
|
||||
roadAuditProcess.setText(hasSubmitBeanBody.getAuditingCount()+"");
|
||||
roadAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
|
||||
roadAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
|
||||
hasPage++;
|
||||
if (hasSubmitBeanBody != null) {
|
||||
roadAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||
roadAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||
roadAuditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||
hasPage++;
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
@ -233,16 +233,16 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (hasSubmitBean.getCode() == 200){
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||
if (hasSubmitBeanBody!=null){
|
||||
poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditingCount()+"");
|
||||
poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
|
||||
poiVideoAuditProcessauditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
|
||||
hasPage++;
|
||||
if (hasSubmitBeanBody != null) {
|
||||
poiVideoAuditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||
poiVideoAuditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||
poiVideoAuditProcessauditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||
hasPage++;
|
||||
}
|
||||
}else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
Log.d("TAG", "onSuccess: " + hasSubmitBean.getBody() + "");
|
||||
@ -272,17 +272,17 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
||||
@Override
|
||||
public void onSuccess(HasSubmitBean hasSubmitBean, int id) {
|
||||
dismissLoadingDialog();
|
||||
if (hasSubmitBean.getCode() == 200){
|
||||
if (hasSubmitBean.getCode() == 200) {
|
||||
HasSubmitBean.BodyBean hasSubmitBeanBody = hasSubmitBean.getBody();
|
||||
if (hasSubmitBeanBody!=null){
|
||||
auditProcess.setText(hasSubmitBeanBody.getAuditingCount()+"");
|
||||
auditThrough.setText(hasSubmitBeanBody.getPassCount()+"");
|
||||
auditNotThrough.setText(hasSubmitBeanBody.getNotPassCount()+"");
|
||||
hasPage++;
|
||||
if (hasSubmitBeanBody != null) {
|
||||
auditProcess.setText(hasSubmitBeanBody.getAuditingCount() + "");
|
||||
auditThrough.setText(hasSubmitBeanBody.getPassCount() + "");
|
||||
auditNotThrough.setText(hasSubmitBeanBody.getNotPassCount() + "");
|
||||
hasPage++;
|
||||
Log.d("TAG", "onSuccess: " + hasSubmitBean.getBody() + "");
|
||||
}
|
||||
}else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage() + "", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import com.lzy.okgo.model.HttpParams;
|
||||
import com.navinfo.outdoor.R;
|
||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||
import com.navinfo.outdoor.activity.WebActivity;
|
||||
import com.navinfo.outdoor.adapter.IssueProblemAdapter;
|
||||
import com.navinfo.outdoor.api.Constant;
|
||||
import com.navinfo.outdoor.base.BaseFragment;
|
||||
@ -30,6 +31,7 @@ import com.umeng.umcrash.UMCrash;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
@ -40,6 +42,7 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
private ImageView ivIssueFinish;
|
||||
private XRecyclerView mainIssueRecycler;
|
||||
private IssueProblemAdapter issueProblemAdapter;
|
||||
private int issuePage = 1;
|
||||
|
||||
public static IssueFragment newInstance(Bundle bundle) {
|
||||
IssueFragment fragment = new IssueFragment();
|
||||
@ -61,7 +64,7 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("fid", "1");
|
||||
httpParams.put("pageNum", "1");
|
||||
httpParams.put("pageNum", issuePage);
|
||||
httpParams.put("pageSize", "10");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
@ -75,6 +78,7 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
dismissLoadingDialog();
|
||||
if (response.getCode() == 200){
|
||||
issueProblemAdapter.setExplainList(response.getBody().getList());
|
||||
issuePage++;
|
||||
}else {
|
||||
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -119,9 +123,9 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
||||
issueProblemAdapter.setOnIssueClick(new IssueProblemAdapter.OnIssueClick() {
|
||||
@Override
|
||||
public void onClick(int pos) {
|
||||
Intent issueWeb = new Intent(getActivity(), FragmentManagement.class);
|
||||
issueWeb.putExtra("tag",16);
|
||||
startActivity(issueWeb);
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id",pos+"");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -25,6 +25,8 @@ import com.navinfo.outdoor.http.Callback;
|
||||
import com.navinfo.outdoor.http.HttpInterface;
|
||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 寻宝-消息的Fragment
|
||||
*/
|
||||
@ -34,6 +36,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
private XRecyclerView messageRecycler;
|
||||
private MessageAdapter messageAdapter;
|
||||
private TextView tvRoad;
|
||||
private int messagePage = 1;
|
||||
|
||||
public static MessageFragment newInstance(Bundle bundle) {
|
||||
MessageFragment fragment = new MessageFragment();
|
||||
@ -66,9 +69,9 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
messageAdapter.setMessageClickItem(new MessageAdapter.messageClickItem() {
|
||||
@Override
|
||||
public void item(int id) {
|
||||
Intent intent = new Intent(getContext(), WebActivity.class);
|
||||
intent.putExtra("id", id);
|
||||
startActivity(intent);
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id",id+"");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
}
|
||||
});
|
||||
messageRecycler.getDefaultFootView().setNoMoreHint("已全部加载完毕");
|
||||
@ -89,7 +92,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
showLoadingDialog();
|
||||
HttpParams httpParams = new HttpParams();
|
||||
httpParams.put("fid", "5");
|
||||
httpParams.put("pageNum", "1");
|
||||
httpParams.put("pageNum", messagePage);
|
||||
httpParams.put("pageSize", "10");
|
||||
OkGoBuilder.getInstance()
|
||||
.Builder(getActivity())
|
||||
@ -103,6 +106,7 @@ public class MessageFragment extends BaseFragment implements View.OnClickListene
|
||||
dismissLoadingDialog();
|
||||
if (taskPrefectureBean.getCode() == 200){
|
||||
messageAdapter.setMessageList(taskPrefectureBean.getBody().getList());
|
||||
messagePage++;
|
||||
}else {
|
||||
Toast.makeText(getActivity(), taskPrefectureBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
private int existence = 0;
|
||||
private RelativeLayout linearExist;
|
||||
private Spinner spinnerExist;
|
||||
String str = "";
|
||||
String poiAddressName = "";
|
||||
|
||||
|
||||
//获取的拍照图片
|
||||
@ -365,18 +365,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
if (name != null && !name.equals("")) {
|
||||
editNameContent.setText(name + "");
|
||||
}
|
||||
if (editNameContent.getText().toString()!=null||editNameContent!=null){
|
||||
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (!hasFocus) {
|
||||
findingDuplicateByWork();
|
||||
}
|
||||
}
|
||||
});
|
||||
}else {
|
||||
Toast.makeText(getActivity(), "请输入名称", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
String address = showPoiEntity.getAddress();//地址
|
||||
if (address != null && !address.equals("")) {
|
||||
@ -480,6 +468,19 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
if (showPoiEntity.getTaskStatus() == 3) {
|
||||
disables();
|
||||
}
|
||||
if (editNameContent.getText().toString()!=null||editNameContent!=null){
|
||||
editNameContent.setOnFocusChangeListener(new View.OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (!hasFocus) {
|
||||
findingDuplicateByWork();
|
||||
}
|
||||
}
|
||||
});
|
||||
}else {
|
||||
Toast.makeText(getActivity(), "请输入名称", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -693,16 +694,19 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
.getRequest(new Callback<TaskNameBean>() {
|
||||
@Override
|
||||
public void onSuccess(TaskNameBean taskNameBean, int id) {
|
||||
if (getActivity()==null){
|
||||
return;
|
||||
}
|
||||
dismissLoadingDialog();
|
||||
if (taskNameBean.getCode() == 200) {
|
||||
List<String> body = taskNameBean.getBody();
|
||||
if (body != null) {
|
||||
for (int i = 0; i < body.size(); i++) {
|
||||
str += body.get(i) + ",";
|
||||
poiAddressName += body.get(i) + ",";
|
||||
}
|
||||
if (str != null) {
|
||||
Toast.makeText(getActivity(), "存在类似名称---" + str, Toast.LENGTH_SHORT).show();
|
||||
str = "";
|
||||
if (poiAddressName != null) {
|
||||
Toast.makeText(getActivity(), "存在类似名称---" + poiAddressName, Toast.LENGTH_SHORT).show();
|
||||
poiAddressName = "";
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "没有类似名称可以作业", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
@ -717,6 +721,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e, int id) {
|
||||
if (getActivity()==null){
|
||||
return;
|
||||
}
|
||||
dismissLoadingDialog();
|
||||
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
|
@ -83,7 +83,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
poiTaskXrv.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
page = 1;
|
||||
|
||||
initWork(type,true);
|
||||
}
|
||||
|
||||
@ -125,6 +125,7 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
||||
if (hasSubmitBean.getBody()!=null){
|
||||
initHasSubmitBean(hasSubmitBean,aBoolean);
|
||||
}
|
||||
page++;
|
||||
}else {
|
||||
Toast.makeText(getActivity(), hasSubmitBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 发现页面的任务说明的点击条目跳转第二个页面
|
||||
@ -81,9 +82,9 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
||||
taskExplainAdapter2.setOnItemClick(new TaskExplainAdapter2.OnItemClick2() {
|
||||
@Override
|
||||
public void onClick2(int pos) {
|
||||
Intent intent = new Intent(getActivity(), WebActivity.class);
|
||||
intent.putExtra("int",pos);
|
||||
startActivity(intent);
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id",pos+"");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -40,6 +40,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
private List<TaskPrefectureBean.BodyBean.ListBean> dataBeanList;
|
||||
private TaskPrefectureAdapter taskPrefectureAdapter;
|
||||
private int taskPage = 1;
|
||||
private Integer taskBodyId;
|
||||
|
||||
|
||||
public static TaskPrefectureFragment newInstance(Bundle bundle) {
|
||||
@ -83,9 +84,9 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
||||
taskPrefectureAdapter.setClickItem(new TaskPrefectureAdapter.clickItem() {
|
||||
@Override
|
||||
public void item(int id) {
|
||||
Intent intent = new Intent(getContext(), WebActivity.class);
|
||||
intent.putExtra("id", id);
|
||||
startActivity(intent);
|
||||
HashMap<String, String> paramMap = new HashMap<>();
|
||||
paramMap.put("id",id+"");
|
||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -284,5 +284,9 @@ public class HttpInterface {
|
||||
public static final String SUBMIT_POLYGON_TASK = IPm6 + "polygonTask/1/submitPolygontask";//结束采集
|
||||
* */
|
||||
|
||||
public static final String CONTACT_US ="";//联系我们
|
||||
public static final String ABOUT_MAP ="";//关于 -关于地图寻宝
|
||||
public static final String MAP_AGREEMENT ="";//地图寻宝服务协议
|
||||
public static final String MAP_PRIVACY ="";//地图寻宝隐私
|
||||
|
||||
}
|
||||
|
@ -227,12 +227,23 @@ public class PoiSaveUtils {
|
||||
*/
|
||||
public void uploadPoiNet(PoiEntity poiEntity) {
|
||||
if (poiEntity == null) {
|
||||
Toast.makeText(mContext, "无法获取POI数据", Toast.LENGTH_SHORT).show();
|
||||
mContext.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(mContext, "无法获取POI数据", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
int bodyId = poiEntity.getBodyId();
|
||||
if (bodyId == 0) {
|
||||
Toast.makeText(mContext, "该数据未保存到服务,无法上传", Toast.LENGTH_SHORT).show();
|
||||
mContext.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(mContext, "该数据未保存到服务,无法上传", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
ArrayList<File> photoFile = new ArrayList<>();
|
||||
@ -426,7 +437,13 @@ public class PoiSaveUtils {
|
||||
*/
|
||||
private int chargingPileUploadNetWork(ChargingPileEntity chargingPileEntity) {
|
||||
if (chargingPileEntity == null || chargingPileEntity.getBodyId() == 0) {
|
||||
Toast.makeText(mContext, "没有保存本地", Toast.LENGTH_SHORT).show();
|
||||
mContext.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(mContext, "没有保存本地", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_baseline_arrow"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="15dp" />
|
||||
@ -27,17 +28,10 @@
|
||||
android:layout_toRightOf="@id/iv_icon"
|
||||
android:textColor="#fff" />
|
||||
</RelativeLayout>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/news_webView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<!-- <com.example.myapplication.util.CustomScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
</LinearLayout>
|
||||
</com.example.myapplication.util.CustomScrollView>-->
|
||||
|
||||
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user