修改bug
@ -11,6 +11,7 @@ import com.navinfo.outdoor.util.NoSlideViewPager;
|
|||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentPagerAdapter;
|
import androidx.fragment.app.FragmentPagerAdapter;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
@ -37,6 +38,7 @@ public class HomeActivity extends BaseActivity{
|
|||||||
private final String[] names = {"寻宝", "记录", "发现", "我的"};
|
private final String[] names = {"寻宝", "记录", "发现", "我的"};
|
||||||
private final int[] pic = {R.mipmap.map_select,R.mipmap.task_select,R.mipmap.article_select,R.mipmap.mine_select};
|
private final int[] pic = {R.mipmap.map_select,R.mipmap.task_select,R.mipmap.article_select,R.mipmap.mine_select};
|
||||||
private final int[] pic1 = {R.mipmap.map,R.mipmap.task,R.mipmap.article,R.mipmap.mine};
|
private final int[] pic1 = {R.mipmap.map,R.mipmap.task,R.mipmap.article,R.mipmap.mine};
|
||||||
|
private RecordFragment recordFragment;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayout() {
|
protected int getLayout() {
|
||||||
@ -55,7 +57,8 @@ public class HomeActivity extends BaseActivity{
|
|||||||
mViewPager=findViewById(R.id.no_slide_view_pager);
|
mViewPager=findViewById(R.id.no_slide_view_pager);
|
||||||
ArrayList<Fragment> fragments = new ArrayList<>();
|
ArrayList<Fragment> fragments = new ArrayList<>();
|
||||||
fragments.add(new TreasureFragment());
|
fragments.add(new TreasureFragment());
|
||||||
fragments.add(new RecordFragment());
|
recordFragment = new RecordFragment();
|
||||||
|
fragments.add(recordFragment);
|
||||||
fragments.add(new FindFragment());
|
fragments.add(new FindFragment());
|
||||||
fragments.add(new MineFragment());
|
fragments.add(new MineFragment());
|
||||||
mViewPager.setOffscreenPageLimit(3);
|
mViewPager.setOffscreenPageLimit(3);
|
||||||
@ -71,6 +74,24 @@ public class HomeActivity extends BaseActivity{
|
|||||||
return fragments.size();
|
return fragments.size();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageSelected(int position) {
|
||||||
|
if (position == 1) {
|
||||||
|
recordFragment.refreshData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageScrollStateChanged(int state) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
mViewPager.setCanScroll(true);
|
mViewPager.setCanScroll(true);
|
||||||
mViewPager.setNoScrollAnim(false);
|
mViewPager.setNoScrollAnim(false);
|
||||||
mTab.setupWithViewPager(mViewPager);
|
mTab.setupWithViewPager(mViewPager);
|
||||||
|
@ -457,7 +457,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
|
|
||||||
layerChange.removeAllViews();
|
layerChange.removeAllViews();
|
||||||
if (widthMap > widthCamera) {
|
if (widthMap > widthCamera) {
|
||||||
ivPic.setVisibility(View.GONE);
|
ivPic.setVisibility(View.VISIBLE);
|
||||||
layoutParamsCamera.width = dm.widthPixels;
|
layoutParamsCamera.width = dm.widthPixels;
|
||||||
layoutParamsCamera.height = dm.heightPixels;
|
layoutParamsCamera.height = dm.heightPixels;
|
||||||
layoutParamsMap.height = heightCamera;
|
layoutParamsMap.height = heightCamera;
|
||||||
@ -467,6 +467,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
layerChange.addView(camera);
|
layerChange.addView(camera);
|
||||||
layerChange.addView(ivMap);
|
layerChange.addView(ivMap);
|
||||||
} else {
|
} else {
|
||||||
|
ivPic.setVisibility(View.GONE);
|
||||||
layoutParamsMap.height = dm.heightPixels;
|
layoutParamsMap.height = dm.heightPixels;
|
||||||
layoutParamsMap.width = dm.widthPixels;
|
layoutParamsMap.width = dm.widthPixels;
|
||||||
layoutParamsCamera.height = heightMap;
|
layoutParamsCamera.height = heightMap;
|
||||||
|
@ -46,7 +46,7 @@ public class Constant {
|
|||||||
|
|
||||||
//message word 值
|
//message word 值
|
||||||
public static final int TREASURE_FRAGMENT = 100;//抽屉界面的展示和隐藏
|
public static final int TREASURE_FRAGMENT = 100;//抽屉界面的展示和隐藏
|
||||||
public static final int TREASURE_WORD = 0;//poi 对地图页面marker 的一个展示 编辑
|
public static final int TREASURE_WORD = 39;//poi 对地图页面marker 的一个展示 编辑
|
||||||
public static final int TREASURE_CHECKED_WORD = 40;//poi 对地图页面marker 的一个展示 确定
|
public static final int TREASURE_CHECKED_WORD = 40;//poi 对地图页面marker 的一个展示 确定
|
||||||
public static final int CAPACITY_EVALUATION_PAGE = 1;//能力测评的页数
|
public static final int CAPACITY_EVALUATION_PAGE = 1;//能力测评的页数
|
||||||
public static final int POI_WORD = 2;//地图页面marker 的经纬都回传
|
public static final int POI_WORD = 2;//地图页面marker 的经纬都回传
|
||||||
@ -80,6 +80,7 @@ public class Constant {
|
|||||||
public static final int EVENT_WHAT_LOCATION_CHANGE = 35; // 定位位置更新的Event的What值
|
public static final int EVENT_WHAT_LOCATION_CHANGE = 35; // 定位位置更新的Event的What值
|
||||||
public static final int CHARGING_PILE_BODY=36;//充电装的body
|
public static final int CHARGING_PILE_BODY=36;//充电装的body
|
||||||
public static final int CHARGING_PILE_PHONE = 37;//充电桩的照片
|
public static final int CHARGING_PILE_PHONE = 37;//充电桩的照片
|
||||||
|
public static final int EVENT_WHAT_CURRENT_MARKER = 41; // 显示当前正在编辑的POI类型数据的Event的What值
|
||||||
|
|
||||||
public static String USER_ATTESTATION_NAME; //实名认证姓名 银行卡
|
public static String USER_ATTESTATION_NAME; //实名认证姓名 银行卡
|
||||||
public static int NUMBER = 200; //任务个数
|
public static int NUMBER = 200; //任务个数
|
||||||
|
32
app/src/main/java/com/navinfo/outdoor/bean/RoadSaveBean.java
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
package com.navinfo.outdoor.bean;
|
||||||
|
|
||||||
|
public class RoadSaveBean {
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
private String message;
|
||||||
|
private Integer 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 Integer getBody() {
|
||||||
|
return body;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBody(Integer body) {
|
||||||
|
this.body = body;
|
||||||
|
}
|
||||||
|
}
|
@ -97,7 +97,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
private Spinner spinnerType;
|
private Spinner spinnerType;
|
||||||
String[] ctype = new String[]{"充电站", "充换电站", "充电桩组", "换电站"};//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 ,
|
String[] ctype = new String[]{"充电站", "充换电站", "充电桩组", "换电站"};//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 ,
|
||||||
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
||||||
private int existence=0;
|
private int existence = 0;
|
||||||
private ArrayAdapter<String> adapter;
|
private ArrayAdapter<String> adapter;
|
||||||
private LinearLayout linearChargingPile;
|
private LinearLayout linearChargingPile;
|
||||||
private RecyclerView recyclerStation;
|
private RecyclerView recyclerStation;
|
||||||
@ -113,7 +113,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
private ContactView contactView;
|
private ContactView contactView;
|
||||||
private Integer chargingPileBody;
|
private Integer chargingPileBody;
|
||||||
private ArrayList<File> chargingStationList;
|
private ArrayList<File> chargingStationList;
|
||||||
private ArrayList<File> phoneList;
|
private ArrayList<File> fileList;
|
||||||
|
|
||||||
public static ChargingStationFragment newInstance(Bundle bundle) {
|
public static ChargingStationFragment newInstance(Bundle bundle) {
|
||||||
ChargingStationFragment fragment = new ChargingStationFragment();
|
ChargingStationFragment fragment = new ChargingStationFragment();
|
||||||
@ -270,13 +270,13 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
switch (position) {
|
switch (position) {
|
||||||
case 0:
|
case 0:
|
||||||
existence=0;
|
existence = 0;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
existence=1;
|
existence = 1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
existence=2;
|
existence = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -350,7 +350,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
if (address != null && !address.equals("")) {
|
if (address != null && !address.equals("")) {
|
||||||
editSiteContent.setText(address);
|
editSiteContent.setText(address);
|
||||||
}
|
}
|
||||||
body=showPoiEntity.getBodyId();
|
body = showPoiEntity.getBodyId();
|
||||||
String x = showPoiEntity.getX();
|
String x = showPoiEntity.getX();
|
||||||
String y = showPoiEntity.getY();
|
String y = showPoiEntity.getY();
|
||||||
if (x != null && y != null) {
|
if (x != null && y != null) {
|
||||||
@ -369,7 +369,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
if (telPhone != null && !telPhone.equals("")) {
|
if (telPhone != null && !telPhone.equals("")) {
|
||||||
String[] phones = telPhone.split("\\|");
|
String[] phones = telPhone.split("\\|");
|
||||||
for (int i = 0; i < phones.length; i++) {
|
for (int i = 0; i < phones.length; i++) {
|
||||||
if (i==0) {
|
if (i == 0) {
|
||||||
if (!StringUtils.isEmpty(phones[i])) {
|
if (!StringUtils.isEmpty(phones[i])) {
|
||||||
String[] split = phones[i].split("-");
|
String[] split = phones[i].split("-");
|
||||||
if (split[0] == phones[i]) {
|
if (split[0] == phones[i]) {
|
||||||
@ -392,14 +392,14 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Constant.CODE==null||Constant.CODE.equals("")){
|
if (Constant.CODE == null || Constant.CODE.equals("")) {
|
||||||
poiBeans.add(new PhoneBean("电话*", "", "", R.drawable.icon_add_bg));
|
poiBeans.add(new PhoneBean("电话*", "", "", R.drawable.icon_add_bg));
|
||||||
}else {
|
} else {
|
||||||
poiBeans.add(new PhoneBean("电话*", "", Constant.CODE, R.drawable.icon_add_bg));
|
poiBeans.add(new PhoneBean("电话*", "", Constant.CODE, R.drawable.icon_add_bg));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
body=showPoiEntity.getBodyId();
|
body = showPoiEntity.getBodyId();
|
||||||
contactView = new ContactView(getActivity(), linearContact, poiBeans);
|
contactView = new ContactView(getActivity(), linearContact, poiBeans);
|
||||||
contactView.resetView();
|
contactView.resetView();
|
||||||
//poiRecycleAdapter.setList(poiBeans);
|
//poiRecycleAdapter.setList(poiBeans);
|
||||||
@ -473,6 +473,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 得到电话区号,电话位数
|
* 得到电话区号,电话位数
|
||||||
*/
|
*/
|
||||||
@ -487,15 +488,15 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_PHONES)
|
.url(HttpInterface.GET_PHONES)
|
||||||
.method(OkGoBuilder.GET)
|
.method(OkGoBuilder.GET)
|
||||||
.params(new HttpParams("geo",encode))
|
.params(new HttpParams("geo", encode))
|
||||||
.cls(GetPhoneBean.class)
|
.cls(GetPhoneBean.class)
|
||||||
.callback(new Callback<GetPhoneBean>() {
|
.callback(new Callback<GetPhoneBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (getPhoneBean.getCode()==200){
|
if (getPhoneBean.getCode() == 200) {
|
||||||
String code = getPhoneBean.getBody().getCode();
|
String code = getPhoneBean.getBody().getCode();
|
||||||
Constant.CODE=code;
|
Constant.CODE = code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -506,6 +507,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
}).build();
|
}).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initRemovePileSharePre() {
|
public void initRemovePileSharePre() {
|
||||||
//获取SharedPreferences对象,方法中两个参数的意思为:第一个name
|
//获取SharedPreferences对象,方法中两个参数的意思为:第一个name
|
||||||
//表示文件名,系统将会在/dada/dada/包名/shared_prefs目录下生成
|
//表示文件名,系统将会在/dada/dada/包名/shared_prefs目录下生成
|
||||||
@ -554,13 +556,15 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
ArrayList<ChargingPileEntity> chargingPileEntities = new ArrayList<>();
|
ArrayList<ChargingPileEntity> chargingPileEntities = new ArrayList<>();
|
||||||
chargingPileEntities.add(chargingPileEntity);
|
chargingPileEntities.add(chargingPileEntity);
|
||||||
chargingPileAdapter.setChargingPileEntities(chargingPileEntities);
|
chargingPileAdapter.setChargingPileEntities(chargingPileEntities);
|
||||||
}else if (data.what == Constant.CHARGING_PILE_BODY){
|
} else if (data.what == Constant.CHARGING_PILE_BODY) {
|
||||||
chargingPileBody = (Integer) data.obj;
|
chargingPileBody = (Integer) data.obj;
|
||||||
}else if (data.what == Constant.CHARGING_PILE_PHONE){
|
} else if (data.what == Constant.CHARGING_PILE_PHONE) {
|
||||||
phoneList = (ArrayList<File>) data.obj;
|
fileList = (ArrayList<File>) data.obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isChargeStationUploaded = false, isChargingPoleUploaded = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
@ -595,25 +599,25 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
chargingStationList.add(new File(tagScutcheon));
|
chargingStationList.add(new File(tagScutcheon));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isChargeStationUploaded = false;
|
||||||
if (body != null&& chargingPileBody!=null) {
|
isChargingPoleUploaded = false;
|
||||||
stationUploadByNetWork(body, chargingStationList);
|
new Thread(new Runnable() {
|
||||||
chargingPileUploadNetWork(body,phoneList);
|
@Override
|
||||||
} else {
|
public void run() {
|
||||||
new Thread(new Runnable() {
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
@Override
|
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 0 || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2) {
|
||||||
public void run() {
|
initRoadSaveLocal(true);
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
chargingPileUploadNetWork(poiDaoPoiEntity.getBodyId(), fileList);
|
||||||
stationUploadByNetWork(poiDaoPoiEntity.getBodyId(), chargingStationList);
|
stationUploadByNetWork(poiDaoPoiEntity.getBodyId(), chargingStationList);
|
||||||
chargingPileUploadNetWork(poiDaoPoiEntity.getBodyId(),phoneList);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}
|
||||||
}
|
}).start();
|
||||||
break;
|
break;
|
||||||
case R.id.tv_examine:
|
case R.id.tv_examine:
|
||||||
Toast.makeText(getContext(), editNameContent.getText().toString(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), editNameContent.getText().toString(), Toast.LENGTH_SHORT).show();
|
||||||
@ -648,10 +652,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void chargingPileUploadNetWork(int chargingPileBody, ArrayList<File> phoneList) {
|
private void chargingPileUploadNetWork(int chargingPileBody, ArrayList<File> fileList) {
|
||||||
if (chargingPileBody == 0) {
|
if (chargingPileBody == 0) {
|
||||||
Toast.makeText(getActivity(), "没有保存本地", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "没有保存本地", Toast.LENGTH_SHORT).show();
|
||||||
Log.e("TAG", "poiUploadByNetWork: " + body + phoneList);
|
Log.e("TAG", "poiUploadByNetWork: " + body + fileList);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
OkGo
|
OkGo
|
||||||
@ -659,27 +663,22 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
.<PoiUploadBean>post(HttpInterface.CS_TASK_UP_LOAD_PIC)
|
.<PoiUploadBean>post(HttpInterface.CS_TASK_UP_LOAD_PIC)
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
// 请求的 tag, 主要用于取消对应的请求
|
||||||
.params("auditId", chargingPileBody)
|
.params("auditId", chargingPileBody)
|
||||||
.addFileParams("file", phoneList)
|
.addFileParams("file", fileList)
|
||||||
.tag(this)
|
.tag(this)
|
||||||
.execute(new DialogCallback<PoiUploadBean>(PoiUploadBean.class) {
|
.execute(new DialogCallback<PoiUploadBean>(PoiUploadBean.class) {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Response<PoiUploadBean> poiUploadBeanResponse) {
|
public void onSuccess(Response<PoiUploadBean> poiUploadBeanResponse) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
// new Thread(new Runnable() {
|
isChargingPoleUploaded = true;
|
||||||
// @Override
|
if (isChargeStationUploaded && isChargingPoleUploaded) {
|
||||||
// public void run() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
// poiDao.getPoiEntity()
|
@Override
|
||||||
// ChargingPileDao poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
public void run() {
|
||||||
// poiDao.deletePoiEntity(poiDaoPoiEntity);
|
getActivity().onBackPressed();//回退
|
||||||
// getActivity().runOnUiThread(new Runnable() {
|
}
|
||||||
// @Override
|
});
|
||||||
// public void run() {
|
}
|
||||||
// getActivity().onBackPressed();//回退
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -728,7 +727,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
poiEntity.setDescribe(describe);
|
poiEntity.setDescribe(describe);
|
||||||
}
|
}
|
||||||
boolean phoneBean = contactView.getPhoneBean();
|
boolean phoneBean = contactView.getPhoneBean();
|
||||||
if (phoneBean){
|
if (phoneBean) {
|
||||||
String list = contactView.getList();
|
String list = contactView.getList();
|
||||||
poiEntity.setTelPhone(list);
|
poiEntity.setTelPhone(list);
|
||||||
}
|
}
|
||||||
@ -785,7 +784,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
chargingStationSaveByWork(poiEntity,isLocal);
|
chargingStationSaveByWork(poiEntity, isLocal);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -831,6 +830,15 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
poiDao.deletePoiEntity(showPoiEntity);
|
poiDao.deletePoiEntity(showPoiEntity);
|
||||||
|
isChargeStationUploaded = true;
|
||||||
|
if (isChargeStationUploaded && isChargingPoleUploaded) {
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
getActivity().onBackPressed();//回退
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
@ -877,9 +885,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (isLocal){
|
if (isLocal) {
|
||||||
stationUploadByNetWork(body,chargingStationList);
|
stationUploadByNetWork(body, chargingStationList);
|
||||||
}else {
|
chargingPileUploadNetWork(chargingPileBody, fileList);
|
||||||
|
} else {
|
||||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
Log.d("TAG", "onSuccess: " + chargingStationBean.getBody());
|
Log.d("TAG", "onSuccess: " + chargingStationBean.getBody());
|
||||||
@ -918,7 +927,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
poiEntity.setDescribe(describe);
|
poiEntity.setDescribe(describe);
|
||||||
}
|
}
|
||||||
boolean phoneBean = contactView.getPhoneBean();
|
boolean phoneBean = contactView.getPhoneBean();
|
||||||
if (phoneBean){
|
if (phoneBean) {
|
||||||
String list = contactView.getList();
|
String list = contactView.getList();
|
||||||
poiEntity.setTelPhone(list);
|
poiEntity.setTelPhone(list);
|
||||||
}
|
}
|
||||||
@ -996,7 +1005,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
poiEntity.setDescribe(describe);
|
poiEntity.setDescribe(describe);
|
||||||
}
|
}
|
||||||
boolean phoneBean = contactView.getPhoneBean();
|
boolean phoneBean = contactView.getPhoneBean();
|
||||||
if (phoneBean){
|
if (phoneBean) {
|
||||||
String list = contactView.getList();
|
String list = contactView.getList();
|
||||||
poiEntity.setTelPhone(list);
|
poiEntity.setTelPhone(list);
|
||||||
}
|
}
|
||||||
@ -1155,7 +1164,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
if (poiDaoPoiEntity.getName() == null) {
|
if (poiDaoPoiEntity != null && poiDaoPoiEntity.getName() == null) {
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||||
chargingPileDao.deleteChargingFidPileEntity(showPoiEntity.getId());
|
chargingPileDao.deleteChargingFidPileEntity(showPoiEntity.getId());
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||||
if (event.getAction() == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
|
if (event.getAction() == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
|
||||||
boolean aBoolean = getArguments().getBoolean("boolean", true);
|
boolean aBoolean = getArguments().getBoolean("boolean", false);
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.GATHER_GET_RETURN;
|
obtain.what = Constant.GATHER_GET_RETURN;
|
||||||
obtain.obj = aBoolean;
|
obtain.obj = aBoolean;
|
||||||
@ -111,41 +111,65 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
} else {
|
} else {
|
||||||
tvMoney.setText("¥" + poiEntity.getPrecision());
|
tvMoney.setText("¥" + poiEntity.getPrecision());
|
||||||
}
|
}
|
||||||
tvTime.setText("到期时间:" + poiEntity.getCreateTime());
|
if (poiEntity !=null){
|
||||||
tvDescribe.setText("任务描述:" + poiEntity.getDescribe());
|
if (poiEntity.getMemo()!=null&&!"".equals(poiEntity.getMemo())) {
|
||||||
|
tvDescribe.setText("任务描述:" + poiEntity.getMemo());
|
||||||
|
}
|
||||||
|
if (poiEntity.getMemo()!=null&&!"".equals(poiEntity.getCreateTime())) {
|
||||||
|
tvTime.setText("到期时间:" + poiEntity.getCreateTime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (poiEntity.getDist() != null) {
|
if (poiEntity.getDist() != null) {
|
||||||
tvDistance.setText("距离:" + format5(Double.valueOf(poiEntity.getDist()) / 1000) + "km");
|
tvDistance.setText("距离:" + format5(Double.valueOf(poiEntity.getDist()) / 1000) + "km");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int taskStatus = poiEntity.getTaskStatus();
|
int taskStatus = poiEntity.getTaskStatus();
|
||||||
switch (taskStatus) {
|
initViewByTaskStatus(taskStatus);
|
||||||
case 0://未领取
|
|
||||||
btnCancelGet.setVisibility(View.GONE);
|
|
||||||
btnGetTask.setVisibility(View.VISIBLE);
|
|
||||||
btnGather.setVisibility(View.VISIBLE);
|
|
||||||
btnFinishGather.setVisibility(View.GONE);
|
|
||||||
break;
|
|
||||||
case 1://已领取
|
|
||||||
btnCancelGet.setVisibility(View.VISIBLE);
|
|
||||||
btnGetTask.setVisibility(View.GONE);
|
|
||||||
btnGather.setVisibility(View.VISIBLE);
|
|
||||||
btnFinishGather.setVisibility(View.GONE);
|
|
||||||
break;
|
|
||||||
case 2://已保存
|
|
||||||
btnCancelGet.setVisibility(View.VISIBLE);
|
|
||||||
btnGetTask.setVisibility(View.GONE);
|
|
||||||
btnGather.setVisibility(View.GONE);
|
|
||||||
btnFinishGather.setVisibility(View.VISIBLE);
|
|
||||||
break;
|
|
||||||
case 3://已提交
|
|
||||||
btnCancelGet.setVisibility(View.GONE);
|
|
||||||
btnGetTask.setVisibility(View.GONE);
|
|
||||||
btnGather.setVisibility(View.GONE);
|
|
||||||
btnFinishGather.setVisibility(View.GONE);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* btnGetTask.setVisibility(View.GONE);领取任务
|
||||||
|
* // btnCancelGet.setVisibility(View.VISIBLE);取消领取
|
||||||
|
* //btnFinishGather.setVisibility(View.VISIBLE);结束采集
|
||||||
|
* //btnGather.setVisibility(View.GONE);立即采集
|
||||||
|
* btnGetTask.setVisibility(View.GONE);
|
||||||
|
* btnCancelGet.setVisibility(View.VISIBLE);
|
||||||
|
* btnFinishGather.setVisibility(View.GONE);
|
||||||
|
* btnGather.setVisibility(View.VISIBLE);
|
||||||
|
* */
|
||||||
|
|
||||||
|
private void initViewByTaskStatus(int taskStatus) {
|
||||||
|
switch (taskStatus) {
|
||||||
|
case 0://未领取
|
||||||
|
btnCancelGet.setVisibility(View.GONE);//取消领取
|
||||||
|
btnGetTask.setVisibility(View.VISIBLE);//领取任务
|
||||||
|
btnGather.setVisibility(View.VISIBLE);//立即采集
|
||||||
|
btnFinishGather.setVisibility(View.GONE);//结束采集
|
||||||
|
break;
|
||||||
|
case 1://已领取
|
||||||
|
btnCancelGet.setVisibility(View.VISIBLE);
|
||||||
|
btnGetTask.setVisibility(View.GONE);
|
||||||
|
btnGather.setVisibility(View.VISIBLE);
|
||||||
|
btnFinishGather.setVisibility(View.GONE);
|
||||||
|
break;
|
||||||
|
case 2://已保存
|
||||||
|
case 3://已提交
|
||||||
|
btnCancelGet.setVisibility(View.VISIBLE);
|
||||||
|
btnGetTask.setVisibility(View.GONE);
|
||||||
|
btnGather.setVisibility(View.GONE);
|
||||||
|
btnFinishGather.setVisibility(View.VISIBLE);
|
||||||
|
break;
|
||||||
|
case 4://结束采集
|
||||||
|
btnCancelGet.setVisibility(View.GONE);
|
||||||
|
btnGetTask.setVisibility(View.GONE);
|
||||||
|
btnGather.setVisibility(View.GONE);
|
||||||
|
btnFinishGather.setVisibility(View.GONE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
@ -154,7 +178,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (poiEntity != null) {
|
if (poiEntity != null) {
|
||||||
int type = poiEntity.getType();
|
int type = poiEntity.getType();
|
||||||
if (type == 6) {
|
if (type == 6) {
|
||||||
initUnPolygonTask(HttpInterface.UNRECEIVED_POLYGON_TASK, poiEntity.getTaskId());
|
initUnPolygonTask(HttpInterface.UNRECEIVED_POLYGON_TASK, poiEntity.getTaskId(),poiEntity);
|
||||||
} else {
|
} else {
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -178,17 +202,17 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (poiEntity != null) {
|
if (poiEntity != null) {
|
||||||
int type = poiEntity.getType();
|
int type = poiEntity.getType();
|
||||||
if (type == 6) {//面状任务的领取类型
|
if (type == 6) {//面状任务的领取类型
|
||||||
initPolygonTask(HttpInterface.RECEIVED_POLYGON_TASK, poiEntity.getTaskId(), false);
|
initPolygonTask(HttpInterface.RECEIVED_POLYGON_TASK, poiEntity.getTaskId(), false,poiEntity);
|
||||||
} else if (type == 1) {//poi的领取类型
|
} else if (type == 1) {//poi的领取类型
|
||||||
receivedTaskByNet(HttpInterface.RECEIVED_POI_TASK, poiEntity.getTaskId(), false);
|
receivedTaskByNet(HttpInterface.RECEIVED_POI_TASK, poiEntity.getTaskId(), false,poiEntity);
|
||||||
} else if (type == 2) {//充电站的领取类型
|
} else if (type == 2) {//充电站的领取类型
|
||||||
chargingTaskByWork(HttpInterface.RECEIVED_CTASK, poiEntity.getTaskId(), false);
|
chargingTaskByWork(HttpInterface.RECEIVED_CTASK, poiEntity.getTaskId(), false,poiEntity);
|
||||||
} else if (type == 3) {//poi录像的领取类型
|
} else if (type == 3) {//poi录像的领取类型
|
||||||
taskByNet(HttpInterface.RECEIVED_POI_VIDEO_TASK,poiEntity.getTaskId(),false);
|
taskByNet(HttpInterface.RECEIVED_POI_VIDEO_TASK,poiEntity.getTaskId(),false,poiEntity);
|
||||||
} else if (type == 4) {//道路的领取类型
|
} else if (type == 4) {//道路的领取类型
|
||||||
taskByNet(HttpInterface.RECEIVED_ROAD_TASK,poiEntity.getTaskId(),false);
|
taskByNet(HttpInterface.RECEIVED_ROAD_TASK,poiEntity.getTaskId(),false,poiEntity);
|
||||||
} else if (type == 5) {//其他的领取类型
|
} else if (type == 5) {//其他的领取类型
|
||||||
receivedTaskByNet(HttpInterface.RECEIVED_OTHER_TASK, poiEntity.getTaskId(), false);
|
receivedTaskByNet(HttpInterface.RECEIVED_OTHER_TASK, poiEntity.getTaskId(), false, poiEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -198,7 +222,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
if (type == 6) {
|
if (type == 6) {
|
||||||
int taskStatus = poiEntity.getTaskStatus();
|
int taskStatus = poiEntity.getTaskStatus();
|
||||||
if (taskStatus != 1) {
|
if (taskStatus != 1) {
|
||||||
initPolygonTask(HttpInterface.RECEIVED_POLYGON_TASK, poiEntity.getTaskId(), true);
|
initPolygonTask(HttpInterface.RECEIVED_POLYGON_TASK, poiEntity.getTaskId(), true, poiEntity);
|
||||||
} else {
|
} else {
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -215,15 +239,15 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
|
|
||||||
}
|
}
|
||||||
} else if (type== 1) {//poi的领取类型
|
} else if (type== 1) {//poi的领取类型
|
||||||
receivedTaskByNet(HttpInterface.RECEIVED_POI_TASK, poiEntity.getTaskId(), true);
|
receivedTaskByNet(HttpInterface.RECEIVED_POI_TASK, poiEntity.getTaskId(), true, poiEntity);
|
||||||
} else if (type== 2) {//充电站的领取类型
|
} else if (type== 2) {//充电站的领取类型
|
||||||
chargingTaskByWork(HttpInterface.RECEIVED_CTASK, poiEntity.getTaskId(), true);
|
chargingTaskByWork(HttpInterface.RECEIVED_CTASK, poiEntity.getTaskId(), true, poiEntity);
|
||||||
} else if (type== 3) {//poi录像的领取类型
|
} else if (type== 3) {//poi录像的领取类型
|
||||||
taskByNet(HttpInterface.RECEIVED_POI_VIDEO_TASK,poiEntity.getTaskId(),true);
|
taskByNet(HttpInterface.RECEIVED_POI_VIDEO_TASK,poiEntity.getTaskId(),true, poiEntity);
|
||||||
} else if (type == 4) {//道路的领取类型
|
} else if (type == 4) {//道路的领取类型
|
||||||
taskByNet(HttpInterface.RECEIVED_ROAD_TASK,poiEntity.getTaskId(),true);
|
taskByNet(HttpInterface.RECEIVED_ROAD_TASK,poiEntity.getTaskId(),true, poiEntity);
|
||||||
} else if (type == 5) {//其他的领取类型
|
} else if (type == 5) {//其他的领取类型
|
||||||
receivedTaskByNet(HttpInterface.RECEIVED_OTHER_TASK, poiEntity.getTaskId(), true);
|
receivedTaskByNet(HttpInterface.RECEIVED_OTHER_TASK, poiEntity.getTaskId(), true, poiEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -240,6 +264,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
// poiEntity.setTaskStatus(0);
|
||||||
|
// initViewByTaskStatus(0);
|
||||||
btnGetTask.setVisibility(View.VISIBLE);
|
btnGetTask.setVisibility(View.VISIBLE);
|
||||||
btnCancelGet.setVisibility(View.GONE);
|
btnCancelGet.setVisibility(View.GONE);
|
||||||
btnGather.setVisibility(View.VISIBLE);
|
btnGather.setVisibility(View.VISIBLE);
|
||||||
@ -256,8 +282,9 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param url 筛选充电站领取任务
|
* @param url 筛选充电站领取任务
|
||||||
|
* @param poiEntity
|
||||||
*/
|
*/
|
||||||
private void chargingTaskByWork(String url, int taskId, boolean isSaver) {
|
private void chargingTaskByWork(String url, int taskId, boolean isSaver, PoiEntity poiEntity) {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
@ -310,6 +337,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
//获取当前位置的marker
|
||||||
|
senMessageMarker(chargingListEntity.getType(),chargingListEntity.getY(),chargingListEntity.getX());
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -317,6 +346,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
// poiEntity.setTaskStatus(1);
|
||||||
|
// initViewByTaskStatus(1);
|
||||||
btnGetTask.setVisibility(View.GONE);
|
btnGetTask.setVisibility(View.GONE);
|
||||||
btnCancelGet.setVisibility(View.VISIBLE);
|
btnCancelGet.setVisibility(View.VISIBLE);
|
||||||
btnFinishGather.setVisibility(View.VISIBLE);
|
btnFinishGather.setVisibility(View.VISIBLE);
|
||||||
@ -344,8 +375,9 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param url 面妆任务领取任务
|
* @param url 面妆任务领取任务
|
||||||
|
* @param poiEntity
|
||||||
*/
|
*/
|
||||||
private void initPolygonTask(String url, int taskId, boolean aBoolean) {
|
private void initPolygonTask(String url, int taskId, boolean aBoolean, PoiEntity poiEntity) {
|
||||||
if (taskId == 0) {
|
if (taskId == 0) {
|
||||||
Toast.makeText(getContext(), "无此任务", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "无此任务", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
@ -390,10 +422,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
// poiEntity.setTaskStatus(1);
|
||||||
|
// initViewByTaskStatus(1);
|
||||||
btnGetTask.setVisibility(View.GONE);
|
btnGetTask.setVisibility(View.GONE);
|
||||||
btnCancelGet.setVisibility(View.VISIBLE);
|
btnCancelGet.setVisibility(View.VISIBLE);
|
||||||
if (aBoolean) {
|
if (aBoolean) {
|
||||||
initCompleteTask(HttpInterface.COMPLETE, poiEntity.getTaskId(), polygonEntity);
|
initCompleteTask(HttpInterface.COMPLETE, GatherGetFragment.this.poiEntity.getTaskId(), polygonEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -413,8 +447,9 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param url 面妆任务结束领取 ,结束采集
|
* @param url 面妆任务结束领取 ,结束采集
|
||||||
|
* @param poiEntity
|
||||||
*/
|
*/
|
||||||
private void initUnPolygonTask(String url, int taskId) {
|
private void initUnPolygonTask(String url, int taskId, PoiEntity poiEntity) {
|
||||||
if (taskId == 0) {
|
if (taskId == 0) {
|
||||||
Toast.makeText(getContext(), "无此任务", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "无此任务", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
@ -437,8 +472,10 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
btnGetTask.setVisibility(View.VISIBLE);
|
poiEntity.setTaskStatus(0);
|
||||||
btnCancelGet.setVisibility(View.GONE);
|
initViewByTaskStatus(0);
|
||||||
|
// btnGetTask.setVisibility(View.VISIBLE);
|
||||||
|
// btnCancelGet.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -483,6 +520,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
// poiEntity.setTaskStatus(3);
|
||||||
|
// initViewByTaskStatus(3);
|
||||||
btnGather.setVisibility(View.GONE);
|
btnGather.setVisibility(View.GONE);
|
||||||
btnFinishGather.setVisibility(View.VISIBLE);
|
btnFinishGather.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
@ -528,8 +567,11 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
btnGather.setVisibility(View.VISIBLE);
|
poiEntity.setTaskStatus(0);
|
||||||
btnFinishGather.setVisibility(View.GONE);
|
initViewByTaskStatus(0);
|
||||||
|
// btnGather.setVisibility(View.VISIBLE);
|
||||||
|
// btnFinishGather.setVisibility(View.GONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -550,8 +592,9 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param url poi类型对应的url
|
* @param url poi类型对应的url
|
||||||
|
* @param poiEntity
|
||||||
*/
|
*/
|
||||||
private void receivedTaskByNet(String url, int taskId, boolean isSaver) {
|
private void receivedTaskByNet(String url, int taskId, boolean isSaver, PoiEntity poiEntity) {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
@ -588,6 +631,9 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
poiListEntity.setX(latPolygon.get(0).longitude + "");
|
poiListEntity.setX(latPolygon.get(0).longitude + "");
|
||||||
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
||||||
}
|
}
|
||||||
|
// 通知地图界面显示当前编辑数据的marker
|
||||||
|
senMessageMarker(poiEntity.getType(),poiEntity.getY(),poiEntity.getX());
|
||||||
|
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -596,10 +642,12 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
btnGetTask.setVisibility(View.GONE);
|
poiEntity.setTaskStatus(1);
|
||||||
btnCancelGet.setVisibility(View.VISIBLE);
|
initViewByTaskStatus(1);
|
||||||
btnFinishGather.setVisibility(View.VISIBLE);
|
// btnGetTask.setVisibility(View.GONE);
|
||||||
btnGather.setVisibility(View.GONE);
|
// btnCancelGet.setVisibility(View.VISIBLE);
|
||||||
|
// btnFinishGather.setVisibility(View.GONE);
|
||||||
|
// btnGather.setVisibility(View.VISIBLE);
|
||||||
if (isSaver) {
|
if (isSaver) {
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.GATHER_GET_MAP;
|
obtain.what = Constant.GATHER_GET_MAP;
|
||||||
@ -621,10 +669,21 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}).build();
|
}).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void senMessageMarker(int type,String y,String x) {
|
||||||
|
Message markerMsg = Message.obtain();
|
||||||
|
markerMsg.what = Constant.EVENT_WHAT_CURRENT_MARKER;
|
||||||
|
LatLng latLng = new LatLng(Double.parseDouble(y), Double.parseDouble(x));
|
||||||
|
markerMsg.obj = latLng;
|
||||||
|
markerMsg.arg1 = type;
|
||||||
|
EventBus.getDefault().post(markerMsg);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param url 不同任务类型对应的url
|
* @param url 不同任务类型对应的url
|
||||||
|
* @param poiEntity
|
||||||
*/
|
*/
|
||||||
private void taskByNet(String url, int taskId, boolean isSaver) {
|
private void taskByNet(String url, int taskId, boolean isSaver, PoiEntity poiEntity) {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
@ -662,6 +721,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
poiListEntity.setX(latPolygon.get(0).longitude + "");
|
poiListEntity.setX(latPolygon.get(0).longitude + "");
|
||||||
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
poiListEntity.setY(latPolygon.get(0).latitude + "");
|
||||||
}
|
}
|
||||||
|
//获取当前位置的marker
|
||||||
|
senMessageMarker(poiListEntity.getType(),poiListEntity.getY(),poiListEntity.getX());
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -669,6 +730,8 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
// poiEntity.setTaskStatus(1);
|
||||||
|
// initViewByTaskStatus(1);
|
||||||
btnGetTask.setVisibility(View.GONE);
|
btnGetTask.setVisibility(View.GONE);
|
||||||
btnCancelGet.setVisibility(View.VISIBLE);
|
btnCancelGet.setVisibility(View.VISIBLE);
|
||||||
btnFinishGather.setVisibility(View.VISIBLE);
|
btnFinishGather.setVisibility(View.VISIBLE);
|
||||||
|
@ -292,16 +292,17 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
if (poiDaoPoiEntity == null||poiDaoPoiEntity.getTaskStatus()==1||poiDaoPoiEntity.getTaskStatus()==2||poiDaoPoiEntity.getTaskStatus()==0){
|
||||||
@Override
|
initPoiSaveLocal(true);
|
||||||
public void run() {
|
}else {
|
||||||
if (poiDaoPoiEntity.getTaskStatus()==1||poiDaoPoiEntity.getTaskStatus()==2||poiDaoPoiEntity.getTaskStatus()==0){
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
initPoiSaveLocal(true);
|
@Override
|
||||||
}else if (poiDaoPoiEntity.getTaskStatus()==3){
|
public void run() {
|
||||||
otherUploadByNet(poiDaoPoiEntity.getBodyId(), otherUploadList);
|
otherUploadByNet(poiDaoPoiEntity.getBodyId(), otherUploadList);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
break;
|
break;
|
||||||
@ -593,15 +594,15 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
new Thread(new Runnable() {
|
// new Thread(new Runnable() {
|
||||||
@Override
|
// @Override
|
||||||
public void run() {
|
// public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
// PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
if (poiDaoPoiEntity!=null&&poiDaoPoiEntity.getName() == null) {
|
// if (poiDaoPoiEntity!=null&&poiDaoPoiEntity.getName() == null) {
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
// poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}).start();
|
// }).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -59,8 +59,10 @@ import com.navinfo.outdoor.ui.view.ContactView;
|
|||||||
import com.navinfo.outdoor.util.Geohash;
|
import com.navinfo.outdoor.util.Geohash;
|
||||||
import com.navinfo.outdoor.util.PhotoPathUtil;
|
import com.navinfo.outdoor.util.PhotoPathUtil;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@ -91,7 +93,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
private PoiEntity showPoiEntity;
|
private PoiEntity showPoiEntity;
|
||||||
private LatLng latLng;
|
private LatLng latLng;
|
||||||
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
String[] spinner = new String[]{"存在", "不存在", "无法验证"};
|
||||||
private int existence=0;
|
private int existence = 0;
|
||||||
private RelativeLayout linearExist;
|
private RelativeLayout linearExist;
|
||||||
private Spinner spinnerExist;
|
private Spinner spinnerExist;
|
||||||
|
|
||||||
@ -168,21 +170,21 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
checkBoxLife.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
checkBoxLife.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
checkBoxLife.setText("保存");
|
checkBoxLife.setText("保存");
|
||||||
checkBoxLife.setTextColor(Color.WHITE);
|
checkBoxLife.setTextColor(Color.WHITE);
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.TREASURE_WORD;
|
obtain.what = Constant.TREASURE_WORD;
|
||||||
obtain.obj = latLng;
|
obtain.obj = latLng;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
} else {
|
} else {
|
||||||
checkBoxLife.setText("编辑");
|
checkBoxLife.setText("编辑");
|
||||||
checkBoxLife.setTextColor(Color.BLACK);
|
checkBoxLife.setTextColor(Color.BLACK);
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.TREASURE_CHECKED_WORD;
|
obtain.what = Constant.TREASURE_CHECKED_WORD;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -222,13 +224,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
switch (position) {
|
switch (position) {
|
||||||
case 0:
|
case 0:
|
||||||
existence=0;
|
existence = 0;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
existence=1;
|
existence = 1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
existence=2;
|
existence = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -278,13 +280,13 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
if (telPhone != null && !telPhone.equals("")) {
|
if (telPhone != null && !telPhone.equals("")) {
|
||||||
String[] phones = telPhone.split("\\|");
|
String[] phones = telPhone.split("\\|");
|
||||||
for (int i = 0; i < phones.length; i++) {
|
for (int i = 0; i < phones.length; i++) {
|
||||||
if (i==0) {
|
if (i == 0) {
|
||||||
if (!StringUtils.isEmpty(phones[i])) {
|
if (!StringUtils.isEmpty(phones[i])) {
|
||||||
String[] split = phones[i].split("-");
|
String[] split = phones[i].split("-");
|
||||||
if (split[0] == phones[i]) {
|
if (split[0] == phones[i]) {
|
||||||
poiBeans.add(new PhoneBean("电话*", phones[i]+"", "", R.drawable.icon_add_bg));
|
poiBeans.add(new PhoneBean("电话*", phones[i] + "", "", R.drawable.icon_add_bg));
|
||||||
} else {
|
} else {
|
||||||
poiBeans.add(new PhoneBean("电话*", split[1]+"", split[0]+"", R.drawable.icon_add_bg));
|
poiBeans.add(new PhoneBean("电话*", split[1] + "", split[0] + "", R.drawable.icon_add_bg));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -292,18 +294,18 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
if (!StringUtils.isEmpty(phones[i])) {
|
if (!StringUtils.isEmpty(phones[i])) {
|
||||||
String[] split = phones[i].split("-");
|
String[] split = phones[i].split("-");
|
||||||
if (split[0] == phones[i]) {
|
if (split[0] == phones[i]) {
|
||||||
poiBeans.add(new PhoneBean("", phones[i]+"", "", R.drawable.icon_del_bg));
|
poiBeans.add(new PhoneBean("", phones[i] + "", "", R.drawable.icon_del_bg));
|
||||||
} else {
|
} else {
|
||||||
poiBeans.add(new PhoneBean("", split[1]+"", split[0]+"", R.drawable.icon_del_bg));
|
poiBeans.add(new PhoneBean("", split[1] + "", split[0] + "", R.drawable.icon_del_bg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Constant.CODE==null||Constant.CODE.equals("")){
|
if (Constant.CODE == null || Constant.CODE.equals("")) {
|
||||||
poiBeans.add(new PhoneBean("电话*", "", "", R.drawable.icon_add_bg));
|
poiBeans.add(new PhoneBean("电话*", "", "", R.drawable.icon_add_bg));
|
||||||
}else {
|
} else {
|
||||||
poiBeans.add(new PhoneBean("电话*", "", Constant.CODE, R.drawable.icon_add_bg));
|
poiBeans.add(new PhoneBean("电话*", "", Constant.CODE, R.drawable.icon_add_bg));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,7 +313,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
contactView = new ContactView(getActivity(), linearContact, poiBeans);
|
contactView = new ContactView(getActivity(), linearContact, poiBeans);
|
||||||
contactView.resetView();
|
contactView.resetView();
|
||||||
//poiRecycleAdapter.setList(poiBeans);
|
//poiRecycleAdapter.setList(poiBeans);
|
||||||
if (showPoiEntity.getName()!=null){
|
if (showPoiEntity.getName() != null) {
|
||||||
linearExist.setVisibility(View.VISIBLE);
|
linearExist.setVisibility(View.VISIBLE);
|
||||||
spinnerExist.setSelection(showPoiEntity.getExistence(), true);
|
spinnerExist.setSelection(showPoiEntity.getExistence(), true);
|
||||||
}
|
}
|
||||||
@ -353,15 +355,15 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.GET_PHONES)
|
.url(HttpInterface.GET_PHONES)
|
||||||
.method(OkGoBuilder.GET)
|
.method(OkGoBuilder.GET)
|
||||||
.params(new HttpParams("geo",encode))
|
.params(new HttpParams("geo", encode))
|
||||||
.cls(GetPhoneBean.class)
|
.cls(GetPhoneBean.class)
|
||||||
.callback(new Callback<GetPhoneBean>() {
|
.callback(new Callback<GetPhoneBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
public void onSuccess(GetPhoneBean getPhoneBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (getPhoneBean.getCode()==200){
|
if (getPhoneBean.getCode() == 200) {
|
||||||
String code = getPhoneBean.getBody().getCode();
|
String code = getPhoneBean.getBody().getCode();
|
||||||
Constant.CODE=code;
|
Constant.CODE = code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,22 +437,22 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
if (tagCard != null) {
|
if (tagCard != null) {
|
||||||
poiPicList.add(new File(tagCard));
|
poiPicList.add(new File(tagCard));
|
||||||
}
|
}
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
|
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0) {
|
||||||
|
initPoiSaveLocal(true);
|
||||||
|
} else {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (poiDaoPoiEntity.getTaskStatus()==1||poiDaoPoiEntity.getTaskStatus()==2||poiDaoPoiEntity.getTaskStatus()==0){
|
poiUploadByNetWork(poiDaoPoiEntity.getBodyId(), poiPicList);
|
||||||
initPoiSaveLocal(true);
|
|
||||||
}else if (poiDaoPoiEntity.getTaskStatus()==3){
|
|
||||||
poiUploadByNetWork(poiDaoPoiEntity.getBodyId(), poiPicList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}
|
||||||
|
}).start();
|
||||||
break;
|
break;
|
||||||
case R.id.tv_examine:
|
case R.id.tv_examine:
|
||||||
Toast.makeText(getContext(), editNameContent.getText().toString(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), editNameContent.getText().toString(), Toast.LENGTH_SHORT).show();
|
||||||
@ -510,11 +512,11 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
poiEntity.setY(String.valueOf(latLng.latitude));
|
poiEntity.setY(String.valueOf(latLng.latitude));
|
||||||
}
|
}
|
||||||
String describe = editDescribe.getText().toString().trim();
|
String describe = editDescribe.getText().toString().trim();
|
||||||
if (describe != null&&!describe.equals("")) {
|
if (describe != null && !describe.equals("")) {
|
||||||
poiEntity.setDescribe(describe);
|
poiEntity.setDescribe(describe);
|
||||||
}
|
}
|
||||||
boolean phoneBean = contactView.getPhoneBean();
|
boolean phoneBean = contactView.getPhoneBean();
|
||||||
if (phoneBean){
|
if (phoneBean) {
|
||||||
String list = contactView.getList();
|
String list = contactView.getList();
|
||||||
poiEntity.setTelPhone(list);
|
poiEntity.setTelPhone(list);
|
||||||
}
|
}
|
||||||
@ -562,7 +564,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
poiSaveByNet(poiEntity,isLocal);
|
poiSaveByNet(poiEntity, isLocal);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -610,7 +612,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
getActivity().onBackPressed();//回退
|
getActivity().onBackPressed();//回退
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -627,7 +629,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void poiSaveByNet(PoiEntity poiEntity,boolean isLocal) {
|
private void poiSaveByNet(PoiEntity poiEntity, boolean isLocal) {
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("taskId", poiEntity.getTaskId());
|
httpParams.put("taskId", poiEntity.getTaskId());
|
||||||
@ -656,9 +658,9 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (isLocal){
|
if (isLocal) {
|
||||||
poiUploadByNetWork(body,poiPicList);//上传
|
poiUploadByNetWork(body, poiPicList);//上传
|
||||||
}else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -709,10 +711,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
poiEntity.setDescribe(describe);
|
poiEntity.setDescribe(describe);
|
||||||
}
|
}
|
||||||
boolean phoneBean = contactView.getPhoneBean();
|
boolean phoneBean = contactView.getPhoneBean();
|
||||||
if (phoneBean){
|
if (phoneBean) {
|
||||||
String list = contactView.getList();
|
String list = contactView.getList();
|
||||||
poiEntity.setTelPhone(list);
|
poiEntity.setTelPhone(list);
|
||||||
}else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "请输入手机号", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请输入手机号", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -774,7 +776,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
takePhotoPath1 = PhotoPathUtil.getTakePhotoPath(data, "a",Geohash.getInstance().encode(latLng.latitude,latLng.longitude));
|
takePhotoPath1 = PhotoPathUtil.getTakePhotoPath(data, "a", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
||||||
ivPanorama.setTag(takePhotoPath1);
|
ivPanorama.setTag(takePhotoPath1);
|
||||||
ivPanorama.setImageBitmap(bitmap);//显示图像
|
ivPanorama.setImageBitmap(bitmap);//显示图像
|
||||||
}
|
}
|
||||||
@ -794,8 +796,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// int angle2 = PictureUtil.readPictureDegree(takePhotoPath2);
|
// int angle2 = PictureUtil.readPictureDegree(takePhotoPath2);
|
||||||
takePhotoPath2 = PhotoPathUtil.getTakePhotoPath(data, "b",Geohash.getInstance().encode(latLng.latitude,latLng.longitude));
|
takePhotoPath2 = PhotoPathUtil.getTakePhotoPath(data, "b", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
||||||
ivName.setTag(takePhotoPath2);
|
ivName.setTag(takePhotoPath2);
|
||||||
ivName.setImageBitmap(bitmap);//显示图像
|
ivName.setImageBitmap(bitmap);//显示图像
|
||||||
}
|
}
|
||||||
@ -815,8 +817,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// int angle3 = PictureUtil.readPictureDegree(takePhotoPath3);
|
// int angle3 = PictureUtil.readPictureDegree(takePhotoPath3);
|
||||||
takePhotoPath3 = PhotoPathUtil.getTakePhotoPath(data, "c",Geohash.getInstance().encode(latLng.latitude,latLng.longitude));
|
takePhotoPath3 = PhotoPathUtil.getTakePhotoPath(data, "c", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
||||||
ivInternal.setTag(takePhotoPath3);
|
ivInternal.setTag(takePhotoPath3);
|
||||||
ivInternal.setImageBitmap(bitmap);//显示图像
|
ivInternal.setImageBitmap(bitmap);//显示图像
|
||||||
}
|
}
|
||||||
@ -836,8 +838,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// int angle4 = PictureUtil.readPictureDegree(takePhotoPath4);
|
// int angle4 = PictureUtil.readPictureDegree(takePhotoPath4);
|
||||||
takePhotoPath4 = PhotoPathUtil.getTakePhotoPath(data, "d",Geohash.getInstance().encode(latLng.latitude,latLng.longitude));
|
takePhotoPath4 = PhotoPathUtil.getTakePhotoPath(data, "d", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
||||||
ivCard.setTag(takePhotoPath4);
|
ivCard.setTag(takePhotoPath4);
|
||||||
ivCard.setImageBitmap(bitmap);//显示图像
|
ivCard.setImageBitmap(bitmap);//显示图像
|
||||||
}
|
}
|
||||||
@ -857,8 +859,8 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// int angle5 = PictureUtil.readPictureDegree(takePhotoPath5);
|
// int angle5 = PictureUtil.readPictureDegree(takePhotoPath5);
|
||||||
takePhotoPath5 = PhotoPathUtil.getTakePhotoPath(data, "e",Geohash.getInstance().encode(latLng.latitude,latLng.longitude));
|
takePhotoPath5 = PhotoPathUtil.getTakePhotoPath(data, "e", Geohash.getInstance().encode(latLng.latitude, latLng.longitude));
|
||||||
ivElse.setTag(takePhotoPath5);
|
ivElse.setTag(takePhotoPath5);
|
||||||
ivElse.setImageBitmap(bitmap);//显示图像
|
ivElse.setImageBitmap(bitmap);//显示图像
|
||||||
}
|
}
|
||||||
@ -875,15 +877,15 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
new Thread(new Runnable() {
|
// new Thread(new Runnable() {
|
||||||
@Override
|
// @Override
|
||||||
public void run() {
|
// public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
// PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
if (poiDaoPoiEntity!=null&&poiDaoPoiEntity.getName() == null) {
|
// if (poiDaoPoiEntity!=null&&poiDaoPoiEntity.getName() == null) {
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
// poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}).start();
|
// }).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -293,16 +293,17 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
if (poiDaoPoiEntity == null||poiDaoPoiEntity.getTaskStatus()==1||poiDaoPoiEntity.getTaskStatus()==2||poiDaoPoiEntity.getTaskStatus()==0){
|
||||||
@Override
|
initPoiSaveLocal(true);
|
||||||
public void run() {
|
}else {
|
||||||
if (poiDaoPoiEntity.getTaskStatus()==1||poiDaoPoiEntity.getTaskStatus()==2||poiDaoPoiEntity.getTaskStatus()==0){
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
initPoiSaveLocal(true);
|
@Override
|
||||||
}else if (poiDaoPoiEntity.getTaskStatus()==3){
|
public void run() {
|
||||||
poiVideoUpload(poiDaoPoiEntity.getBodyId(), fileZip);
|
poiVideoUpload(poiDaoPoiEntity.getBodyId(), fileZip);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
break;
|
break;
|
||||||
@ -326,8 +327,22 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
String formats = formatters.format(calendars.getTime());
|
String formats = formatters.format(calendars.getTime());
|
||||||
String city = Constant.currentLocation.getCity();//返回当前位置的城市.
|
String city = Constant.currentLocation.getCity();//返回当前位置的城市.
|
||||||
String district = Constant.currentLocation.getDistrict();//返回当前位置的区县.
|
String district = Constant.currentLocation.getDistrict();//返回当前位置的区县.
|
||||||
poiEntity.setName("poi录像上报-"+city+district+"-"+formats);
|
StringBuilder sb = new StringBuilder("poi录像上报");
|
||||||
etRoadName.setText("poi录像上报-"+city+district+"-"+formats);
|
if (city!=null&&!"".equals(city)) {
|
||||||
|
sb.append("-");
|
||||||
|
sb.append(city);
|
||||||
|
}
|
||||||
|
if (district!=null&&!"".equals(district)) {
|
||||||
|
sb.append(district);
|
||||||
|
}
|
||||||
|
sb.append("-").append(formats);
|
||||||
|
poiEntity.setName(sb.toString());
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
etRoadName.setText(sb);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
RoadExtend roadExtend = new RoadExtend();
|
RoadExtend roadExtend = new RoadExtend();
|
||||||
int type = getPictureType();
|
int type = getPictureType();
|
||||||
@ -429,7 +444,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(Response<OtherUploadPicBean> otherUploadPicBeanResponse) {
|
public void onSuccess(Response<OtherUploadPicBean> otherUploadPicBeanResponse) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), "上传成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "上传成功", Toast.LENGTH_SHORT).show();
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.navinfo.outdoor.fragment;
|
package com.navinfo.outdoor.fragment;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -28,6 +29,8 @@ public class RecordFragment extends BaseFragment implements View.OnClickListener
|
|||||||
private TabLayout tabRecord;
|
private TabLayout tabRecord;
|
||||||
private NoSlideViewPager vpRecord;
|
private NoSlideViewPager vpRecord;
|
||||||
private final String[] names = {"待提交", "已提交"};
|
private final String[] names = {"待提交", "已提交"};
|
||||||
|
private StaySubmitFragment staySubmitFragment; // 待提交
|
||||||
|
private HasSubmitFragment hasSubmitFragment;// 已提交
|
||||||
|
|
||||||
public static RecordFragment newInstance(Bundle bundle) {
|
public static RecordFragment newInstance(Bundle bundle) {
|
||||||
RecordFragment fragment = new RecordFragment();
|
RecordFragment fragment = new RecordFragment();
|
||||||
@ -47,8 +50,11 @@ public class RecordFragment extends BaseFragment implements View.OnClickListener
|
|||||||
vpRecord = (NoSlideViewPager) findViewById(R.id.vp_record);
|
vpRecord = (NoSlideViewPager) findViewById(R.id.vp_record);
|
||||||
|
|
||||||
ArrayList<Fragment> fragments = new ArrayList<>();
|
ArrayList<Fragment> fragments = new ArrayList<>();
|
||||||
fragments.add(new StaySubmitFragment());
|
new StaySubmitFragment();
|
||||||
fragments.add(new HasSubmitFragment());
|
staySubmitFragment = new StaySubmitFragment();
|
||||||
|
fragments.add(staySubmitFragment);
|
||||||
|
hasSubmitFragment = new HasSubmitFragment();
|
||||||
|
fragments.add(hasSubmitFragment);
|
||||||
vpRecord.setAdapter(new FragmentPagerAdapter(getFragmentManager()) {
|
vpRecord.setAdapter(new FragmentPagerAdapter(getFragmentManager()) {
|
||||||
@NonNull
|
@NonNull
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -78,4 +84,16 @@ public class RecordFragment extends BaseFragment implements View.OnClickListener
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 刷新fragment内的所有数据
|
||||||
|
* */
|
||||||
|
public void refreshData() {
|
||||||
|
if (staySubmitFragment!=null) {
|
||||||
|
staySubmitFragment.refreshData();
|
||||||
|
}
|
||||||
|
// if (hasSubmitFragment!=null) {
|
||||||
|
// hasSubmitFragment.refreshData();
|
||||||
|
// }
|
||||||
|
}
|
||||||
}
|
}
|
@ -41,6 +41,7 @@ import com.navinfo.outdoor.base.BaseDrawerFragment;
|
|||||||
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
import com.navinfo.outdoor.bean.OtherUploadPicBean;
|
||||||
import com.navinfo.outdoor.bean.PoiVideoBean;
|
import com.navinfo.outdoor.bean.PoiVideoBean;
|
||||||
import com.navinfo.outdoor.bean.RoadExtend;
|
import com.navinfo.outdoor.bean.RoadExtend;
|
||||||
|
import com.navinfo.outdoor.bean.RoadSaveBean;
|
||||||
import com.navinfo.outdoor.http.Callback;
|
import com.navinfo.outdoor.http.Callback;
|
||||||
import com.navinfo.outdoor.http.DialogCallback;
|
import com.navinfo.outdoor.http.DialogCallback;
|
||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
@ -70,7 +71,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class RoadFragment extends BaseDrawerFragment implements View.OnClickListener {
|
public class RoadFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||||
private TextView tvPictures;
|
private TextView tvPictures;
|
||||||
private EditText etRoadName;
|
private TextView etRoadName;
|
||||||
private ImageView ivRoadPicture;
|
private ImageView ivRoadPicture;
|
||||||
private RadioButton rbCar;
|
private RadioButton rbCar;
|
||||||
private RadioButton rbBicycle;
|
private RadioButton rbBicycle;
|
||||||
@ -139,7 +140,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
poiDao = poiDatabase.getPoiDao();
|
poiDao = poiDatabase.getPoiDao();
|
||||||
tvPictures = (TextView) findViewById(R.id.tv_pictures);
|
tvPictures = (TextView) findViewById(R.id.tv_pictures);
|
||||||
tvPictures.setOnClickListener(this::onClick);
|
tvPictures.setOnClickListener(this::onClick);
|
||||||
etRoadName = (EditText) findViewById(R.id.et_road_name);
|
etRoadName = (TextView) findViewById(R.id.et_road_name);
|
||||||
ivRoadPicture = (ImageView) findViewById(R.id.iv_road_picture);
|
ivRoadPicture = (ImageView) findViewById(R.id.iv_road_picture);
|
||||||
// Glide.with(getContext()).load(getLocalVideoBitmap(String.valueOf(R.drawable.bg_01))).into(ivRoadPicture);
|
// Glide.with(getContext()).load(getLocalVideoBitmap(String.valueOf(R.drawable.bg_01))).into(ivRoadPicture);
|
||||||
rbCar = (RadioButton) findViewById(R.id.rb_car);
|
rbCar = (RadioButton) findViewById(R.id.rb_car);
|
||||||
@ -245,7 +246,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.btn_road_save:
|
case R.id.btn_road_save:
|
||||||
initPoiSaveLocal(false);
|
initPoiSaveLocal(false);
|
||||||
break;
|
break;
|
||||||
case R.id.tv_pictures:
|
case R.id.tv_pictures:
|
||||||
// 根据用户点击的时间为视频名称赋值
|
// 根据用户点击的时间为视频名称赋值
|
||||||
@ -268,22 +269,24 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
if (poiDaoPoiEntity == null || poiDaoPoiEntity.getTaskStatus() == 1 || poiDaoPoiEntity.getTaskStatus() == 2 || poiDaoPoiEntity.getTaskStatus() == 0) {
|
||||||
@Override
|
initPoiSaveLocal(true);
|
||||||
public void run() {
|
} else {
|
||||||
if (poiDaoPoiEntity.getTaskStatus()==1||poiDaoPoiEntity.getTaskStatus()==2||poiDaoPoiEntity.getTaskStatus()==0){
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
initPoiSaveLocal(true);
|
@Override
|
||||||
}else if (poiDaoPoiEntity.getTaskStatus()==3){
|
public void run() {
|
||||||
poiVideoUpload(poiDaoPoiEntity.getBodyId(), fileZip);
|
poiVideoUpload(poiDaoPoiEntity.getBodyId(), fileZip);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initPoiSaveLocal(boolean isLocal) {
|
public void initPoiSaveLocal(boolean isLocal) {
|
||||||
XXPermissions.with(getContext())
|
XXPermissions.with(getContext())
|
||||||
.permission(Permission.MANAGE_EXTERNAL_STORAGE)
|
.permission(Permission.MANAGE_EXTERNAL_STORAGE)
|
||||||
@ -295,15 +298,29 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
String roadName = etRoadName.getText().toString().trim();
|
String roadName = etRoadName.getText().toString().trim();
|
||||||
if (roadName != null && !roadName.equals("")) {
|
if (roadName != null && !roadName.equals("")) {
|
||||||
poiEntity.setName(roadName);
|
poiEntity.setName(roadName);
|
||||||
}else {
|
} else {
|
||||||
DateFormat formatters = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
|
DateFormat formatters = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
|
||||||
Calendar calendars = Calendar.getInstance();
|
Calendar calendars = Calendar.getInstance();
|
||||||
calendars.setTimeInMillis(System.currentTimeMillis());
|
calendars.setTimeInMillis(System.currentTimeMillis());
|
||||||
String formats = formatters.format(calendars.getTime());
|
String formats = formatters.format(calendars.getTime());
|
||||||
String city = Constant.currentLocation.getCity();//返回当前位置的城市.
|
String city = Constant.currentLocation.getCity();//返回当前位置的城市.
|
||||||
String district = Constant.currentLocation.getDistrict();//返回当前位置的区县.
|
String district = Constant.currentLocation.getDistrict();//返回当前位置的区县.
|
||||||
poiEntity.setName("道路录像上报-"+city+district+"-"+formats);
|
StringBuffer sb = new StringBuffer("poi录像上报");
|
||||||
etRoadName.setText("道路录像上报-"+city+district+"-"+formats);
|
if (city != null && !"".equals(city)) {
|
||||||
|
sb.append("-");
|
||||||
|
sb.append(city);
|
||||||
|
}
|
||||||
|
if (district != null && !"".equals(district)) {
|
||||||
|
sb.append(district);
|
||||||
|
}
|
||||||
|
sb.append("-").append(formats);
|
||||||
|
poiEntity.setName(sb.toString());
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
etRoadName.setText(sb);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
RoadExtend roadExtend = new RoadExtend();
|
RoadExtend roadExtend = new RoadExtend();
|
||||||
int type = getPictureType();
|
int type = getPictureType();
|
||||||
@ -316,7 +333,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
String roadExtendJson = gson.toJson(roadExtend);
|
String roadExtendJson = gson.toJson(roadExtend);
|
||||||
poiEntity.setExtend(roadExtendJson);
|
poiEntity.setExtend(roadExtendJson);
|
||||||
String desc = etDesc.getText().toString().trim();
|
String desc = etDesc.getText().toString().trim();
|
||||||
if (desc != null&& !desc.equals("")) {
|
if (desc != null && !desc.equals("")) {
|
||||||
poiEntity.setDescribe(desc);
|
poiEntity.setDescribe(desc);
|
||||||
}
|
}
|
||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
@ -361,12 +378,14 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
poiVideoSave(poiEntity,isLocal);
|
roadSaveBetWork(poiEntity, isLocal);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
//onBackPressed();
|
//onBackPressed();
|
||||||
|
} else {
|
||||||
|
Toast.makeText(getActivity(), "没有申请权限,请手动申请", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -387,7 +406,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
Toast.makeText(getActivity(), "请先保存本地在上传", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请先保存本地在上传", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (fileZip==null){
|
if (fileZip == null) {
|
||||||
Toast.makeText(getActivity(), "未压缩完成", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "未压缩完成", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -395,8 +414,8 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
// 请求方式和请求url
|
// 请求方式和请求url
|
||||||
.<OtherUploadPicBean>post(HttpInterface.POI_VIDEO_UPLOAD_PIC)
|
.<OtherUploadPicBean>post(HttpInterface.POI_VIDEO_UPLOAD_PIC)
|
||||||
// 请求的 tag, 主要用于取消对应的请求
|
// 请求的 tag, 主要用于取消对应的请求
|
||||||
.params("auditId",body)
|
.params("auditId", body)
|
||||||
.params("file",fileZip)
|
.params("file", fileZip)
|
||||||
.tag(this)
|
.tag(this)
|
||||||
.execute(new DialogCallback<OtherUploadPicBean>(OtherUploadPicBean.class) {
|
.execute(new DialogCallback<OtherUploadPicBean>(OtherUploadPicBean.class) {
|
||||||
@Override
|
@Override
|
||||||
@ -423,14 +442,13 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
public void onError(Response<OtherUploadPicBean> response) {
|
public void onError(Response<OtherUploadPicBean> response) {
|
||||||
super.onError(response);
|
super.onError(response);
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Toast.makeText(getActivity(), response.code()+"", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.code() + "", Toast.LENGTH_SHORT).show();
|
||||||
Log.d("TAG", "onError: " + response.code()+"");
|
Log.d("TAG", "onError: " + response.code() + "");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void poiVideoSave(PoiEntity poiEntity,boolean isLocal) {
|
private void roadSaveBetWork(PoiEntity poiEntity, boolean isLocal) {
|
||||||
|
|
||||||
showLoadingDialog();
|
showLoadingDialog();
|
||||||
int pictureType = getPictureType();
|
int pictureType = getPictureType();
|
||||||
if (pictureType == -1) {
|
if (pictureType == -1) {
|
||||||
@ -445,15 +463,16 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
httpParams.put("memo", poiEntity.getMemo());
|
httpParams.put("memo", poiEntity.getMemo());
|
||||||
OkGoBuilder.getInstance()
|
OkGoBuilder.getInstance()
|
||||||
.Builder(getActivity())
|
.Builder(getActivity())
|
||||||
.url(HttpInterface.INSIDE_API_LIST)
|
.url(HttpInterface.ROAD_TASK_SUBMIT)
|
||||||
.method(OkGoBuilder.GET)
|
.method(OkGoBuilder.GET)
|
||||||
.cls(PoiVideoBean.class)
|
.cls(RoadSaveBean.class)
|
||||||
.callback(new Callback<PoiVideoBean>() {
|
.params(httpParams)
|
||||||
|
.callback(new Callback<RoadSaveBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(PoiVideoBean poiVideoBean, int id) {
|
public void onSuccess(RoadSaveBean roadSaveBean, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
Integer body = poiVideoBean.getBody();
|
Integer poiVideoBody = roadSaveBean.getBody();
|
||||||
poiEntity.setBodyId(body);
|
poiEntity.setBodyId(poiVideoBody);
|
||||||
poiEntity.setTaskStatus(3);
|
poiEntity.setTaskStatus(3);
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -462,12 +481,11 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (isLocal){
|
if (isLocal) {
|
||||||
poiVideoUpload(body,fileZip);
|
poiVideoUpload(poiVideoBody, fileZip);
|
||||||
}else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "保存成功", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -482,7 +500,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
Log.d("TAG", "onError: " + e.getMessage());
|
Log.d("TAG", "onError: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}).build();
|
}).build();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -499,6 +516,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSaveInstanceState(@NonNull Bundle outState) {
|
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||||
super.onSaveInstanceState(outState);
|
super.onSaveInstanceState(outState);
|
||||||
@ -590,14 +608,14 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
new Thread(new Runnable() {
|
// new Thread(new Runnable() {
|
||||||
@Override
|
// @Override
|
||||||
public void run() {
|
// public void run() {
|
||||||
PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
// PoiEntity poiDaoPoiEntity = poiDao.getPoiEntity(showPoiEntity.getId());
|
||||||
if (poiDaoPoiEntity!=null&&poiDaoPoiEntity.getName() == null) {
|
// if (poiDaoPoiEntity!=null&&poiDaoPoiEntity.getName() == null) {
|
||||||
poiDao.deletePoiEntity(poiDaoPoiEntity);
|
// poiDao.deletePoiEntity(poiDaoPoiEntity);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}).start();
|
// }).start();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -97,33 +97,13 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
staySubmitAdapter.notifyDataSetChanged();
|
staySubmitAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
refreshData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
@Override
|
// protected void initData() {
|
||||||
protected void initData() {
|
// super.initData();
|
||||||
super.initData();
|
// }
|
||||||
roadDatabase = PoiDatabase.getInstance(getContext());
|
|
||||||
roadDao = roadDatabase.getPoiDao();
|
|
||||||
roadEntities = new ArrayList<>();
|
|
||||||
newEntities = new ArrayList<>();
|
|
||||||
new Thread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
List<PoiEntity> roadAll = roadDao.getAllPoi();
|
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Log.d("TAG", "run: " + roadEntities.toString());
|
|
||||||
roadEntities.clear();
|
|
||||||
roadEntities.addAll(roadAll);
|
|
||||||
staySubmitAdapter.setAllRoad(roadEntities);
|
|
||||||
staySubmitAdapter.notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<PoiEntity> initRoadWord(int type){
|
public List<PoiEntity> initRoadWord(int type){
|
||||||
newEntities.clear();
|
newEntities.clear();
|
||||||
@ -196,7 +176,31 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void refreshData() {
|
||||||
|
roadDatabase = PoiDatabase.getInstance(getContext());
|
||||||
|
roadDao = roadDatabase.getPoiDao();
|
||||||
|
if (roadEntities ==null) {
|
||||||
|
roadEntities = new ArrayList<>();
|
||||||
|
}
|
||||||
|
if (newEntities == null) {
|
||||||
|
newEntities = new ArrayList<>();
|
||||||
|
}
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
List<PoiEntity> roadAll = roadDao.getAllPoi();
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Log.d("TAG", "run: " + roadEntities.toString());
|
||||||
|
roadEntities.clear();
|
||||||
|
roadEntities.addAll(roadAll);
|
||||||
|
staySubmitAdapter.setAllRoad(roadEntities);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -19,6 +19,7 @@ import android.widget.ImageView;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
|
|
||||||
@ -103,13 +104,18 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
private FrameLayout frameLayout;
|
private FrameLayout frameLayout;
|
||||||
private GatherGetFragment gatherGetFragment;
|
private GatherGetFragment gatherGetFragment;
|
||||||
private LinearLayout dragView;
|
private LinearLayout dragView;
|
||||||
private ImageView ivMessage;
|
public ImageView ivMessage;
|
||||||
private PoiDao poiDao;
|
private PoiDao poiDao;
|
||||||
private ChargingPileEntity chargingPileEntity;
|
private ChargingPileEntity chargingPileEntity;
|
||||||
private String userEncode;
|
private String userEncode;
|
||||||
private String centerEncode;
|
private String centerEncode;
|
||||||
private List<Removable> removables;
|
private List<Removable> removables;
|
||||||
private List<Removable> removablesLocality;
|
private List<Removable> removablesLocality;
|
||||||
|
/**
|
||||||
|
* bitmapDescriptor1
|
||||||
|
*/
|
||||||
|
|
||||||
|
private BitmapDescriptor bitmapDescriptor1, bitmapDescriptor2, bitmapDescriptor3, bitmapDescriptor4, bitmapDescriptor5;
|
||||||
|
|
||||||
public static TreasureFragment newInstance(Bundle bundle) {
|
public static TreasureFragment newInstance(Bundle bundle) {
|
||||||
TreasureFragment fragment = new TreasureFragment();
|
TreasureFragment fragment = new TreasureFragment();
|
||||||
@ -126,6 +132,12 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
|
bitmapDescriptor1 = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg);
|
||||||
|
bitmapDescriptor2 = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_bg);
|
||||||
|
bitmapDescriptor3 = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bg);
|
||||||
|
bitmapDescriptor4 = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bg);
|
||||||
|
bitmapDescriptor5 = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bg);
|
||||||
|
|
||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
//fragment 管理器
|
//fragment 管理器
|
||||||
supportFragmentManager = getActivity().getSupportFragmentManager();
|
supportFragmentManager = getActivity().getSupportFragmentManager();
|
||||||
@ -144,7 +156,11 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
ivMessage.setOnClickListener(this::onClick);
|
ivMessage.setOnClickListener(this::onClick);
|
||||||
treasureMap = (MapView) findViewById(R.id.treasure_map);
|
treasureMap = (MapView) findViewById(R.id.treasure_map);
|
||||||
tencentMap = treasureMap.getMap();
|
tencentMap = treasureMap.getMap();
|
||||||
|
// if (getClass().getCanonicalName().equals("PioFragment")){
|
||||||
|
// ivMessage.setVisibility(View.VISIBLE);
|
||||||
|
// }else {
|
||||||
|
// ivMessage.setVisibility(View.GONE);
|
||||||
|
// }
|
||||||
cbMapType = (CheckBox) findViewById(R.id.cb_map_type);
|
cbMapType = (CheckBox) findViewById(R.id.cb_map_type);
|
||||||
cbFootType = (CheckBox) findViewById(R.id.cb_foot_type);
|
cbFootType = (CheckBox) findViewById(R.id.cb_foot_type);
|
||||||
// sliding_layout.setScrollableViewHelper(new NestedScrollableViewHelper());
|
// sliding_layout.setScrollableViewHelper(new NestedScrollableViewHelper());
|
||||||
@ -351,7 +367,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
switch (Integer.valueOf(list.get(i).getType())) {
|
switch (Integer.valueOf(list.get(i).getType())) {
|
||||||
case 1://poi
|
case 1://poi
|
||||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg);
|
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg);
|
||||||
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).alpha(0.7f)
|
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).alpha(0.9f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.clockwise(false));
|
.clockwise(false));
|
||||||
poiMarker.setTag(listBean);
|
poiMarker.setTag(listBean);
|
||||||
@ -360,7 +376,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 2://充电站
|
case 2://充电站
|
||||||
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bg);
|
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bg);
|
||||||
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor).alpha(0.7f)
|
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor).alpha(0.9f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.clockwise(false));
|
.clockwise(false));
|
||||||
stationMarker.setTag(listBean);
|
stationMarker.setTag(listBean);
|
||||||
@ -369,7 +385,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 3://poi录像
|
case 3://poi录像
|
||||||
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_bg);
|
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_bg);
|
||||||
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).alpha(0.7f)
|
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).alpha(0.9f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.clockwise(false));
|
.clockwise(false));
|
||||||
poiVideoMarker.setTag(listBean);
|
poiVideoMarker.setTag(listBean);
|
||||||
@ -378,7 +394,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 4://道路录像
|
case 4://道路录像
|
||||||
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bg);
|
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bg);
|
||||||
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).alpha(0.7f)
|
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).alpha(0.9f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.clockwise(false));
|
.clockwise(false));
|
||||||
roadMarker.setTag(listBean);
|
roadMarker.setTag(listBean);
|
||||||
@ -387,7 +403,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 5://其他
|
case 5://其他
|
||||||
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bg);
|
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bg);
|
||||||
Marker otherMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor).alpha(0.7f)
|
Marker otherMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor).alpha(0.9f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.clockwise(false));
|
.clockwise(false));
|
||||||
otherMarker.setTag(listBean);
|
otherMarker.setTag(listBean);
|
||||||
@ -395,8 +411,8 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
otherMarker.setClickable(true);
|
otherMarker.setClickable(true);
|
||||||
break;
|
break;
|
||||||
case 6://面状任务
|
case 6://面状任务
|
||||||
BitmapDescriptor Descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bg);
|
BitmapDescriptor Descriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_bg);
|
||||||
Marker planarMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(Descriptor).alpha(0.7f)
|
Marker planarMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(Descriptor).alpha(0.9f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.clockwise(false));
|
.clockwise(false));
|
||||||
Log.d("面妆任务", "onSuccess: " + planarMarker);
|
Log.d("面妆任务", "onSuccess: " + planarMarker);
|
||||||
@ -505,7 +521,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
switch (Integer.valueOf(poiEntity.getType())) {
|
switch (Integer.valueOf(poiEntity.getType())) {
|
||||||
case 1://poi
|
case 1://poi
|
||||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_have_bg);
|
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_have_bg);
|
||||||
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).alpha(0.7f)
|
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).alpha(0.9f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.clockwise(false));
|
.clockwise(false));
|
||||||
poiMarker.setClickable(true);
|
poiMarker.setClickable(true);
|
||||||
@ -515,7 +531,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 2://充电站
|
case 2://充电站
|
||||||
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_have_bg);
|
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_have_bg);
|
||||||
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor).alpha(0.7f)
|
Marker stationMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(chargeDescriptor).alpha(0.9f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.clockwise(false));
|
.clockwise(false));
|
||||||
stationMarker.setClickable(true);
|
stationMarker.setClickable(true);
|
||||||
@ -525,7 +541,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 3://poi录像
|
case 3://poi录像
|
||||||
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_have_bg);
|
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_have_bg);
|
||||||
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).alpha(0.7f)
|
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor).alpha(0.9f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.clockwise(false));
|
.clockwise(false));
|
||||||
poiVideoMarker.setClickable(true);
|
poiVideoMarker.setClickable(true);
|
||||||
@ -535,7 +551,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 4://道路录像
|
case 4://道路录像
|
||||||
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_have_bg);
|
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_have_bg);
|
||||||
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).alpha(0.7f)
|
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor).alpha(0.9f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.clockwise(false));
|
.clockwise(false));
|
||||||
roadMarker.setClickable(true);
|
roadMarker.setClickable(true);
|
||||||
@ -545,7 +561,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 5://其他
|
case 5://其他
|
||||||
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_have_bg);
|
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_have_bg);
|
||||||
Marker otherMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor).alpha(0.7f)
|
Marker otherMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor).alpha(0.9f)
|
||||||
.flat(true)
|
.flat(true)
|
||||||
.clockwise(false));
|
.clockwise(false));
|
||||||
otherMarker.setClickable(true);
|
otherMarker.setClickable(true);
|
||||||
@ -555,7 +571,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
break;
|
break;
|
||||||
case 6://面状任务
|
case 6://面状任务
|
||||||
BitmapDescriptor Descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_have_bg);
|
BitmapDescriptor Descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_have_bg);
|
||||||
Marker planarMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(Descriptor).alpha(0.7f)
|
Marker planarMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(Descriptor).alpha(0.9f)
|
||||||
.clockwise(false)
|
.clockwise(false)
|
||||||
.flat(true));
|
.flat(true));
|
||||||
planarMarker.setClickable(true);
|
planarMarker.setClickable(true);
|
||||||
@ -695,10 +711,24 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
gatherGetFragment = GatherGetFragment.newInstance(bundle);
|
gatherGetFragment = GatherGetFragment.newInstance(bundle);
|
||||||
fragmentTransaction.replace(R.id.frame_layout, gatherGetFragment);
|
fragmentTransaction.replace(R.id.frame_layout, gatherGetFragment);
|
||||||
fragmentTransaction.commit();
|
fragmentTransaction.commit();
|
||||||
} else if (data.what == Constant.GATHER_GET) { //删选item 点击开始采集
|
|
||||||
|
// 如果当前fragment是筛选,则移除该fragment
|
||||||
|
FilterFragment filterFragment = (FilterFragment) supportFragmentManager.findFragmentByTag(FilterFragment.class.getName());
|
||||||
|
if (filterFragment != null) {
|
||||||
|
fragmentTransaction.remove(filterFragment);
|
||||||
|
fragmentTransaction.commit();
|
||||||
|
}
|
||||||
|
} else if (data.what == Constant.GATHER_GET) { //筛选item 点击开始采集
|
||||||
|
// 如果当前fragment是筛选,则移除该fragment
|
||||||
|
FilterFragment filterFragment = (FilterFragment) supportFragmentManager.findFragmentByTag(FilterFragment.class.getName());
|
||||||
|
if (filterFragment != null) {
|
||||||
|
fragmentTransaction.remove(filterFragment);
|
||||||
|
fragmentTransaction.commit();
|
||||||
|
}
|
||||||
|
|
||||||
PoiEntity poiEntity = (PoiEntity) data.obj;
|
PoiEntity poiEntity = (PoiEntity) data.obj;
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putBoolean("isSliding", false); // 通知抽屉不收回
|
bundle.putBoolean("isSliding", true); // 通知抽屉不收回
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
switch (poiEntity.getType()) {
|
switch (poiEntity.getType()) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -728,7 +758,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
PoiEntity poiEntity = (PoiEntity) data.obj;
|
PoiEntity poiEntity = (PoiEntity) data.obj;
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
bundle.putBoolean("isSliding", false); // 通知抽屉不收回
|
bundle.putBoolean("isSliding", true); // 通知抽屉不收回
|
||||||
switch (poiEntity.getType()) {
|
switch (poiEntity.getType()) {
|
||||||
case 1:
|
case 1:
|
||||||
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
||||||
@ -845,6 +875,10 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
removablesLocality.clear();
|
removablesLocality.clear();
|
||||||
initThread();// 查询本地数据库
|
initThread();// 查询本地数据库
|
||||||
initList(Constant.currentLocation);//网络数据
|
initList(Constant.currentLocation);//网络数据
|
||||||
|
} else if (data.what == Constant.EVENT_WHAT_CURRENT_MARKER) {
|
||||||
|
LatLng latLng = (LatLng) data.obj;
|
||||||
|
int type = data.arg1;
|
||||||
|
showPoiMarkerByType(type, latLng);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -885,7 +919,10 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
screenPosition = tencentMap.getProjection().toScreenLocation(latLng);
|
screenPosition = tencentMap.getProjection().toScreenLocation(latLng);
|
||||||
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
|
||||||
//创建Marker对象之前,设置属性
|
//创建Marker对象之前,设置属性
|
||||||
markerPoi.setFixingPoint(screenPosition.x, screenPosition.y);
|
if (markerPoi!=null){
|
||||||
|
markerPoi.setFixingPoint(screenPosition.x, screenPosition.y);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -970,12 +1007,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
ivMessage.setVisibility(View.VISIBLE);
|
||||||
treasureMap.onResume();
|
treasureMap.onResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
ivMessage.setVisibility(View.GONE);
|
||||||
treasureMap.onPause();
|
treasureMap.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1029,7 +1068,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.iv_submit://弹窗
|
case R.id.iv_submit://弹窗
|
||||||
|
|
||||||
//分享
|
//分享
|
||||||
CharSequence title = "请选择上报类型";
|
CharSequence title = "请选择上报类型";
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_MIUI;
|
DialogSettings.style = DialogSettings.STYLE.STYLE_MIUI;
|
||||||
@ -1039,11 +1077,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_road, "道路"));
|
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_road, "道路"));
|
||||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_chongdianzhuang, "充电站"));
|
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_chongdianzhuang, "充电站"));
|
||||||
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_qingbao, "其他"));
|
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_qingbao, "其他"));
|
||||||
if (!ivSubmit.isClickable()){
|
|
||||||
ivMessage.setVisibility(View.VISIBLE);
|
|
||||||
}else {
|
|
||||||
ivMessage.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
PoiEntity poiEntity = new PoiEntity();
|
PoiEntity poiEntity = new PoiEntity();
|
||||||
LatLng mapCenterPoint = getMapCenterPoint();
|
LatLng mapCenterPoint = getMapCenterPoint();
|
||||||
@ -1053,17 +1087,16 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
@Override
|
@Override
|
||||||
public boolean onClick(ShareDialog shareDialog, int index, ShareDialog.Item item) {
|
public boolean onClick(ShareDialog shareDialog, int index, ShareDialog.Item item) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0: // POI
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
// InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg);
|
showPoiMarkerByType(1, mapCenterPoint);
|
||||||
markerPoi = tencentMap.addMarker(new MarkerOptions(mapCenterPoint).icon(poiDescriptor));
|
|
||||||
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
|
||||||
showSlidingFragment(poiFragment);
|
showSlidingFragment(poiFragment);
|
||||||
}
|
}
|
||||||
@ -1071,17 +1104,17 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1: // POI录像
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
|
||||||
|
// InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_bg);
|
showPoiMarkerByType(2, mapCenterPoint);
|
||||||
markerPoi = tencentMap.addMarker(new MarkerOptions(mapCenterPoint).icon(poiVideoDescriptor));
|
|
||||||
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
|
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
|
||||||
showSlidingFragment(poiVideoFragment);
|
showSlidingFragment(poiVideoFragment);
|
||||||
}
|
}
|
||||||
@ -1090,18 +1123,17 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2://道路录像
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
// InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bg);
|
showPoiMarkerByType(3, mapCenterPoint);
|
||||||
markerPoi = tencentMap.addMarker(new MarkerOptions(mapCenterPoint).icon(roadDescriptor));
|
|
||||||
RoadFragment roadFragment = RoadFragment.newInstance(bundle);
|
RoadFragment roadFragment = RoadFragment.newInstance(bundle);
|
||||||
showSlidingFragment(roadFragment);
|
showSlidingFragment(roadFragment);
|
||||||
}
|
}
|
||||||
@ -1109,7 +1141,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3://充电站
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -1118,8 +1150,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
BitmapDescriptor chargeDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bg);
|
showPoiMarkerByType(4, mapCenterPoint);
|
||||||
markerPoi = tencentMap.addMarker(new MarkerOptions(mapCenterPoint).icon(chargeDescriptor));
|
|
||||||
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
|
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
|
||||||
showSlidingFragment(chargingStationFragment);
|
showSlidingFragment(chargingStationFragment);
|
||||||
}
|
}
|
||||||
@ -1127,24 +1158,22 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4://其他
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
// InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
|
||||||
bundle.putSerializable("poiEntity", poiEntity);
|
bundle.putSerializable("poiEntity", poiEntity);
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bg);
|
showPoiMarkerByType(5, mapCenterPoint);
|
||||||
markerPoi = tencentMap.addMarker(new MarkerOptions(mapCenterPoint).icon(otherDescriptor));
|
|
||||||
OtherFragment otherFragment = OtherFragment.newInstance(bundle);
|
OtherFragment otherFragment = OtherFragment.newInstance(bundle);
|
||||||
showSlidingFragment(otherFragment);
|
showSlidingFragment(otherFragment);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -1165,6 +1194,21 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showPoiMarkerByType(int type, LatLng latLng) {
|
||||||
|
if (type == 1) {
|
||||||
|
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(bitmapDescriptor1));
|
||||||
|
}else if (type == 2){
|
||||||
|
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(bitmapDescriptor2));
|
||||||
|
}else if (type == 3){
|
||||||
|
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(bitmapDescriptor3));
|
||||||
|
}else if (type == 4){
|
||||||
|
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(bitmapDescriptor4));
|
||||||
|
}else if (type == 5){
|
||||||
|
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(bitmapDescriptor5));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* header 头部布局
|
* header 头部布局
|
||||||
*
|
*
|
||||||
|
@ -64,6 +64,8 @@ public class HttpInterface {
|
|||||||
public static final String RECEIVED_POI_VIDEO_TASK = IPm6 + "poivideotask/1/receivedPoivideotask";//poi录像任务获取
|
public static final String RECEIVED_POI_VIDEO_TASK = IPm6 + "poivideotask/1/receivedPoivideotask";//poi录像任务获取
|
||||||
// 172.23.139.4:8003/poivideotask/1/submitPoivideotask
|
// 172.23.139.4:8003/poivideotask/1/submitPoivideotask
|
||||||
public static final String INSIDE_API_LIST = IPm6 + "poivideotask/1/submitPoivideotask";//poi录像 保存
|
public static final String INSIDE_API_LIST = IPm6 + "poivideotask/1/submitPoivideotask";//poi录像 保存
|
||||||
|
//172.23.139.4:8003/roadtask/1/submitRoadtask?taskId=0&name=段哥&address=二娃&memo=1rn7exd5uhxy&workType=2
|
||||||
|
public static final String ROAD_TASK_SUBMIT = IPm6+"roadtask/1/submitRoadtask";
|
||||||
//172.23.139.4:8003/poivideotask/1/uploadpic
|
//172.23.139.4:8003/poivideotask/1/uploadpic
|
||||||
public static final String POI_VIDEO_UPLOAD_PIC = IPm6 + "poivideotask/1/uploadpic";//poi录像-上传
|
public static final String POI_VIDEO_UPLOAD_PIC = IPm6 + "poivideotask/1/uploadpic";//poi录像-上传
|
||||||
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
|
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
|
||||||
|
5
app/src/main/res/drawable/ic_baseline_navigate.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#AFADAD"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="30"
|
||||||
|
android:width="28dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
|
||||||
|
</vector>
|
BIN
app/src/main/res/drawable/marker_charge_bags.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 3.2 KiB |
BIN
app/src/main/res/drawable/marker_other_bag.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable/marker_pile_bag.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
app/src/main/res/drawable/marker_poi_bag.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable/marker_poi_bags.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/drawable/marker_road_bag.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 4.1 KiB |
BIN
app/src/main/res/drawable/poi_video_bag.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.8 KiB |
@ -41,7 +41,6 @@
|
|||||||
android:text="用户名"
|
android:text="用户名"
|
||||||
app:layout_constraintLeft_toLeftOf="@id/tv_login_deck"
|
app:layout_constraintLeft_toLeftOf="@id/tv_login_deck"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_login_deck" />
|
app:layout_constraintTop_toBottomOf="@id/tv_login_deck" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_login_name"
|
android:id="@+id/et_login_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -51,13 +50,19 @@
|
|||||||
android:paddingBottom="20dp"
|
android:paddingBottom="20dp"
|
||||||
android:layout_marginRight="35dp"
|
android:layout_marginRight="35dp"
|
||||||
android:layout_marginLeft="35dp"
|
android:layout_marginLeft="35dp"
|
||||||
|
style="@style/register_hint_style"
|
||||||
android:textColorHint="@color/colorTransparent"
|
android:textColorHint="@color/colorTransparent"
|
||||||
android:textCursorDrawable="@drawable/text_color"
|
android:textCursorDrawable="@drawable/text_color"
|
||||||
android:theme="@style/MyEditText"
|
android:theme="@style/MyEditText"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@+id/login_name"
|
app:layout_constraintLeft_toLeftOf="@id/login_name"
|
||||||
app:layout_constraintTop_toBottomOf="@id/login_name" />
|
app:layout_constraintTop_toBottomOf="@id/login_name" />
|
||||||
|
<View
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/colorHui"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_login_name"
|
||||||
|
app:layout_constraintLeft_toLeftOf="@id/et_login_name"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/login_paw"
|
android:id="@+id/login_paw"
|
||||||
@ -68,23 +73,31 @@
|
|||||||
android:text="密码"
|
android:text="密码"
|
||||||
app:layout_constraintLeft_toLeftOf="@id/et_login_name"
|
app:layout_constraintLeft_toLeftOf="@id/et_login_name"
|
||||||
app:layout_constraintTop_toBottomOf="@id/et_login_name" />
|
app:layout_constraintTop_toBottomOf="@id/et_login_name" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/et_login_paw"
|
android:id="@+id/et_login_paw"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginRight="35dp"
|
|
||||||
android:layout_marginLeft="35dp"
|
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:hint=" 请输入密码"
|
android:hint=" 请输入密码"
|
||||||
android:paddingBottom="15dp"
|
android:paddingBottom="15dp"
|
||||||
|
android:layout_marginRight="35dp"
|
||||||
|
android:layout_marginLeft="35dp"
|
||||||
|
style="@style/register_hint_style"
|
||||||
android:textColorHint="@color/colorTransparent"
|
android:textColorHint="@color/colorTransparent"
|
||||||
android:textCursorDrawable="@drawable/text_color"
|
android:textCursorDrawable="@drawable/text_color"
|
||||||
android:theme="@style/MyEditText"
|
android:theme="@style/MyEditText"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
||||||
app:layout_constraintLeft_toLeftOf="@id/login_paw"
|
app:layout_constraintLeft_toLeftOf="@id/login_paw"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/login_paw" />
|
app:layout_constraintTop_toBottomOf="@id/login_paw" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/colorHui"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_login_paw"
|
||||||
|
app:layout_constraintLeft_toLeftOf="@id/et_login_paw"/>
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/iv_login_check"
|
android:id="@+id/iv_login_check"
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
<EditText
|
<TextView
|
||||||
android:id="@+id/et_road_name"
|
android:id="@+id/et_road_name"
|
||||||
android:layout_width="200dp"
|
android:layout_width="200dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -56,8 +56,8 @@
|
|||||||
android:id="@+id/image_share"
|
android:id="@+id/image_share"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginRight="15dp"
|
||||||
android:background="@drawable/shares"
|
android:background="@drawable/shares"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@ -77,10 +77,12 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
android:layout_marginLeft="35dp"
|
android:layout_marginLeft="35dp"
|
||||||
|
android:layout_marginTop="95dp"
|
||||||
android:layout_marginRight="35dp"
|
android:layout_marginRight="35dp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
|
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/constraintLayout">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -154,10 +156,11 @@
|
|||||||
android:text="我的等级" />
|
android:text="我的等级" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="60dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:drawableRight="@drawable/ic_baseline_arrow_forward"
|
android:layout_marginRight="0dp"
|
||||||
|
android:drawableRight="@drawable/ic_baseline_navigate"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="LV.1"
|
android:text="LV.1"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
@ -199,7 +202,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:background="@drawable/ic_baseline_arrow_forward"
|
android:background="@drawable/ic_baseline_navigate"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@ -228,7 +231,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:background="@drawable/ic_baseline_arrow_forward"
|
android:background="@drawable/ic_baseline_navigate"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@ -256,7 +259,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:background="@drawable/ic_baseline_arrow_forward"
|
android:background="@drawable/ic_baseline_navigate"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@ -284,7 +287,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:background="@drawable/ic_baseline_arrow_forward"
|
android:background="@drawable/ic_baseline_navigate"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@ -312,7 +315,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:background="@drawable/ic_baseline_arrow_forward"
|
android:background="@drawable/ic_baseline_navigate"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@ -339,7 +342,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:background="@drawable/ic_baseline_arrow_forward"
|
android:background="@drawable/ic_baseline_navigate"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|