完成了引导页显示。修改拍照中的问题,解决了8.25出现的bug

This commit is contained in:
wangdongsheng 2021-08-26 18:43:35 +08:00
parent 85d59c2b4e
commit 030cff5d1b
41 changed files with 710 additions and 485 deletions

View File

@ -21,6 +21,11 @@ android {
abortOnError false
}
// javaCompileOptions {
// annotationProcessorOptions {
// arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
// }
// }
buildTypes {
release {
minifyEnabled false

View File

@ -1,12 +1,24 @@
package com.navinfo.outdoor.activity;
import android.content.Intent;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.Toast;
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
import com.kongzue.dialog.util.BaseDialog;
import com.kongzue.dialog.v3.MessageDialog;
import com.lzy.okgo.model.HttpParams;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseActivity;
import com.navinfo.outdoor.bean.BaseBean;
import com.navinfo.outdoor.bean.UserBean;
import com.navinfo.outdoor.http.Callback;
import com.navinfo.outdoor.http.HttpInterface;
import com.navinfo.outdoor.http.OkGoBuilder;
/**
* 引导页
@ -29,27 +41,94 @@ public class GuidanceActivity extends BaseActivity {
@Override
protected void initData() {
super.initData();
View firstItem = LayoutInflater.from(this).inflate(R.layout.guidance_first_item, null);
View secondItem = LayoutInflater.from(this).inflate(R.layout.guidance_second_item, null);
View thirdItem = LayoutInflater.from(this).inflate(R.layout.guidance_third_item, null);
frameLayout.addView(firstItem);
firstItem.findViewById(R.id.btn_icon).setOnClickListener(new View.OnClickListener() {
View taskItem = LayoutInflater.from(this).inflate(R.layout.guidance_task_item, null);
View refreshItem = LayoutInflater.from(this).inflate(R.layout.guidance_refresh_item, null);
View screenItem = LayoutInflater.from(this).inflate(R.layout.guidance_screen_item, null);
View locationItem = LayoutInflater.from(this).inflate(R.layout.guidance_location_item, null);
View gatherItem = LayoutInflater.from(this).inflate(R.layout.guidance_gather_item, null);
View submitItem = LayoutInflater.from(this).inflate(R.layout.guidance_submit_item, null);
View submittedItem = LayoutInflater.from(this).inflate(R.layout.guidance_submitted_item, null);
View discoverItem = LayoutInflater.from(this).inflate(R.layout.guidance_discover_item, null);
View myHeadItem = LayoutInflater.from(this).inflate(R.layout.guidance_my_head_item, null);
View dataItem = LayoutInflater.from(this).inflate(R.layout.guidance_data_item, null);
View withdrawItem = LayoutInflater.from(this).inflate(R.layout.guidance_withdraw_item, null);
frameLayout.addView(taskItem);
taskItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frameLayout.removeView(firstItem);
frameLayout.addView(secondItem);
frameLayout.removeView(taskItem);
frameLayout.addView(refreshItem);
}
});
secondItem.findViewById(R.id.btn_icon).setOnClickListener(new View.OnClickListener() {
refreshItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frameLayout.removeView(secondItem);
frameLayout.addView(thirdItem);
frameLayout.removeView(refreshItem);
frameLayout.addView(screenItem);
}
});
thirdItem.findViewById(R.id.btn_icon).setOnClickListener(new View.OnClickListener() {
screenItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frameLayout.removeView(screenItem);
frameLayout.addView(locationItem);
}
});
locationItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frameLayout.removeView(locationItem);
frameLayout.addView(gatherItem);
}
});
gatherItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frameLayout.removeView(gatherItem);
frameLayout.addView(submitItem);
}
});
submitItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frameLayout.removeView(submitItem);
frameLayout.addView(submittedItem);
}
});
submittedItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frameLayout.removeView(submittedItem);
frameLayout.addView(discoverItem);
}
});
discoverItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frameLayout.removeView(discoverItem);
frameLayout.addView(myHeadItem);
}
});
myHeadItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frameLayout.removeView(myHeadItem);
frameLayout.addView(dataItem);
}
});
dataItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
frameLayout.removeView(dataItem);
frameLayout.addView(withdrawItem);
}
});
withdrawItem.findViewById(R.id.btn_to_learn).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
initGuide();
Toast.makeText(GuidanceActivity.this, "可以在发现版块的任务说明中,进行再次学习哦", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(GuidanceActivity.this, HomeActivity.class);
startActivity(intent);
finish();
@ -57,6 +136,36 @@ public class GuidanceActivity extends BaseActivity {
});
}
private void initGuide() {
showLoadingDialog();
/* HttpParams httpParams = new HttpParams();
long time = System.currentTimeMillis();
httpParams.put("datetime", time);*/
OkGoBuilder.getInstance()
.Builder(this)
.url(HttpInterface.INSERT_USER_GUIDE)
.cls(BaseBean.class)
.token(Constant.ACCESS_TOKEN)
.params(new HttpParams())
.postRequest(new Callback<BaseBean<Integer>>() {
@Override
public void onSuccess(BaseBean<Integer> response, int id) {
dismissLoadingDialog();
if (response.getCode() == 200) {
Toast.makeText(GuidanceActivity.this, "可以在发现版块的任务说明中,进行再次学习哦", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(GuidanceActivity.this, HomeActivity.class);
startActivity(intent);
finish();
}
}
@Override
public void onError(Throwable e, int id) {
dismissLoadingDialog();
}
});
}
@Override
protected void onDestroy() {
super.onDestroy();

View File

@ -13,8 +13,13 @@ import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import com.github.lazylibrary.util.MD5;
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
import com.kongzue.dialog.util.BaseDialog;
import com.kongzue.dialog.util.DialogSettings;
import com.kongzue.dialog.v3.MessageDialog;
import com.lzy.okgo.model.HttpParams;
import com.navinfo.outdoor.R;
import com.navinfo.outdoor.api.Constant;
@ -32,6 +37,8 @@ import com.navinfo.outdoor.util.Md5Util;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import java.util.Objects;
/**
* 登录页
*/
@ -172,7 +179,6 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
Constant.USERID=body.getUserId();
Constant.PASS_WORD=paw;
initGetUserInfo();//获取用户信息
Toast.makeText(LoginActivity.this, "登录成功", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(LoginActivity.this, response.getMessage(), Toast.LENGTH_SHORT).show();
dismissLoadingDialog();
@ -233,12 +239,28 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
Constant.AUDITMSG=userAuth.getAuditmsg();
}
navInfoEditor.commit();
int needGuide = body.getNeedGuide();//0不需要 1需要
if (needGuide==1){
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
MessageDialog.show((AppCompatActivity) LoginActivity.this, "提示", "请查看APP使用说明", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
Intent intent = new Intent(LoginActivity.this, GuidanceActivity.class);
startActivity(intent);
finish();
return false;
}
});
}else {
Toast.makeText(LoginActivity.this, "登录成功", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(LoginActivity.this, HomeActivity.class);
startActivity(intent);
finish();
}
}
Intent intent = new Intent(LoginActivity.this, GuidanceActivity.class);
startActivity(intent);
finish();
}else {
Toast.makeText(LoginActivity.this, response.getMessage(), Toast.LENGTH_SHORT).show();
Toast.makeText(LoginActivity.this, response.getMessage()+"", Toast.LENGTH_SHORT).show();
}
}

View File

@ -44,6 +44,7 @@ import com.otaliastudios.cameraview.PictureResult;
import com.otaliastudios.cameraview.VideoResult;
import com.otaliastudios.cameraview.controls.Mode;
import com.tencent.map.geolocation.TencentLocation;
import com.tencent.tencentmap.mapsdk.maps.CameraUpdate;
import com.tencent.tencentmap.mapsdk.maps.CameraUpdateFactory;
import com.tencent.tencentmap.mapsdk.maps.TencentMap;
@ -106,7 +107,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
private boolean isFinishActivity = false; // 是否需要关闭当前activity
private TextView videoChronometer;
private long recordingTime = 0;// 记录下来的总时间
private int oratation = -1; // 是否强制横屏拍摄默认不强制,0-强制横屏 其他-任意
private int oration = -1; // 是否强制横屏拍摄默认不强制,0-强制横屏 其他-任意
private List<Removable> removables;
private ImageView ivPic;
private PoiEntity poiEntity;
@ -117,10 +118,10 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
private CheckBox cbMapType;
private boolean isMapSlide = false;
private Handler handler=new Handler(new Handler.Callback() {
private Handler handler = new Handler(new Handler.Callback() {
@Override
public boolean handleMessage(@NonNull Message msg) {
if (btnSwitch!=null){
if (btnSwitch != null) {
btnSwitch.setEnabled(true);
}
return false;
@ -143,13 +144,13 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
if (getIntent() != null) {
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_VIDEO_PATH);
poiEntity = (PoiEntity) getIntent().getSerializableExtra("poiEntity");
oratation = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1);
oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1);
}
videoChronometer = findViewById(R.id.video_chronometer);
// if (finalVideoPath == null) {
// finalVideoPath = Constant.PICTURE_FOLDER+"/final.mp4";
// }
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
ivZoomAdd = findViewById(R.id.iv_zoom_add);
ivZoomAdd.setOnClickListener(this);
ivZoomDel = findViewById(R.id.iv_zoom_del);
@ -158,18 +159,13 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
cbMapType.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
} else {
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
}
}
});
ivLocation = findViewById(R.id.iv_location);
ivLocation.setOnClickListener(this);
layerChange = findViewById(R.id.layer_change);
timer = new Timer();
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
ivMap = (TextureMapView) findViewById(R.id.iv_map);
btnSwitch = (Button) findViewById(R.id.btn_switch);
btnSwitch.setOnClickListener(this);
@ -185,7 +181,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) { // 开始采集设置按钮文字内容为结束采集
if (oratation == 0) { // oblation为0时拍摄视频必须为横屏
if (oration == 0) { // oblation为0时拍摄视频必须为横屏
// 如果当前手机是竖向则不允许拍摄
if (Objects.requireNonNull(camera.getVideoSize()).getWidth() < camera.getVideoSize().getHeight()) {
Toast.makeText(PictureActivity.this, "不允许竖向拍摄...", Toast.LENGTH_SHORT).show();
@ -206,27 +202,27 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
stopVideo = findViewById(R.id.btn_stop_video);
stopVideo.setOnClickListener(this);
/**
/*
* camera.setVideoBitRate(2000000);
* 设置帧率
* 在清单文件核心代码
* app:cameraVideoSizeMaxWidth="2000"
* app:cameraVideoSizeMaxArea="2000000"
* app:cameraVideoSizeMaxWidth="2000"
* app:cameraVideoSizeMaxArea="2000000"
*/
camera.setVideoBitRate(2100000);
//获取地图
tencentMap = ivMap.getMap();
//tenementMap.setOnMapLoadedCallback();
//获取地图UI 设置对象
UiSettings uiSettings = tencentMap.getUiSettings();
//设置logo的大小
uiSettings.setLogoScale(0.7f);
uiSettings.setRotateGesturesEnabled(false);//禁止地图旋转手势.
uiSettings.setTiltGesturesEnabled(false);//禁止倾斜手势.
// uiSettings.setAllGesturesEnabled(false);
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);// 设置当前位置显示样式
initLine();
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
initLine();
// camera.addFrameProcessor(new FrameProcessor() {
// @Override
// public void process(@NonNull Frame frame) {
@ -504,7 +500,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
Toast.makeText(this, "本段视频没有计时!", Toast.LENGTH_SHORT).show();
}
if (camera.isTakingVideo()) {
// showLoadingDialog();
// showLoadingDialog();
isFinishActivity = true;
camera.stopVideo();
} else {
@ -585,7 +581,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
System.out.println("width-display :" + dm.widthPixels);
System.out.println("heigth-display :" + dm.heightPixels);
System.out.println("height-display :" + dm.heightPixels);
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) ivMap.getLayoutParams();//地图的宽高
int heightMap = ivMap.getMeasuredHeight();
int widthMap = ivMap.getMeasuredWidth();
@ -626,6 +622,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
ivZoomDel.setVisibility(View.GONE);
cbMapType.setVisibility(View.GONE);
ivLocation.setVisibility(View.GONE);
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
cbMapType.setChecked(false);
}
@ -636,8 +633,10 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
ivZoomDel.setVisibility(View.VISIBLE);
cbMapType.setVisibility(View.VISIBLE);
ivLocation.setVisibility(View.VISIBLE);
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
}
@Override
protected void onResume() {
super.onResume();
@ -651,6 +650,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
captureVideo.setChecked(false);
captureVideo.setText("继续采集");
}
@Override
protected void onPause() {
super.onPause();
@ -664,7 +664,7 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
protected void onDestroy() {
super.onDestroy();
stopTakenVideo();
if (polyline!=null){
if (polyline != null) {
polyline.remove();
}
camera.destroy();
@ -681,13 +681,14 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventMessageMainThread(Message msg) {
if (msg.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
if (tencentMap != null&& !isMapSlide) {
if (tencentMap != null && !isMapSlide) {
TencentLocation tencentLocation = (TencentLocation) msg.obj;
CameraUpdate cameraSigma =
CameraUpdateFactory.newCameraPosition(new CameraPosition(
new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()), //中心点坐标地图目标经纬度
16, //目标缩放级别
0, //目标倾斜角
0)); //目标旋转角 0~360° (正北方为0)
tencentLocation.getBearing())); //目标旋转角 0~360° (正北方为0)
tencentMap.animateCamera(cameraSigma);
}
}

View File

@ -113,7 +113,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
private ImageView ivLocation;
private CheckBox cbMapType;
@Override
protected int getLayout() {
EventBus.getDefault().register(this);
@ -149,13 +148,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
cbMapType.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
} else {
setLocMarkerStyle(LOCATION_TYPE_MAP_ROTATE_NO_CENTER);
}
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
}
});
ivLocation = findViewById(R.id.iv_location);
@ -190,11 +183,13 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
stopPicture.setOnClickListener(this);
//获取地图
tencentMap = ivMap.getMap();
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
//获取地图UI 设置对象
UiSettings uiSettings = tencentMap.getUiSettings();
//设置logo的大小
uiSettings.setLogoScale(0.7f);
uiSettings.setRotateGesturesEnabled(false);//禁止地图旋转手势.
uiSettings.setTiltGesturesEnabled(false);//禁止倾斜手势.
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
initLine();
//相机预览监听
camera.addCameraListener(new CameraListener() {
@ -439,7 +434,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
ivZoomDel.setVisibility(View.VISIBLE);
cbMapType.setVisibility(View.VISIBLE);
ivLocation.setVisibility(View.VISIBLE);
setLocMarkerStyle(LOCATION_TYPE_MAP_ROTATE_NO_CENTER);
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
}
@ -501,7 +496,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
new LatLng(tencentLocation.getLatitude(), tencentLocation.getLongitude()), //中心点坐标地图目标经纬度
tencentMap.getCameraPosition().zoom, //目标缩放级别
0, //目标倾斜角
0)); //目标旋转角 0~360° (正北方为0)
tencentLocation.getBearing())); //目标旋转角 0~360° (正北方为0)
tencentMap.animateCamera(cameraSigma);
}

View File

@ -80,6 +80,15 @@ public class UserDetailBean {
private UserBankcardBean userBankcard;
private UserAuthBean userAuth;
private List<RoleBean> role;
private int needGuide;
public int getNeedGuide() {
return needGuide;
}
public void setNeedGuide(int needGuide) {
this.needGuide = needGuide;
}
public int getPid() {
return pid;

View File

@ -35,21 +35,16 @@ import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* 筛选的Fragment
*/
public class FilterFragment extends BaseDrawerFragment implements View.OnClickListener {
private Button btnFilter;
private XRecyclerView recyclerFilter;
private TextView tvType, tvExclusive, tvPhotograph, tvNumber;
private ConstraintLayout clPhotograph, clExclusive, clType, clNumber;
private PoiDatabase poiDatabase;
private PoiDao poiDao;
private FilterAdapter filterAdapter;
private ArrayList<PoiEntity> poiEntities;
private List<PoiEntity> allPoi;
public static FilterFragment newInstance(Bundle bundle) {
@ -78,7 +73,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
Bundle arguments = getArguments();
if (arguments != null) {
isSliding = arguments.getBoolean("isSliding", true);
Log.d("TAG", "onCreatessss: " + isSliding);
Log.d("TAG", "onCaress's: " + isSliding);
}
if (isSliding) {
// 监听到返回按钮点击事件
@ -152,10 +147,10 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
@Subscribe
public void onEvent(@NotNull Message data) {
if (data.what == Constant.JOB_SEARCH_POI_WORD) {
allPoi = (List<PoiEntity>) data.obj;
List<PoiEntity> allPoi = (List<PoiEntity>) data.obj;
if (allPoi != null) {
for (int i = 0; i < allPoi.size(); i++) {
if (allPoi.get(i).getTaskStatus()==0||allPoi.get(i).getTaskStatus()==1){
if (allPoi.get(i).getTaskStatus()==0|| allPoi.get(i).getTaskStatus()==1){
poiEntities.add(allPoi.get(i));
}
}
@ -183,10 +178,12 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
poiEntity.setY(latLng.latitude + "");
} else if (geometry.getGeometryType().equals("LineString")) {//线
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
assert latLineString != null;
poiEntity.setX(latLineString.get(0).longitude + "");
poiEntity.setY(latLineString.get(0).latitude + "");
} else if (geometry.getGeometryType().equals("Polygon")) {//
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
assert latPolygon != null;
poiEntity.setX(latPolygon.get(0).longitude + "");
poiEntity.setY(latPolygon.get(0).latitude + "");
}
@ -202,14 +199,14 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
@Override
protected void initData() {
super.initData();
poiDatabase = PoiDatabase.getInstance(getContext());
poiDao = poiDatabase.getPoiDao();
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
PoiDao poiDao = poiDatabase.getPoiDao();
poiEntities = new ArrayList<>();
clNumber = findViewById(R.id.cl_number);
ConstraintLayout clNumber = findViewById(R.id.cl_number);
clNumber.setOnClickListener(this);
tvNumber = findViewById(R.id.tv_number);
tvNumber.setText(Constant.NUMBER + "");
clPhotograph = findViewById(R.id.cl_photograph);
ConstraintLayout clPhotograph = findViewById(R.id.cl_photograph);
clPhotograph.setOnClickListener(this);
tvPhotograph = findViewById(R.id.tv_photograph);
if (Constant.LIMIT_TYPE == -1) {//"全部", "普通任务", "专属任务"
@ -219,7 +216,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
} else if (Constant.LIMIT_TYPE == 1) {
tvPhotograph.setText("专属任务");
}
clExclusive = findViewById(R.id.cl_exclusive);
ConstraintLayout clExclusive = findViewById(R.id.cl_exclusive);
clExclusive.setOnClickListener(this);
tvExclusive = findViewById(R.id.tv_exclusive);
if (Constant.TASK_TYPE == -1) {//"全部", "poi", "充电站", "POI录像", "道路录像", "其他", "面状任务"
@ -237,7 +234,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
} else if (Constant.TASK_TYPE == 6) {
tvExclusive.setText("面状任务");
}
clType = findViewById(R.id.cl_type);
ConstraintLayout clType = findViewById(R.id.cl_type);
clType.setOnClickListener(this);
tvType = findViewById(R.id.tv_type);
if (Constant.TASK_STARTUP == -1) {//"未领取", "已领取", "未保存", "已保存"
@ -252,7 +249,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
tvType.setText("已保存");
}*/
btnFilter = findViewById(R.id.btn_filter);
Button btnFilter = findViewById(R.id.btn_filter);
btnFilter.setOnClickListener(this);
setSlidingUpPanelLayout(Constant.SLIDING_LAYOUT);
recyclerFilter = findViewById(R.id.recycler_filter);
@ -261,7 +258,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
}
//设置下划线
recyclerFilter.setLayoutManager(new LinearLayoutManager(getActivity()));
recyclerFilter.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL));
recyclerFilter.addItemDecoration(new DividerItemDecoration(Objects.requireNonNull(getContext()), DividerItemDecoration.VERTICAL));
recyclerFilter.setRefreshProgressStyle(ProgressStyle.SemiCircleSpin);
recyclerFilter.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);
@ -323,7 +320,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
onBackPressed();
break;
case R.id.cl_number:
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"200", "500", "1000"}, new OnMenuItemClickListener() {
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"200", "500", "1000"}, new OnMenuItemClickListener() {
@Override
public void onClick(String text, int index) {
tvNumber.setText(text);
@ -347,7 +344,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
break;
case R.id.cl_photograph:
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部", "普通任务", "专属任务"}, new OnMenuItemClickListener() {
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "普通任务", "专属任务"}, new OnMenuItemClickListener() {
@Override
public void onClick(String text, int index) {
tvPhotograph.setText(text);
@ -380,7 +377,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
6 "面状任务"
*/
case R.id.cl_exclusive:
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部", "POI", "充电站", "POI录像", "道路录像", "其他", "面状任务"}, new OnMenuItemClickListener() {
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "POI", "充电站", "POI录像", "道路录像", "其他", "面状任务"}, new OnMenuItemClickListener() {
@Override
public void onClick(String text, int index) {
tvExclusive.setText(text);
@ -417,7 +414,7 @@ public class FilterFragment extends BaseDrawerFragment implements View.OnClickLi
break;
case R.id.cl_type://任务状态 0.未领取 1.已领取2.未保存(保存到本地但未提交成功),3.已保存(保存到本地提交成功)4已上传结束采集,
BottomMenu.show((AppCompatActivity) getContext(), new String[]{"全部", "未领取", "已领取"/*, "未保存", "已保存"*/}, new OnMenuItemClickListener() {
BottomMenu.show((AppCompatActivity) Objects.requireNonNull(getContext()), new String[]{"全部", "未领取", "已领取"/*, "未保存", "已保存"*/}, new OnMenuItemClickListener() {
@Override
public void onClick(String text, int index) {
tvType.setText(text);

View File

@ -42,6 +42,7 @@ import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* 领取采集的fragment
@ -68,7 +69,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
//主界面获取焦点
private void getFocus() {
getView().setFocusableInTouchMode(true);
Objects.requireNonNull(getView()).setFocusableInTouchMode(true);
getView().requestFocus();
getView().setOnKeyListener(new View.OnKeyListener() {
@Override
@ -254,7 +255,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
@Override
public void run() {
PoiEntity taskIdPoiEntity = poiDao.getTaskIdPoiEntity(poiEntity.getTaskId());
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
initCompleteTask(HttpInterface.SUBMIT_POLYGON_TASK, poiEntity.getTaskId(), true, taskIdPoiEntity);
@ -287,7 +288,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
@Override
public void run() {
poiDao.deletePoiEntity(poiEntity);
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
poiEntity.setTaskStatus(0);
@ -387,16 +388,16 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
obtain.what = Constant.GATHER_GET_MAP;
obtain.obj = chargingStationEntity;
EventBus.getDefault().post(obtain);
}/*else {
}else {
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
}*/
}
}
});
} else {
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
initViewByTaskStatus(1);
@ -458,7 +459,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
if (listBean != null) {
polygonEntity.setTaskId(listBean.getId());
polygonEntity.setName(listBean.getName());
polygonEntity.setType(Integer.valueOf(listBean.getType()));
polygonEntity.setType(listBean.getType());
String encodeStr = listBean.getGeo();
String geo = Geohash.getInstance().decode(encodeStr);
polygonEntity.setGeoWkt(geo);
@ -491,6 +492,11 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
Toast.makeText(getActivity(), "领取成功", Toast.LENGTH_SHORT).show();
if (aBoolean) {
initCompleteTask(HttpInterface.SUBMIT_POLYGON_TASK, GatherGetFragment.this.poiEntity.getTaskId(), true, polygonEntity);
}else {
Message obtains = Message.obtain();
obtains.what = Constant.JOB_WORD_MONITOR;
obtains.obj = true;
EventBus.getDefault().post(obtains);
}
}
});
@ -541,7 +547,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
if(poiEntity.getType()==2){
chargingPileDao.deleteChargingFidPileEntity(poiEntity.getId());
}
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
Log.d("TAG", "run: " + response.getMessage());
@ -597,7 +603,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
@Override
public void run() {
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiEntity);
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
Message obtain = Message.obtain();
@ -724,7 +730,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
if (statusId==1||statusId==5){
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiListEntity);
}
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
initViewByTaskStatus(1);//已领取
@ -733,17 +739,17 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
obtain.what = Constant.GATHER_GET_MAP;
obtain.obj = poiListEntity;
EventBus.getDefault().post(obtain);
}/*else {
}else {
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
}*/
}
}
});
} else {
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
initViewByTaskStatus(1);
@ -822,7 +828,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
poiListEntity.setDescribe(listBean.getMemo());
poiListEntity.setCreateTime(listBean.getEndDate());
poiListEntity.setAddress(listBean.getAddress());
poiListEntity.setType(Integer.valueOf(listBean.getType()));
poiListEntity.setType(listBean.getType());
poiListEntity.setPrecision(String.valueOf(listBean.getPrice()));
poiListEntity.setIsExclusive(listBean.getIsExclusive());
poiListEntity.setTaskStatus(statusId);
@ -847,7 +853,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
if (statusId==1||statusId==5){
InsertAndUpdateUtils.getInstance().insertOrUpdate(getContext(), poiListEntity);
}
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
initViewByTaskStatus(1);
@ -856,16 +862,16 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
obtain.what = Constant.GATHER_GET_MAP;
obtain.obj = poiListEntity;
EventBus.getDefault().post(obtain);
}/*else {
}else {
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
}*/
}
}
});
} else {
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
initViewByTaskStatus(1);

View File

@ -237,27 +237,27 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
}
;
}
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
String taskIds = "";
String auditIds = "";
StringBuilder taskIds = new StringBuilder();
StringBuilder auditIds = new StringBuilder();
for (int i = 0; i < poiEntities.size(); i++) {
if (poiEntities.get(i).getTaskStatus() == 2) {
taskIds += poiEntities.get(i).getTaskId()+",";
taskIds.append(poiEntities.get(i).getTaskId()).append(",");
} else if (poiEntities.get(i).getTaskStatus() == 3) {
auditIds += poiEntities.get(i).getBodyId()+",";
auditIds.append(poiEntities.get(i).getBodyId()).append(",");
}
}
if (!taskIds.equals("")){
taskIds = taskIds.substring(0,taskIds.length() - 1);
if (!taskIds.toString().equals("")){
taskIds = new StringBuilder(taskIds.substring(0, taskIds.length() - 1));
}
if (!auditIds.equals("")){
auditIds = auditIds.substring(0,auditIds.length() - 1);
if (!auditIds.toString().equals("")){
auditIds = new StringBuilder(auditIds.substring(0, auditIds.length() - 1));
}
HttpParams httpParams = new HttpParams();
httpParams.put("taskIds", taskIds);
httpParams.put("auditIds", auditIds);
httpParams.put("taskIds", taskIds.toString());
httpParams.put("auditIds", auditIds.toString());
OkGoBuilder.getInstance()
.Builder(getActivity())
.url(HttpInterface.UNRECEIVED_POLYGON_TASK)
@ -305,7 +305,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
@Override
public void run() {
List<PoiEntity> roadAll = roadDao.getAllPoiByRecoded();
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
roadEntities.clear();

View File

@ -90,6 +90,7 @@ import org.greenrobot.eventbus.Subscribe;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
/**
* 寻宝的Fragment
@ -107,8 +108,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
private ImageView ivRaffish;
private SlidingUpPanelLayout sliding_layout;
// private FragmentTransaction fragmentTransaction;
private Marker markerPoi;
private ImageView ivFilter;
private Point screenPosition; //marker的屏幕坐标
private FrameLayout frameLayout;
@ -119,7 +118,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
private List<Removable> removables;
private List<Removable> removableScreenMarker;
private List<Removable> removablesLocality;
private int treasurePage = 1;
private Handler handler = new Handler(new Handler.Callback() {
@Override
public boolean handleMessage(@NonNull Message msg) {
@ -169,14 +167,9 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
@Override
protected void initView() {
super.initView();
/* bitmapDescriptor1 = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
bitmapDescriptor2 = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
bitmapDescriptor3 = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
bitmapDescriptor4 = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);
bitmapDescriptor5 = BitmapDescriptorFactory.fromResource(R.mipmap.datouzhen);*/
EventBus.getDefault().register(this);
//fragment 管理器
supportFragmentManager = getActivity().getSupportFragmentManager();
supportFragmentManager = Objects.requireNonNull(getActivity()).getSupportFragmentManager();
PoiDatabase poiDatabase = PoiDatabase.getInstance(getContext());
poiDao = poiDatabase.getPoiDao();
sliding_layout = findViewById(R.id.sliding_layout);
@ -209,6 +202,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} else {
tencentMap.setMapType(TencentMap.MAP_TYPE_NORMAL);
}
}
});
//地图放大
@ -362,7 +356,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
@Override
public void onError(Throwable e, int id) {
Log.d("TAG", "onSuccess: sss********sssssssssssss 成功" + e.getMessage() + "");
Log.d("TAG", "onSuccess:" + e.getMessage() + "");
}
});
} catch (Exception e) {
@ -394,6 +388,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
httpParams.put("userGeo", userEncode);
httpParams.put("centerGeo", centerEncode);
httpParams.put("pageSize", Constant.NUMBER);
int treasurePage = 1;
httpParams.put("pageNum", treasurePage);
httpParams.put("type", task_type);
httpParams.put("isExclusive", limit_type);
@ -417,7 +412,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} else {
ivSubmit.setEnabled(false);
}
Log.d("TAG", "onSuccess: " + response.getBody().toString() + "sssssssssssss");
Log.d("TAG", "onSuccess: " + response.getBody().toString() + "sassafras's");
for (int i = 0; i < removables.size(); i++) {
removables.get(i).remove();
}
@ -432,66 +427,70 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
Log.d("TAG", "onSuccess: " + geo);
Geometry geometry = GeometryTools.createGeometry(geo);
LatLng latLng = null;
if (geometry.getGeometryType().equals("Point")) {//
latLng = GeometryTools.createLatLng(geo);
} else if (geometry.getGeometryType().equals("LineString")) {//线
BitmapDescriptor bitmapLine = null;
if (listBean.getType() == 3) {//poi录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
} else if (listBean.getType() == 4) {//道路录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
}
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
// 构造 PolylineOptions
PolylineOptions polylineOptions = new PolylineOptions()
.addAll(latLineString)
// 折线设置圆形线头
.lineCap(true)
// 折线的颜色为绿色
.color(0xff00ff00)
// 折线宽度为5像素
.width(10)
.arrow(true)
.arrowSpacing(100)
.arrowTexture(bitmapLine);
// 还可以添加描边颜色
//.borderColor(0xffff0000)
// 描边颜色的宽度线宽还是 25 像素不过填充的部分宽度为 `width` - 2 * `borderWidth`
//.borderWidth(1);
// 绘制折线
Polyline polyline = tencentMap.addPolyline(polylineOptions);
polyline.setZIndex(MARKER_LINE);
removables.add(polyline);
if (latLineString != null && latLineString.size() > 0) {
latLng = latLineString.get(0);
}
} else if (geometry.getGeometryType().equals("Polygon")) {//
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
//连接封闭图形的点
addAll(latPolygon).
//填充颜色为红色
fillColor(Color.parseColor("#97E0E7EC")).
//边线颜色为黑色
strokeColor(0xff000000).
//边线宽度15像素
strokeWidth(5));
polygon.setZIndex(MARKER_FACE);
removables.add(polygon);
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
double x = centroid.getX();
double y = centroid.getY();
latLng = new LatLng();
latLng.setLatitude(y);
latLng.setLongitude(x);
switch (geometry.getGeometryType()) {
case "Point": //
latLng = GeometryTools.createLatLng(geo);
break;
case "LineString": //线
BitmapDescriptor bitmapLine = null;
if (listBean.getType() == 3) {//poi录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
} else if (listBean.getType() == 4) {//道路录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
}
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
// 构造 PolylineOptions
PolylineOptions polylineOptions = new PolylineOptions()
.addAll(latLineString)
// 折线设置圆形线头
.lineCap(true)
// 折线的颜色为绿色
.color(Color.parseColor("#0096FF"))
// 折线宽度为5像素
.width(10)
.arrow(true)
.arrowSpacing(100)
.arrowTexture(bitmapLine);
// 还可以添加描边颜色
//.borderColor(0xffff0000)
// 描边颜色的宽度线宽还是 25 像素不过填充的部分宽度为 `width` - 2 * `borderWidth`
//.borderWidth(1);
// 绘制折线
Polyline polyline = tencentMap.addPolyline(polylineOptions);
polyline.setZIndex(MARKER_LINE);
removables.add(polyline);
if (latLineString != null && latLineString.size() > 0) {
latLng = latLineString.get(0);
}
break;
case "Polygon": //
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
//连接封闭图形的点
addAll(latPolygon).
//填充颜色为红色
fillColor(Color.parseColor("#97E0E7EC")).
//边线颜色为黑色
strokeColor(0xff000000).
//边线宽度15像素
strokeWidth(5));
polygon.setZIndex(MARKER_FACE);
removables.add(polygon);
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
double x = centroid.getX();
double y = centroid.getY();
latLng = new LatLng();
latLng.setLatitude(y);
latLng.setLongitude(x);
/* if (latPolygon != null && latPolygon.size() > 0) {
latLng = latPolygon.get(0);
}*/
break;
}
switch (list.get(i).getType()) {
case 1://poi
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg1);
//poiDescriptor.getFormater().setScale(50);
//poiDescriptor.getForager().setScale(50);
assert latLng != null;
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor).alpha(0.9f)
.anchor(0.5f, 1.0f)
@ -599,64 +598,66 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
removableScreenMarker.clear();
LatLng latLng = null;
if (geometry.getGeometryType().equals("Point")) {//
latLng = GeometryTools.createLatLng(geo);
} else if (geometry.getGeometryType().equals("LineString")) {//线
BitmapDescriptor bitmapLine = null;
if (poiEntity.getType() == 3) {//poi录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
} else if (poiEntity.getType() == 4) {//道路录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
}
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
// 构造 PolylineOpitons
PolylineOptions polylineOptions = new PolylineOptions()
.addAll(latLineString)
// 折线设置圆形线头
.lineCap(true)
// 折线的颜色为绿色
.color(0xff00ff00)
// 折线宽度为5像素
.width(20)
.arrow(true)
.arrowSpacing(150)
.arrowTexture(bitmapLine);
switch (geometry.getGeometryType()) {
case "Point": //
latLng = GeometryTools.createLatLng(geo);
break;
case "LineString": //线
BitmapDescriptor bitmapLine = null;
if (poiEntity.getType() == 3) {//poi录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
} else if (poiEntity.getType() == 4) {//道路录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
}
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
// 构造 PolylineOnions
PolylineOptions polylineOptions = new PolylineOptions()
.addAll(latLineString)
// 折线设置圆形线头
.lineCap(true)
// 折线的颜色为绿色
.color(Color.parseColor("#D8D8D8"))
// 折线宽度为5像素
.width(20)
.arrow(true)
.arrowSpacing(150)
.arrowTexture(bitmapLine);
/* // 还可以添加描边颜色
.borderColor(0xffff0000)
// 描边颜色的宽度线宽还是 25 像素不过填充的部分宽度为 `width` - 2 * `borderWidth`
.borderWidth(1);*/
// 绘制折线
Polyline polyline = tencentMap.addPolyline(polylineOptions);
polyline.setZIndex(MARKER_LINE);
removableScreenMarker.add(polyline);
if (latLineString != null && latLineString.size() > 0) {
latLng = latLineString.get(0);
}
} else if (geometry.getGeometryType().equals("Polygon")) {//
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
//连接封闭图形的点
addAll(latPolygon).
//填充颜色为浅蓝色
fillColor(Color.parseColor("#97E0E7EC")).
//边线颜色为黑色
strokeColor(0xff000000).
//边线宽度15像素
strokeWidth(25));
// 绘制折线
Polyline polyline = tencentMap.addPolyline(polylineOptions);
polyline.setZIndex(MARKER_LINE);
removableScreenMarker.add(polyline);
if (latLineString != null && latLineString.size() > 0) {
latLng = latLineString.get(0);
}
break;
case "Polygon": //
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
//连接封闭图形的点
addAll(latPolygon).
//填充颜色为浅蓝色
fillColor(Color.parseColor("#97E0E7EC")).
//边线颜色为黑色
strokeColor(0xff000000).
//边线宽度15像素
strokeWidth(25));
polygon.setZIndex(MARKER_FACE);
removableScreenMarker.add(polygon);
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
double x = centroid.getX();
double y = centroid.getY();
if (centroid != null) {
polygon.setZIndex(MARKER_FACE);
removableScreenMarker.add(polygon);
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
double x = centroid.getX();
double y = centroid.getY();
latLng = new LatLng();
latLng.setLatitude(y);
latLng.setLongitude(x);
}
/* if (latPolygon != null && latPolygon.size() > 0) {
/* if (latPolygon != null && latPolygon.size() > 0) {
latLng = latPolygon.get(0);
}*/
break;
}
BitmapDescriptor descriptor = null;
if (poiEntity.getType() == 1) {
@ -715,7 +716,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
if (allPoiStatus!=null){
poiDao.deleteAll(allPoiStatus);
}
getActivity().runOnUiThread(new Runnable() {
Objects.requireNonNull(getActivity()).runOnUiThread(new Runnable() {
@Override
public void run() {
for (int i = 0; i < removablesLocality.size(); i++) {
@ -729,61 +730,65 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
Log.d("TAG", "onSuccess: " + geo);
Geometry geometry = GeometryTools.createGeometry(geo);
if (geometry != null) {
if (geometry.getGeometryType().equals("Point")) {//
latLng = GeometryTools.createLatLng(geo);
} else if (geometry.getGeometryType().equals("LineString")) {//线
BitmapDescriptor bitmapLine = null;
if (type == 3) {//poi录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
} else if (type == 4) {//道路录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
}
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
// 构造 PolylineOpitons
PolylineOptions polylineOptions = new PolylineOptions()
.alpha(0.5f)
.addAll(latLineString)
// 折线设置圆形线头
.lineCap(true)
.color(Color.parseColor("#AFDBD8"))
// 折线宽度为5像素
.width(10)
.arrow(true)
.arrowSpacing(100)
.arrowTexture(bitmapLine);
switch (geometry.getGeometryType()) {
case "Point": //
latLng = GeometryTools.createLatLng(geo);
break;
case "LineString": //线
BitmapDescriptor bitmapLine = null;
if (type == 3) {//poi录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
} else if (type == 4) {//道路录像
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.road_arrows);
}
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
// 构造 PolylineOnions
PolylineOptions polylineOptions = new PolylineOptions()
.alpha(0.5f)
.addAll(latLineString)
// 折线设置圆形线头
.lineCap(true)
.color(Color.parseColor("#FFC107"))
// 折线宽度为5像素
.width(10)
.arrow(true)
.arrowSpacing(100)
.arrowTexture(bitmapLine);
/* // 还可以添加描边颜色
.borderColor(0xffff0000)
// 描边颜色的宽度线宽还是 25 像素不过填充的部分宽度为 `width` - 2 * `borderWidth`
.borderWidth(1);*/
// 绘制折线
Polyline polyline = tencentMap.addPolyline(polylineOptions);
polyline.setZIndex(MARKER_LINE);
removablesLocality.add(polyline);
if (latLineString != null && latLineString.size() > 0) {
latLng = latLineString.get(0);
}
} else if (geometry.getGeometryType().equals("Polygon")) {//
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
//连接封闭图形的点
addAll(latPolygon).
//填充颜色为浅蓝色
fillColor(Color.parseColor("#97E0E7EC")).
//边线颜色为黑色
strokeColor(0xff00ff00).
//边线宽度15像素
strokeWidth(5));
polygon.setZIndex(MARKER_FACE);
removablesLocality.add(polygon);
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
double x = centroid.getX();
double y = centroid.getY();
latLng = new LatLng();
latLng.setLatitude(y);
latLng.setLongitude(x);
// 绘制折线
Polyline polyline = tencentMap.addPolyline(polylineOptions);
polyline.setZIndex(MARKER_LINE);
removablesLocality.add(polyline);
if (latLineString != null && latLineString.size() > 0) {
latLng = latLineString.get(0);
}
break;
case "Polygon": //
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
Polygon polygon = tencentMap.addPolygon(new PolygonOptions().
//连接封闭图形的点
addAll(latPolygon).
//填充颜色为浅蓝色
fillColor(Color.parseColor("#97E0E7EC")).
//边线颜色为黑色
strokeColor(0xff00ff00).
//边线宽度15像素
strokeWidth(5));
polygon.setZIndex(MARKER_FACE);
removablesLocality.add(polygon);
com.vividsolutions.jts.geom.Point centroid = geometry.getCentroid();
double x = centroid.getX();
double y = centroid.getY();
latLng = new LatLng();
latLng.setLatitude(y);
latLng.setLongitude(x);
/*if (latPolygon != null && latPolygon.size() > 0) {
latLng = latPolygon.get(0);
}*/
break;
}
} else {
if (allTaskStatus.get(i).getX() != null && allTaskStatus.get(i).getY() != null) {
@ -798,6 +803,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} else {
poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.graypoi);
}
assert latLng != null;
Marker poiMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiDescriptor)
.flat(true)
.anchor(0.5f, 1f)
@ -834,6 +840,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} else {
poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_have_bg1);
}
assert latLng != null;
Marker poiVideoMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(poiVideoDescriptor)
.anchor(0.5f, 1f)
.flat(true)
@ -851,6 +858,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} else {
roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.grayroad);
}
assert latLng != null;
Marker roadMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(roadDescriptor)
.anchor(0.5f, 1f)
.flat(true)
@ -868,6 +876,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} else {
otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.grayother);
}
assert latLng != null;
Marker otherMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(otherDescriptor)
.anchor(0.5f, 1f)
.flat(true)
@ -885,6 +894,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
} else {
Descriptor = BitmapDescriptorFactory.fromResource(R.drawable.grayfacet);
}
assert latLng != null;
Marker planarMarker = tencentMap.addMarker(new MarkerOptions(latLng).icon(Descriptor)
.anchor(0.5f, 1f)
.clockwise(false)
@ -909,7 +919,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
private void initSharePre() {
//根据保存时所用的name属性获取SharedPreferences对象
SharedPreferences dataFile = getActivity().getSharedPreferences(Constant.DATA_FILE, 0);
SharedPreferences dataFile = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.DATA_FILE, 0);
//根据数据类型调用对应的get方法通过键取得对应的值
String dataFileString = dataFile.getString("poiEntity", null);
if (dataFileString != null) {
@ -917,7 +927,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
switch (poiEntity.getType()) {
case 1:
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
MessageDialog.show((AppCompatActivity) getContext(), "提示", "你poi页面还有未提交完的数据之前的成果已保存点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi页面还有未提交完的数据之前的成果已保存点击确定可继续作业", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
Bundle bundle = new Bundle();
@ -933,7 +943,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
break;
case 2:
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
MessageDialog.show((AppCompatActivity) getContext(), "提示", "你充电站页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你充电站页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
Bundle bundle = new Bundle();
@ -949,7 +959,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
break;
case 3:
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
MessageDialog.show((AppCompatActivity) getContext(), "提示", "你poi录像页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你poi录像页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
Bundle bundle = new Bundle();
@ -965,7 +975,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
break;
case 4:
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
MessageDialog.show((AppCompatActivity) getContext(), "提示", "你道路页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你道路页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
Bundle bundle = new Bundle();
@ -981,7 +991,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
break;
case 5:
DialogSettings.style = DialogSettings.STYLE.STYLE_KONGZUE;
MessageDialog.show((AppCompatActivity) getContext(), "提示", "你其他页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "你其他页面还有未提交完的数据", "确定").setOkButton(new OnDialogButtonClickListener() {
@Override
public boolean onClick(BaseDialog baseDialog, View v) {
Bundle bundle = new Bundle();
@ -1004,14 +1014,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
//表示文件名系统将会在/dada/dada/包名/shared_prefs目录下生成
//一个以该参数命名的.xml文件第二个mode表示创建的模式通过查看
//方法注释得知建议以0或者MODE_PRIVATE为默认值
SharedPreferences poi = getActivity().getSharedPreferences(Constant.DATA_FILE, 0);
SharedPreferences poi = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.DATA_FILE, 0);
//获取Editor对象
SharedPreferences.Editor edit = poi.edit();
//根据要保存的数据的类型调用对应的put方法,
//以键值对的形式添加新值
edit.putString("poiEntity", null);
//提交新值必须执行否则前面的操作都无效
edit.commit();
edit.apply();
}
@Subscribe
@ -1152,29 +1162,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
removablesLocality.clear();
refreshFilterData();
}
} /*else if (data.what == Constant.EVENT_WHAT_CURRENT_MARKER) {
LatLng latLng = (LatLng) data.obj;
int type = data.arg1;
BitmapDescriptor descriptor = null;
switch (type){
case 1:
descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bags);
break;
case 2:
descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_bags);
break;
case 3:
descriptor = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_bag);
break;
case 4:
descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_bag);
break;
case 5:
descriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bag);
break;
}
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(descriptor).zIndex(MARKER_BIG));
} */ else if (data.what == Constant.EVENT_WHAT_COMPLETE_TASK) {
} else if (data.what == Constant.EVENT_WHAT_COMPLETE_TASK) {
PoiEntity poiEntity = (PoiEntity) data.obj;
Bundle bundle = new Bundle();
bundle.putBoolean("isSliding", true); // 通知抽屉不收回
@ -1230,42 +1218,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
ivMessage.setVisibility(visitable);
}
/* private void initPoiMarker(LatLng latLng) {
CameraUpdate cameraSigma = CameraUpdateFactory.newCameraPosition(new CameraPosition(
latLng, //中心点坐标地图目标经纬度
tencentMap.getCameraPosition().zoom, //目标缩放级别
tencentMap.getCameraPosition().tilt, //目标倾斜角[0.0 ~ 45.0] (垂直地图时为0)
tencentMap.getCameraPosition().bearing)); //目标旋转角 0~360° (正北方为0)
tencentMap.animateCamera(cameraSigma, new TencentMap.CancelableCallback() {
@Override
public void onFinish() {
screenPosition = tencentMap.getProjection().toScreenLocation(latLng);
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
//创建Marker对象之前设置属性
if (markerPoi != null) {
markerPoi.setFixingPoint(screenPosition.x, screenPosition.y);
}
}
@Override
public void onCancel() {
}
});
}
private void initCheckedMarker(int poiWord) {
if (screenPosition != null) {
sliding_layout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
LatLng latLng = tencentMap.getProjection().fromScreenLocation(screenPosition);
markerPoi.setPosition(latLng);
markerPoi.setFixingPointEnable(false);
Constant.markerLatlng = latLng;
Message obtain = Message.obtain();
obtain.what = poiWord;
obtain.obj = latLng;
EventBus.getDefault().post(obtain);
}
}*/
/**
* 设置定位图标样式
@ -1348,9 +1300,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
public void onDestroy() {
super.onDestroy();
treasureMap.onDestroy();
if (markerPoi != null) {
markerPoi.remove();
}
if (bigMarker != null) {
bigMarker.remove();
}
@ -1408,19 +1357,19 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
DialogSettings.style = DialogSettings.STYLE.STYLE_MIUI;
List<ShareDialog.Item> itemList = new ArrayList<>();
if (upload.contains(1)) {
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_poi, "POI"));
itemList.add(new ShareDialog.Item(Objects.requireNonNull(getContext()), R.drawable.push_poi, "POI"));
}
if (upload.contains(2)) {
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_chongdianzhuang, "充电站"));
itemList.add(new ShareDialog.Item(Objects.requireNonNull(getContext()), R.drawable.push_chongdianzhuang, "充电站"));
}
if (upload.contains(3)) {
itemList.add(new ShareDialog.Item(getContext(), R.drawable.poi_video, "POI录像"));
itemList.add(new ShareDialog.Item(Objects.requireNonNull(getContext()), R.drawable.poi_video, "POI录像"));
}
if (upload.contains(4)) {
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_road, "道路"));
itemList.add(new ShareDialog.Item(Objects.requireNonNull(getContext()), R.drawable.push_road, "道路"));
}
if (upload.contains(5)) {
itemList.add(new ShareDialog.Item(getContext(), R.drawable.push_qingbao, "其他"));
itemList.add(new ShareDialog.Item(Objects.requireNonNull(getContext()), R.drawable.push_qingbao, "其他"));
}
Bundle bundle = new Bundle();
PoiEntity poiEntity = new PoiEntity();
@ -1434,7 +1383,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
poiEntity.setX(newPoiLatLng.getLongitude() + "");
poiEntity.setY(newPoiLatLng.getLatitude() + "");
bundle.putSerializable("poiEntity", poiEntity);
ShareDialog.show((AppCompatActivity) getActivity(), itemList, new ShareDialog.OnItemClickListener() {
ShareDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), itemList, new ShareDialog.OnItemClickListener() {
@Override
public boolean onClick(ShareDialog shareDialog, int index, ShareDialog.Item item) {
if (item.getText().equals("POI")) {
@ -1478,19 +1427,6 @@ 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).zIndex(MARKER_BIG));
} else if (type == 2) {
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(bitmapDescriptor2).zIndex(MARKER_BIG));
} else if (type == 3) {
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(bitmapDescriptor3).zIndex(MARKER_BIG));
} else if (type == 4) {
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(bitmapDescriptor4).zIndex(MARKER_BIG));
} else if (type == 5) {
markerPoi = tencentMap.addMarker(new MarkerOptions(latLng).icon(bitmapDescriptor5).zIndex(MARKER_BIG));
}
}*/
/**
* 将fragment显示到抽屉内
@ -1541,7 +1477,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
* 检查网络状态
*/
private void checkNetWork() {
if (NetWorkUtils.iConnected(getContext())) { // 当前网络可用
if (NetWorkUtils.iConnected(Objects.requireNonNull(getContext()))) { // 当前网络可用
checkMyLocation();
} else { // 当前网络不可用
dismissLoadingDialog();
@ -1580,7 +1516,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
dismissLoadingDialog();
Toast.makeText(getActivity(), "被永久拒绝授权,请手动授予定位权限", Toast.LENGTH_SHORT).show();
// 如果是被永久拒绝就跳转到应用权限系统设置页面
XXPermissions.startPermissionActivity(getActivity(), permissions);
XXPermissions.startPermissionActivity(Objects.requireNonNull(getActivity()), permissions);
}
}
});
@ -1596,10 +1532,6 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
if (gatherGetFragment != null) {
fragmentTransaction.remove(gatherGetFragment);
}
if (markerPoi != null) {
markerPoi.remove();
}
if (bigMarker != null) {
bigMarker.setVisible(false);
}
@ -1608,49 +1540,61 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
}
removableScreenMarker.clear();
if (poiEntity.getTaskStatus()==1){//已领取
marker.remove();
initMarker(poiEntity, true);
switch (poiEntity.getType()){
case 1:
case 2:
case 5:
marker.remove();
break;
case 3:
case 4:
case 6:
break;
}
}else {
Bundle bundle = new Bundle();
bundle.putSerializable("poiEntity", poiEntity);
switch (poiEntity.getType()) {
case 1:
marker.remove();
initMarker(poiEntity,false);
PoiFragment poiFragment = PoiFragment.newInstance(bundle);
showSlidingFragment(poiFragment);
marker.remove();
break;
case 2:
marker.remove();
initMarker(poiEntity,false);
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
showSlidingFragment(chargingStationFragment);
marker.remove();
break;
case 3:
marker.remove();
initMarker(poiEntity,false);
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
showSlidingFragment(poiVideoFragment);
marker.remove();
break;
case 4:
marker.remove();
initMarker(poiEntity,false);
RoadFragment roadFragment = RoadFragment.newInstance(bundle);
showSlidingFragment(roadFragment);
marker.remove();
break;
case 5:
marker.remove();
initMarker(poiEntity,false);
OtherFragment otherFragment = OtherFragment.newInstance(bundle);
showSlidingFragment(otherFragment);
marker.remove();
break;
case 6:
initMarker(poiEntity, true);
break;
}
}
} else {
JobSearchBean.BodyBean.ListBean listBean = (JobSearchBean.BodyBean.ListBean) marker.getTag();
if (listBean != null) {
@ -1674,15 +1618,28 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
poiListEntity.setY(latLng.latitude + "");
} else if (geometry.getGeometryType().equals("LineString")) {//线
List<LatLng> latLineString = GeometryTools.getLatLngs(geo);
assert latLineString != null;
poiListEntity.setX(latLineString.get(0).longitude + "");
poiListEntity.setY(latLineString.get(0).latitude + "");
} else if (geometry.getGeometryType().equals("Polygon")) {//
List<LatLng> latPolygon = GeometryTools.getLatLngs(geo);
assert latPolygon != null;
poiListEntity.setX(latPolygon.get(0).longitude + "");
poiListEntity.setY(latPolygon.get(0).latitude + "");
}
marker.remove();
initMarker(poiListEntity, true);
switch (listBean.getType()){
case 1:
case 2:
case 5:
marker.remove();
break;
case 3:
case 4:
case 6:
break;
}
} else {
Toast.makeText(getActivity(), "数据为空", Toast.LENGTH_SHORT).show();
}
@ -1699,7 +1656,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
Toast.makeText(getActivity(), "双击退出程序", Toast.LENGTH_SHORT).show();
handler.sendEmptyMessageDelayed(0x100, 2000);
} else {
getActivity().finish();
Objects.requireNonNull(getActivity()).finish();
}

View File

@ -4,6 +4,8 @@ import com.navinfo.outdoor.api.Constant;
public class HttpInterface {
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
public static final String TEST_IP = "http://172.23.139.4:9999/m4";//测试接口
public static final String USER_PATH = "/user/";//我的
public static final String MSG_LIST_PATH = "/msgList/";//发现
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
@ -30,6 +32,8 @@ public class HttpInterface {
public static String USER_LOCATION ; //上传用户坐标
//dtxbmaps.navinfo.com/dtxb/m4/user/user/1/getUserDetailByUserid/1?datetime=1628749294718
public static String USER_DETAIL_BY_USER_ID ; //获取用户信息
//http://172.21.98.90:9999/m4/user/userGuide/1/insertUserGuide
public static String INSERT_USER_GUIDE;//引导页完成接口
/**
* 发现
* Path=/m4/msgList/**
@ -50,13 +54,13 @@ public class HttpInterface {
* Path=/m4/userlogin/**
*/
//http://172.23.139.4:9999/m4/userlogin/oauth/token
public static String USER_LOGIN_OAUTH_TOKEN= IP + USER_LOGIN_PATH + "oauth/token" ; //登录接口
public static String USER_LOGIN_OAUTH_TOKEN= TEST_IP + USER_LOGIN_PATH + "oauth/token" ; //登录接口
///m4/user/user/register
public static String USER_REGISTER= IP + USER_PATH + "user/register" ;//注册接口
public static String USER_REGISTER= TEST_IP + USER_PATH + "user/register" ;//注册接口
///m4/user/ phone/message
public static String USER_MESSAGE= IP + USER_PATH + "phone/message" ;//获取验证码 type 1注册获取 2更新
public static String USER_MESSAGE= TEST_IP + USER_PATH + "phone/message" ;//获取验证码 type 1注册获取 2更新
///m4/user/user/forgetPassword
public static String USER_FORGET_PASSWORD = IP + USER_PATH + "user/forgetPassword";//忘记密码
public static String USER_FORGET_PASSWORD = TEST_IP + USER_PATH + "user/forgetPassword";//忘记密码
//Flat
//dtxbmaps.navinfo.com/dtxb/m4/user/phone/message?mobile=18811794839&type=2
@ -127,92 +131,94 @@ public class HttpInterface {
* Path=/m4/user/*
*/
//172.23.139.4:8001/m4/user/update
USER_UPDATE = IP + USER_PATH + "user/" + USERID + "/update";//用户资料
USER_UPDATE = TEST_IP + USER_PATH + "user/" + USERID + "/update";//用户资料
//172.23.139.4:8001/m4/userBankcard/update
USER_BANKCARD_UP_DATA = IP + USER_PATH + "userBankcard/" + USERID + "/add"; //绑定银行卡
USER_BANKCARD_UP_DATA = TEST_IP + USER_PATH + "userBankcard/" + USERID + "/add"; //绑定银行卡
//172.23.139.4:8001/m4/userAuth/add
USER_AUTH_ADD = IP + USER_PATH + "userAuth/" + USERID + "/add"; //实名认证
USER_AUTH_ADD = TEST_IP + USER_PATH + "userAuth/" + USERID + "/add"; //实名认证
//172.23.139.4:9999/m4/user/userLocation/1/userLocation post 参数 geom:geohash加密
USER_LOCATION = IP + USER_PATH + "userLocation/" + USERID + "/userLocation"; //上传用户坐标
USER_LOCATION = TEST_IP + USER_PATH + "userLocation/" + USERID + "/userLocation"; //上传用户坐标
//dtxbmaps.navinfo.com/dtxb/m4/user/user/1/getUserDetailByUserid/1?datetime=1628749294718
USER_DETAIL_BY_USER_ID = IP + USER_PATH + "user/" + USERID + "/getUserDetailByUserid/" + USERID; //获取用户信息
USER_DETAIL_BY_USER_ID = TEST_IP + USER_PATH + "user/" + USERID + "/getUserDetailByUserid/" + USERID; //获取用户信息
//http://172.21.98.90:9999/m4/user/userGuide/1/insertUserGuide
INSERT_USER_GUIDE=TEST_IP +USER_PATH+"userGuide/"+USERID+"/insertUserGuide";//引导页完成接口
/**
* 发现
* Path=/m4/msgList/**
*/
// public static String IP1 = "http://dtxbmaps.navinfo.com/dtxb/msg/";
MSG_CONTENT = IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/msg_content";//发现 -富文本详情页请求
LIST_TASK = IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/msg_list";//任务专区
LIST_EVENT = IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/msg_list";//活动专区
LIST_TASK_EXPLAIN = IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/msg_list";//任务说明
MSG_CONTENT = TEST_IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/msg_content";//发现 -富文本详情页请求
LIST_TASK = TEST_IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/msg_list";//任务专区
LIST_EVENT = TEST_IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/msg_list";//活动专区
LIST_TASK_EXPLAIN = TEST_IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/msg_list";//任务说明
//http://172.23.139.4:8002/findAndMessage/1/msg_list?fid=1&pageNum=1&pageSize=2
MSG_LISt = IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/msg_list";//发现查询接口
MSG_LISt = TEST_IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/msg_list";//发现查询接口
//http://172.23.139.4:8002/findAndMessage/1/exam_content?id=11
EXAM_CONTENT = IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/exam_content";//发现 -能力测评获取试题接口
EXAM_CONTENT = TEST_IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/exam_content";//发现 -能力测评获取试题接口
//http://172.23.139.4:8002/findAndMessage/1/submitExam
EXAM_SUBMIT = IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/submitExam";//发现 -能力测评提交试卷 post
EXAM_SUBMIT = TEST_IP + MSG_LIST_PATH + "findAndMessage/" + USERID + "/submitExam";//发现 -能力测评提交试卷 post
/**
* 提现 金额
* Path=/m4/price/**
*/
//http://172.23.139.4:8004/userPrice/1/getPrice
GET_PRICE = IP + PRICE_PATH + "userPrice/" + USERID + "/getPrice";//我的-总资产
GET_PRICE = TEST_IP + PRICE_PATH + "userPrice/" + USERID + "/getPrice";//我的-总资产
//http://172.23.139.4:8004/userPrice/1/userPriceExchange?exchangeMoney=10&payType=1
USER_PRICE_EXCHANGE = IP + PRICE_PATH + "userPrice/" + USERID + "/userPriceExchange";//我的-财务信息-提现
USER_PRICE_EXCHANGE = TEST_IP + PRICE_PATH + "userPrice/" + USERID + "/userPriceExchange";//我的-财务信息-提现
//dtxbmaps.navinfo.com/dtxb/m4/price/priceExchange/1/getList?datetime=1628647356815
PRICE_EXCHANGE = IP + PRICE_PATH + "priceExchange/" + USERID + "/getList";//提现记录
PRICE_EXCHANGE = TEST_IP + PRICE_PATH + "priceExchange/" + USERID + "/getList";//提现记录
/**
* 任务
*Path=/m4/task/**
*/
//172.23.139.4:8003/m4/task/1/getList
TASK_LIST = IP + TASK_PATH + "task/" + USERID + "/getList"; //任务搜索
TASK_LIST = TEST_IP + TASK_PATH + "task/" + USERID + "/getList"; //任务搜索
//172.23.139.4:8003/othertask/1/receivedOthertask
RECEIVED_OTHER_TASK = IP + TASK_PATH + "othertask/" + USERID + "/receivedOthertask";//其他-领取任务
RECEIVED_OTHER_TASK = TEST_IP + TASK_PATH + "othertask/" + USERID + "/receivedOthertask";//其他-领取任务
//172.23.139.4:8003/poitask/1/receivedPoitask/1
RECEIVED_POI_TASK = IP + TASK_PATH + "poitask/" + USERID + "/receivedPoitask";//poi-领取任务
RECEIVED_POI_TASK = TEST_IP + TASK_PATH + "poitask/" + USERID + "/receivedPoitask";//poi-领取任务
//172.23.139.4:8003/poitask/1/submitPoitask?taskId=5001&name=测试修改名称&address=测试修改地址&existence=1&geo=1rn7exd5uhxy&memo=测试备注...33.
SUBMIT_POI_TASK = IP + TASK_PATH + "poitask/" + USERID + "/submitPoitask";//poi-保存本地
SUBMIT_POI_TASK = TEST_IP + TASK_PATH + "poitask/" + USERID + "/submitPoitask";//poi-保存本地
//172.23.139.4:8003/othertask/1/submitOhtertask?taskId=5001&name=测试修改名称&address=测试修改地址&existence=1&geo=1rn7exd5uhxy&memo=测试备注
SUBMIT_OTHER_TASK = IP + TASK_PATH + "othertask/" + USERID + "/submitOthertask";//其他-保存本地
SUBMIT_OTHER_TASK = TEST_IP + TASK_PATH + "othertask/" + USERID + "/submitOthertask";//其他-保存本地
//172.23.139.4:8003/othertask/1/uploadpic
OTHER_TASK_UPLOAD_PIC = IP + TASK_PATH + "othertask/" + USERID + "/uploadpic";//其他-上传
OTHER_TASK_UPLOAD_PIC = TEST_IP + TASK_PATH + "othertask/" + USERID + "/uploadpic";//其他-上传
//172.23.139.4:8003/ctask/1/receivedCtask/8608
RECEIVED_CTASK = IP + TASK_PATH + "ctask/" + USERID + "/receivedCtask";//充电站-领取任务
RECEIVED_CTASK = TEST_IP + TASK_PATH + "ctask/" + USERID + "/receivedCtask";//充电站-领取任务
//172.23.139.4:8003/ctask/1/submitCtask?id=8608&name=充电站&address=地址&telephone=18812345678|14712345678&geo=1rn7exd5uhxy&memo=测试备注&sptype=1
SUBMIT_CTASK = IP + TASK_PATH + "ctask/" + USERID + "/submitCtask";//充电站-保存本地
SUBMIT_CTASK = TEST_IP + TASK_PATH + "ctask/" + USERID + "/submitCtask";//充电站-保存本地
//172.23.139.4:8003/cstask/1/submitCstask?taskId=0&name=充电站&geo=1rn7exd5uhxy&memo=测试备注&sptype=1&ffid=104&existence=1&detail={"cp_openType":"1,2","cp_floor":1,"cp_availableState":0,"sign_exist":0}
SUBMIT_CSTASK = IP + TASK_PATH + "cstask/" + USERID + "/submitCstask";//充电桩保存
SUBMIT_CSTASK = TEST_IP + TASK_PATH + "cstask/" + USERID + "/submitCstask";//充电桩保存
//172.23.139.4:8003/poitask/1/uploadpic
POI_TASK_UPLOAD_PIC = IP + TASK_PATH + "poitask/" + USERID + "/uploadpic";//poi-上传
POI_TASK_UPLOAD_PIC = TEST_IP + TASK_PATH + "poitask/" + USERID + "/uploadpic";//poi-上传
//172.23.139.4:8003/roadtask/1/receivedRoadtask/8569
RECEIVED_ROAD_TASK = IP + TASK_PATH + "roadtask/" + USERID + "/receivedRoadtask";//道路任务获取
RECEIVED_ROAD_TASK = TEST_IP + TASK_PATH + "roadtask/" + USERID + "/receivedRoadtask";//道路任务获取
//172.23.139.4:8003/poivideotask/1/receivedPoivideotask/8569
RECEIVED_POI_VIDEO_TASK = IP + TASK_PATH + "poivideotask/" + USERID + "/receivedPoivideotask";//poi录像任务获取
RECEIVED_POI_VIDEO_TASK = TEST_IP + TASK_PATH + "poivideotask/" + USERID + "/receivedPoivideotask";//poi录像任务获取
// 172.23.139.4:8003/poivideotask/1/submitPoivideotask
INSIDE_API_LIST = IP + TASK_PATH + "poivideotask/" + USERID + "/submitPoivideotask";//poi录像 保存
INSIDE_API_LIST = TEST_IP + TASK_PATH + "poivideotask/" + USERID + "/submitPoivideotask";//poi录像 保存
//172.23.139.4:8003/poivideotask/1/uploadpic
POI_VIDEO_UPLOAD_PIC = IP + TASK_PATH + "poivideotask/" + USERID + "/uploadpic";//poi录像-上传
POI_VIDEO_UPLOAD_PIC = TEST_IP + TASK_PATH + "poivideotask/" + USERID + "/uploadpic";//poi录像-上传
//172.23.139.4:8003/roadtask/1/submitRoadtask?taskId=0&name=段哥&address=二娃&memo=1rn7exd5uhxy&workType=2
ROAD_TASK_SUBMIT = IP + TASK_PATH + "roadtask/" + USERID + "/submitRoadtask";//道路录像-保存本地
ROAD_TASK_SUBMIT = TEST_IP + TASK_PATH + "roadtask/" + USERID + "/submitRoadtask";//道路录像-保存本地
//172.23.139.4:8003/roadtask/1/uploadpic
ROAD_TASK_UPLOAD_PIC = IP + TASK_PATH + "roadtask/" + USERID + "/uploadpic";//道路录像上传
ROAD_TASK_UPLOAD_PIC = TEST_IP + TASK_PATH + "roadtask/" + USERID + "/uploadpic";//道路录像上传
//http://172.23.139.4:8003/m4/task/1/getPhone?geo=1rn7exd5uhxy
GET_PHONES = IP + TASK_PATH + "task/" + USERID + "/getPhone";//电话区号和电话位数
GET_PHONES = TEST_IP + TASK_PATH + "task/" + USERID + "/getPhone";//电话区号和电话位数
//172.23.139.4:8003/cstask/1/uploadpic
CS_TASK_UP_LOAD_PIC = IP + TASK_PATH + "cstask/" + USERID + "/uploadpic";//充电桩-上传
CS_TASK_UP_LOAD_PIC = TEST_IP + TASK_PATH + "cstask/" + USERID + "/uploadpic";//充电桩-上传
//172.23.139.4:8003/ctask/1/uploadpic
C_TASK_UP_LOAD_PIC = IP + TASK_PATH + "ctask/" + USERID + "/uploadpic";//充电站-上传
C_TASK_UP_LOAD_PIC = TEST_IP + TASK_PATH + "ctask/" + USERID + "/uploadpic";//充电站-上传
//172.23.139.4:8003/m4/task/1/taskName?geo=1rn7exd5uhxy&name=四维
TASK_NAME = IP + TASK_PATH + "task/" + USERID + "/taskName";//poi-查重
TASK_NAME = TEST_IP + TASK_PATH + "task/" + USERID + "/taskName";//poi-查重
//172.23.139.4:8003/m4/task/1/getCommitList?type=2&pageSize=10&pageNum=1
GET_COMMIT_LIST = IP + TASK_PATH + "task/" + USERID + "/getCommitList";//紀錄已提交
RECEIVED_POLYGON_TASK = IP + TASK_PATH + "polygonTask/" + USERID + "/receivedPolygontask"; //面状任务任务领取
GET_COMMIT_LIST = TEST_IP + TASK_PATH + "task/" + USERID + "/getCommitList";//紀錄已提交
RECEIVED_POLYGON_TASK = TEST_IP + TASK_PATH + "polygonTask/" + USERID + "/receivedPolygontask"; //面状任务任务领取
//172.23.139.4:8003/m4/task/1/unReceivedTask?taskIds=&auditIds=214,278 取消领取的接口
UNRECEIVED_POLYGON_TASK = IP + TASK_PATH + "task/" + USERID + "/unReceivedTask";//所有類型结束领取
COMPLETE = IP + TASK_PATH + "polygonTask/" + USERID + "/complete";//面状任务结束领取
SUBMIT_POLYGON_TASK = IP + TASK_PATH + "polygonTask/" + USERID + "/submitPolygontask";//面状任务开始采集
UNRECEIVED_POLYGON_TASK = TEST_IP + TASK_PATH + "task/" + USERID + "/unReceivedTask";//所有類型结束领取
COMPLETE = TEST_IP + TASK_PATH + "polygonTask/" + USERID + "/complete";//面状任务结束领取
SUBMIT_POLYGON_TASK = TEST_IP + TASK_PATH + "polygonTask/" + USERID + "/submitPolygontask";//面状任务开始采集
}

View File

@ -182,10 +182,8 @@ public class PoiSaveUtils {
if (execute.code() != 200) {
return execute.code();
}
assert execute.body() != null;
String bodyStr = execute.body().string();
if (bodyStr == null) {
return -1;
}
PoiSaveBean poiSaveBean = gson.fromJson(bodyStr, PoiSaveBean.class);
if (poiSaveBean.getCode() == 200) {
poiEntity.setTaskStatus(3);
@ -257,8 +255,12 @@ public class PoiSaveUtils {
}
}
}
List<File> videoFileList = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(poiEntity.getId());
List<File> videoFileList=null;
if (poiEntity.getRecord_way()==1){//,录像2连拍
videoFileList = AWMp4ParserHelper.getInstance().getVideoFileListByUUID(poiEntity.getId());
}else if (poiEntity.getRecord_way()==2){
videoFileList = AWMp4ParserHelper.getInstance().getJPGFileListByUUID(poiEntity.getId());
}
if (videoFileList != null && !videoFileList.isEmpty()) {
List<File> txtFileList = new ArrayList<>();
for (File videoFile : videoFileList) {
@ -268,9 +270,7 @@ public class PoiSaveUtils {
videoFileList.addAll(txtFileList);
File fileZip = new File(Constant.PICTURE_FOLDER, "files" + ".zip");
ZipUtil.zipFiles(videoFileList, fileZip, null);
if (fileZip!=null){
photoFile.add(fileZip);
}
photoFile.add(fileZip);
}
String url = null;
//1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
@ -300,10 +300,8 @@ public class PoiSaveUtils {
if (execute.code() != 200) {
return;
}
assert execute.body() != null;
String bodyStr = execute.body().string();
if (bodyStr == null) {
return;
}
Gson gson = new Gson();
OtherUploadPicBean otherUploadPicBean = gson.fromJson(bodyStr, OtherUploadPicBean.class);
if (otherUploadPicBean.getCode() == 200) {
@ -313,7 +311,6 @@ public class PoiSaveUtils {
} else {
Log.d("TAGss", "uploadPoiNet: 失败");
bInt++;
return;
}
} catch (IOException e) {
e.printStackTrace();
@ -395,20 +392,16 @@ public class PoiSaveUtils {
if (execute.code() != 200) {
return execute.code();
}
assert execute.body() != null;
String responseBodyStr = execute.body().string();
if (responseBodyStr == null) {
return -1;
}
if (responseBodyStr != null) {
Gson gson = new Gson();
ChargingPileSaveBean chargingPileSaveBean = gson.fromJson(responseBodyStr, ChargingPileSaveBean.class);
if (chargingPileSaveBean.getCode() != 200) {
return chargingPileSaveBean.getCode();
}
Log.d("TAGss", "saveChargingPile2NetWork" + 200);
chargingPileEntity.setBodyId(chargingPileSaveBean.getBody());
InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(mContext, chargingPileEntity); // 更新当前充电桩的bodyId
Gson gson = new Gson();
ChargingPileSaveBean chargingPileSaveBean = gson.fromJson(responseBodyStr, ChargingPileSaveBean.class);
if (chargingPileSaveBean.getCode() != 200) {
return chargingPileSaveBean.getCode();
}
Log.d("TAGss", "saveChargingPile2NetWork" + 200);
chargingPileEntity.setBodyId(chargingPileSaveBean.getBody());
InsertAndUpdateUtils.getInstance().insertOrUpdateChargingPile(mContext, chargingPileEntity); // 更新当前充电桩的bodyId
} catch (IOException e) {
e.printStackTrace();
}
@ -477,17 +470,13 @@ public class PoiSaveUtils {
if (execute.code() != 200) {
return execute.code();
}
assert execute.body() != null;
String pileUpLoadResultStr = execute.body().string();
if (pileUpLoadResultStr == null) {
return -1;
}
if (pileUpLoadResultStr != null) {
Gson gson = new Gson();
PoiUploadBean uploadBeanResult = gson.fromJson(pileUpLoadResultStr, PoiUploadBean.class);
if (uploadBeanResult.getCode() == 200) {
Log.d("TAGss", "chargingPileUploadNetWork" + 200);
PoiDatabase.getInstance(mContext).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
}
Gson gson = new Gson();
PoiUploadBean uploadBeanResult = gson.fromJson(pileUpLoadResultStr, PoiUploadBean.class);
if (uploadBeanResult.getCode() == 200) {
Log.d("TAGss", "chargingPileUploadNetWork" + 200);
PoiDatabase.getInstance(mContext).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
}
} catch (IOException e) {
e.printStackTrace();

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

View File

@ -8,6 +8,5 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -35,12 +35,11 @@
android:id="@+id/iv_zoom_add"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:src="@mipmap/zoom_add"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/btn_stop_video"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/btn_switch"
app:layout_constraintTop_toTopOf="parent" />
<ImageView

View File

@ -16,6 +16,8 @@
android:id="@+id/camera"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cameraPictureSizeMaxArea="2500"
app:cameraVideoSizeMaxWidth="2750000"
android:keepScreenOn="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -36,12 +38,11 @@
android:id="@+id/iv_zoom_add"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:src="@mipmap/zoom_add"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/btn_stop_picture"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/btn_switch"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
@ -82,7 +83,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_marginEnd="25dp"
android:text="切换"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@ -14,7 +14,8 @@
<LinearLayout
android:id="@+id/ll_filter"
android:layout_width="match_parent"
android:layout_height="80dp">
android:layout_height="80dp"
android:baselineAligned="false">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_type"
@ -39,7 +40,7 @@
style="@style/main_about_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_marginBottom="20dp"
android:text="全部"
app:layout_constraintBottom_toBottomOf="parent"
@ -77,7 +78,7 @@
style="@style/main_about_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_marginBottom="20dp"
android:text="全部"
app:layout_constraintBottom_toBottomOf="parent"
@ -98,7 +99,8 @@
<LinearLayout
android:id="@+id/ll_filter_2"
android:layout_width="match_parent"
android:layout_height="80dp">
android:layout_height="80dp"
android:baselineAligned="false">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_photograph"
@ -124,7 +126,7 @@
style="@style/main_about_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_marginBottom="20dp"
android:text="全部"
app:layout_constraintBottom_toBottomOf="parent"
@ -162,7 +164,7 @@
style="@style/main_about_text_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_marginBottom="20dp"
android:text="200"
app:layout_constraintBottom_toBottomOf="parent"
@ -201,9 +203,9 @@
style="@style/user_style"
android:layout_width="80dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginRight="20dp"
android:layout_marginEnd="20dp"
android:gravity="center"
android:text="地图显示"
android:textColor="@color/white"

View File

@ -8,8 +8,9 @@
<Button
android:id="@+id/btn_delete"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_width="25dp"
android:layout_height="25dp"
android:padding="5dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="5dp"
android:background="@drawable/icon_delete"

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/icon_data_10_marker"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Button
android:id="@+id/btn_next_step"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_next_step"
android:layout_marginBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/icon_discover_8_marker"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Button
android:id="@+id/btn_next_step"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_next_step"
android:layout_marginBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/icon_gather_5_marker"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Button
android:id="@+id/btn_next_step"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_next_step"
android:layout_marginBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/icon_location_4_marker"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Button
android:id="@+id/btn_next_step"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_next_step"
android:layout_marginBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/icon_my_head_9_marker"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Button
android:id="@+id/btn_next_step"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_next_step"
android:layout_marginBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -3,16 +3,16 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:background="@color/bgColor_overlay"
android:background="@drawable/icon_refresh_2_marker"
android:layout_height="match_parent">
<Button
android:id="@+id/btn_icon"
android:layout_width="100dp"
android:layout_height="100dp"
android:text="最后一页"
android:id="@+id/btn_next_step"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_next_step"
android:layout_marginBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -3,16 +3,15 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:background="@color/dialogBkgDark"
android:background="@drawable/icon_screen_3_marker"
android:layout_height="match_parent">
<Button
android:id="@+id/btn_icon"
android:layout_width="100dp"
android:layout_height="100dp"
android:text="第二页"
android:id="@+id/btn_next_step"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_next_step"
android:layout_marginBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/icon_submit_6_marker"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Button
android:id="@+id/btn_next_step"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_next_step"
android:layout_marginBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/icon_submitted_7_marker"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Button
android:id="@+id/btn_next_step"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_next_step"
android:layout_marginBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -3,16 +3,16 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:background="@drawable/bg"
android:background="@drawable/icon_task_1_marker"
android:layout_height="match_parent">
<Button
android:id="@+id/btn_icon"
android:layout_width="100dp"
android:layout_height="100dp"
android:text="第一页"
android:id="@+id/btn_next_step"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_next_step"
android:layout_marginBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/icon_withdraw_11_marker"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Button
android:id="@+id/btn_to_learn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_to_learn"
android:layout_marginBottom="60dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>