修改拍照界面
This commit is contained in:
@@ -12,8 +12,8 @@ android {
|
|||||||
applicationId "com.navinfo.outdoor"
|
applicationId "com.navinfo.outdoor"
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 41
|
versionCode 42
|
||||||
versionName "8.230109"
|
versionName "8.230110"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
|
|||||||
private boolean isMapSlide = false; // 地图是否为靠在侧边的小图模式
|
private boolean isMapSlide = false; // 地图是否为靠在侧边的小图模式
|
||||||
private ImageView ivZoomAdd/*zoom放大*/, ivZoomDel/*zoom缩小*/, ivLocation/*定位按钮*/,
|
private ImageView ivZoomAdd/*zoom放大*/, ivZoomDel/*zoom缩小*/, ivLocation/*定位按钮*/,
|
||||||
ivPicRoadImage/*道路拍摄水平线*/, ivPicVideoImage/*视频拍摄水平线*/;
|
ivPicRoadImage/*道路拍摄水平线*/, ivPicVideoImage/*视频拍摄水平线*/;
|
||||||
|
private View layerMapController;
|
||||||
private ImageView btnSwitch; // 切换地图大小的按钮
|
private ImageView btnSwitch; // 切换地图大小的按钮
|
||||||
private ViewGroup layerChange; // 切换地图和相机的父控件
|
private ViewGroup layerChange; // 切换地图和相机的父控件
|
||||||
private BitmapDescriptor pileDescriptor = BitmapDescriptorFactory
|
private BitmapDescriptor pileDescriptor = BitmapDescriptorFactory
|
||||||
@@ -274,6 +275,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
|
|||||||
tvMapView.setOnClickListener(this);
|
tvMapView.setOnClickListener(this);
|
||||||
ivZoomAdd = findViewById(R.id.iv_zoom_add);
|
ivZoomAdd = findViewById(R.id.iv_zoom_add);
|
||||||
ivZoomAdd.setOnClickListener(this);
|
ivZoomAdd.setOnClickListener(this);
|
||||||
|
layerMapController = findViewById(R.id.layer_map_controller);
|
||||||
ivZoomDel = findViewById(R.id.iv_zoom_del);
|
ivZoomDel = findViewById(R.id.iv_zoom_del);
|
||||||
ivZoomDel.setOnClickListener(this);
|
ivZoomDel.setOnClickListener(this);
|
||||||
ivLocation = findViewById(R.id.iv_location);
|
ivLocation = findViewById(R.id.iv_location);
|
||||||
@@ -1596,9 +1598,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
|
|||||||
//小图
|
//小图
|
||||||
private void initMapBig() {
|
private void initMapBig() {
|
||||||
isMapSlide = false;
|
isMapSlide = false;
|
||||||
ivZoomAdd.setVisibility(View.GONE);
|
layerMapController.setVisibility(View.GONE);
|
||||||
ivZoomDel.setVisibility(View.GONE);
|
|
||||||
ivLocation.setVisibility(View.GONE);
|
|
||||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
||||||
// 道路水平方向图标显示
|
// 道路水平方向图标显示
|
||||||
ivPicRoadImage.setVisibility(View.VISIBLE);
|
ivPicRoadImage.setVisibility(View.VISIBLE);
|
||||||
@@ -1607,9 +1607,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
|
|||||||
//大图
|
//大图
|
||||||
private void initMapShort() {
|
private void initMapShort() {
|
||||||
isMapSlide = true;
|
isMapSlide = true;
|
||||||
ivZoomAdd.setVisibility(View.VISIBLE);
|
layerMapController.setVisibility(View.VISIBLE);
|
||||||
ivZoomDel.setVisibility(View.VISIBLE);
|
|
||||||
ivLocation.setVisibility(View.VISIBLE);
|
|
||||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
||||||
// 道路水平方向图标不显示
|
// 道路水平方向图标不显示
|
||||||
ivPicRoadImage.setVisibility(View.GONE);
|
ivPicRoadImage.setVisibility(View.GONE);
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
private CheckBox capturePicture; //拍照
|
private CheckBox capturePicture; //拍照
|
||||||
private File paperFile, logFile;
|
private File paperFile, logFile;
|
||||||
private ImageView ivZoomAdd, ivZoomDel, ivLocation, ivPicRoadImage, ivPicVideoImage, imageView;
|
private ImageView ivZoomAdd, ivZoomDel, ivLocation, ivPicRoadImage, ivPicVideoImage, imageView;
|
||||||
|
private View layerMapController;
|
||||||
private MyLocation oldCurrentLocation = null;
|
private MyLocation oldCurrentLocation = null;
|
||||||
private Timer timer;
|
private Timer timer;
|
||||||
private TimerTask timerTask;
|
private TimerTask timerTask;
|
||||||
@@ -290,6 +291,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
||||||
ivZoomAdd = findViewById(R.id.iv_zoom_add);
|
ivZoomAdd = findViewById(R.id.iv_zoom_add);
|
||||||
ivZoomAdd.setOnClickListener(this);
|
ivZoomAdd.setOnClickListener(this);
|
||||||
|
layerMapController = findViewById(R.id.layer_map_controller);
|
||||||
ivZoomDel = findViewById(R.id.iv_zoom_del);
|
ivZoomDel = findViewById(R.id.iv_zoom_del);
|
||||||
ivZoomDel.setOnClickListener(this);
|
ivZoomDel.setOnClickListener(this);
|
||||||
ivLocation = findViewById(R.id.iv_location);
|
ivLocation = findViewById(R.id.iv_location);
|
||||||
@@ -787,9 +789,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
//小图
|
//小图
|
||||||
private void initMapBig() {
|
private void initMapBig() {
|
||||||
isMapSlide = false;
|
isMapSlide = false;
|
||||||
ivZoomAdd.setVisibility(View.GONE);
|
layerMapController.setVisibility(View.GONE);
|
||||||
ivZoomDel.setVisibility(View.GONE);
|
|
||||||
ivLocation.setVisibility(View.GONE);
|
|
||||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
||||||
// 道路水平方向图标显示
|
// 道路水平方向图标显示
|
||||||
ivPicRoadImage.setVisibility(View.VISIBLE);
|
ivPicRoadImage.setVisibility(View.VISIBLE);
|
||||||
@@ -798,9 +798,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
//大图
|
//大图
|
||||||
private void initMapShort() {
|
private void initMapShort() {
|
||||||
isMapSlide = true;
|
isMapSlide = true;
|
||||||
ivZoomAdd.setVisibility(View.VISIBLE);
|
layerMapController.setVisibility(View.VISIBLE);
|
||||||
ivZoomDel.setVisibility(View.VISIBLE);
|
|
||||||
ivLocation.setVisibility(View.VISIBLE);
|
|
||||||
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
|
||||||
// 道路水平方向图标显示
|
// 道路水平方向图标显示
|
||||||
ivPicRoadImage.setVisibility(View.GONE);
|
ivPicRoadImage.setVisibility(View.GONE);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -15,15 +14,12 @@ import android.widget.Button;
|
|||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.NumberPicker;
|
|
||||||
import android.widget.RelativeLayout;
|
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.RequiresApi;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
|
|
||||||
@@ -37,7 +33,6 @@ import com.hjq.permissions.XXPermissions;
|
|||||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||||
import com.kongzue.dialog.util.BaseDialog;
|
import com.kongzue.dialog.util.BaseDialog;
|
||||||
import com.kongzue.dialog.util.DialogSettings;
|
import com.kongzue.dialog.util.DialogSettings;
|
||||||
import com.kongzue.dialog.v3.CustomDialog;
|
|
||||||
import com.kongzue.dialog.v3.MessageDialog;
|
import com.kongzue.dialog.v3.MessageDialog;
|
||||||
import com.kongzue.dialog.v3.WaitDialog;
|
import com.kongzue.dialog.v3.WaitDialog;
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
@@ -79,17 +74,14 @@ import org.locationtech.jts.geom.Geometry;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 寻宝-上报弹窗-交通枢纽
|
* 寻宝-上报弹窗-建筑物内部
|
||||||
*/
|
*/
|
||||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
|
||||||
public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickListener {
|
public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||||
private EditText etDesc;
|
private EditText etDesc;
|
||||||
private Spinner spnRoadName;
|
private Spinner spnRoadName;
|
||||||
@@ -103,8 +95,6 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
|||||||
private StringBuilder poiVideoBuilder;
|
private StringBuilder poiVideoBuilder;
|
||||||
private LatLng rearLatLng;
|
private LatLng rearLatLng;
|
||||||
private boolean booleanExtra = true;
|
private boolean booleanExtra = true;
|
||||||
private TextView btnSelectFloor;
|
|
||||||
private String[] items;
|
|
||||||
|
|
||||||
public static AreaHubFragment newInstance(Bundle bundle) {
|
public static AreaHubFragment newInstance(Bundle bundle) {
|
||||||
AreaHubFragment fragment = new AreaHubFragment();
|
AreaHubFragment fragment = new AreaHubFragment();
|
||||||
@@ -297,65 +287,18 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
|||||||
private void initShowPoi() {
|
private void initShowPoi() {
|
||||||
// 添加信息:
|
// 添加信息:
|
||||||
assert getArguments() != null;
|
assert getArguments() != null;
|
||||||
btnSelectFloor = findViewById(R.id.btn_select_floor);
|
|
||||||
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
btnSelectFloor.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
// 显示对话框选择对应的楼层
|
|
||||||
CustomDialog
|
|
||||||
.show((AppCompatActivity) getActivity(), R.layout.dialog_select_floor, new CustomDialog.OnBindView() {
|
|
||||||
@Override
|
|
||||||
public void onBind(CustomDialog dialog, View v) {
|
|
||||||
List<String> numValues = new ArrayList<String>();
|
|
||||||
for (int i = -10; i <= 100; i++) {
|
|
||||||
if (i == 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
numValues.add(i+"");
|
|
||||||
}
|
|
||||||
NumberPicker numberPicker = v.findViewById(R.id.number_picker);
|
|
||||||
numberPicker.setDisplayedValues(numValues.toArray(new String[numValues.size()]));
|
|
||||||
numberPicker.setMinValue(0);
|
|
||||||
numberPicker.setMaxValue(numValues.size()-1);
|
|
||||||
numberPicker.setValue(10); // 设置默认选择1楼
|
|
||||||
TextView confirmTv = v.findViewById(R.id.btn_select_floor_confirm);
|
|
||||||
confirmTv.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
int index = numberPicker.getValue();
|
|
||||||
int floor = Integer.parseInt(numValues.get(index));
|
|
||||||
btnSelectFloor.setTag(floor);
|
|
||||||
btnSelectFloor.setText(floor+"层");
|
|
||||||
spnRoadName.setTag(floor+"层");
|
|
||||||
dialog.doDismiss();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setCustomLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT))
|
|
||||||
.setCustomDialogStyleId(R.style.iOSDialogAnimStyle);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
String name = showPoiEntity.getName();//名称
|
String name = showPoiEntity.getName();//名称
|
||||||
SpinnerUtils spinnerUtils = new SpinnerUtils();
|
SpinnerUtils spinnerUtils = new SpinnerUtils();
|
||||||
items = new String[]{"建筑物全景", "建筑物底商", "楼层引导图", "楼层选择"};
|
String[] items = {"园区外围(含门)", "园区引导图", "园区底商"};
|
||||||
if (StringUtils.isEmpty(name)) { // 如果从数据获取的名称为空,则设置name显示为默认的第一个选项
|
if (StringUtils.isEmpty(name)) {// 如果从数据获取的名称为空,则设置name显示为默认的第一个选项
|
||||||
name = items[0];
|
name = items[0];
|
||||||
}
|
}
|
||||||
spinnerUtils.initSpinner(getActivity(), spnRoadName, new AdapterView.OnItemSelectedListener() {
|
spinnerUtils.initSpinner(getActivity(), spnRoadName, new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
if (items[position].equals("楼层选择")) {
|
spnRoadName.setTag(items[position]);
|
||||||
btnSelectFloor.setVisibility(View.VISIBLE);
|
|
||||||
btnSelectFloor.setTag(null);
|
|
||||||
btnSelectFloor.setText("楼层");
|
|
||||||
spnRoadName.setTag(null);
|
|
||||||
} else {
|
|
||||||
btnSelectFloor.setVisibility(View.GONE);
|
|
||||||
spnRoadName.setTag(items[position]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -363,11 +306,6 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
|||||||
|
|
||||||
}
|
}
|
||||||
}, name, items);
|
}, name, items);
|
||||||
if (name.endsWith("层")) {
|
|
||||||
btnSelectFloor.setVisibility(View.VISIBLE);
|
|
||||||
btnSelectFloor.setText(name);
|
|
||||||
btnSelectFloor.setTag(name.replace("层", ""));
|
|
||||||
}
|
|
||||||
String geoWkt = showPoiEntity.getGeoWkt();
|
String geoWkt = showPoiEntity.getGeoWkt();
|
||||||
if (geoWkt != null) {
|
if (geoWkt != null) {
|
||||||
String geo = Geohash.getInstance().decode(geoWkt);
|
String geo = Geohash.getInstance().decode(geoWkt);
|
||||||
@@ -513,44 +451,36 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
|||||||
initPoiSaveLocal(false);
|
initPoiSaveLocal(false);
|
||||||
break;
|
break;
|
||||||
case R.id.tv_short://点击拍摄
|
case R.id.tv_short://点击拍摄
|
||||||
// 检查是否选择了楼层选择选项
|
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了拍摄的按钮 ,");
|
||||||
checkAreaType(new View.OnClickListener() {
|
double latitude = LocationLifeCycle.getInstance().getMainLocation().getLatitude();
|
||||||
@Override
|
double longitude = LocationLifeCycle.getInstance().getMainLocation().getLongitude();
|
||||||
public void onClick(View v) {
|
LatLng startLatLng = new LatLng(latitude, longitude);// 用户当前位置
|
||||||
if (spnRoadName.getTag()!=null) { // 用户已经设置楼层信息
|
double geometry = GeometryTools.distanceToDouble(startLatLng, latLng);// 起點 于用戶的距離
|
||||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了拍摄的按钮 ,");
|
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);// 終點于用戶的距離
|
||||||
double latitude = LocationLifeCycle.getInstance().getMainLocation().getLatitude();
|
if (geometry > rearGeometry) {//用戶在终点开始作业
|
||||||
double longitude = LocationLifeCycle.getInstance().getMainLocation().getLongitude();
|
if (rearGeometry > 5000) {
|
||||||
LatLng startLatLng = new LatLng(latitude, longitude);// 用户当前位置
|
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
||||||
double geometry = GeometryTools.distanceToDouble(startLatLng, latLng);// 起點 于用戶的距離
|
return;
|
||||||
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);// 終點于用戶的距離
|
|
||||||
if (geometry > rearGeometry) {//用戶在终点开始作业
|
|
||||||
if (rearGeometry > 5000) {
|
|
||||||
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {//用户在起点开始作业
|
|
||||||
if (geometry > 5000) {
|
|
||||||
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Intent intents = new Intent(getActivity(), PicturesActivity.class);
|
|
||||||
File filePath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
|
||||||
intents.putExtra(Constant.INTENT_JPG_PATH, filePath.getAbsolutePath());
|
|
||||||
intents.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
|
|
||||||
intents.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
|
||||||
intents.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
|
|
||||||
int gpsRssi = LocationLifeCycle.getInstance().getTencentLocation().getGPSRssi();
|
|
||||||
if (gpsRssi == 0) {
|
|
||||||
intents.putExtra(Constant.INTENT_BOOLEAN, false);
|
|
||||||
} else {
|
|
||||||
intents.putExtra(Constant.INTENT_BOOLEAN, true);
|
|
||||||
}
|
|
||||||
startActivityForResult(intents, 0x101);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
} else {//用户在起点开始作业
|
||||||
|
if (geometry > 5000) {
|
||||||
|
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Intent intents = new Intent(getActivity(), PicturesActivity.class);
|
||||||
|
File filePath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
||||||
|
intents.putExtra(Constant.INTENT_JPG_PATH, filePath.getAbsolutePath());
|
||||||
|
intents.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
|
||||||
|
intents.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
||||||
|
intents.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
|
||||||
|
int gpsRssi = LocationLifeCycle.getInstance().getTencentLocation().getGPSRssi();
|
||||||
|
if (gpsRssi == 0) {
|
||||||
|
intents.putExtra(Constant.INTENT_BOOLEAN, false);
|
||||||
|
} else {
|
||||||
|
intents.putExtra(Constant.INTENT_BOOLEAN, true);
|
||||||
|
}
|
||||||
|
startActivityForResult(intents, 0x101);
|
||||||
break;
|
break;
|
||||||
case R.id.tv_combo://自动连拍:
|
case R.id.tv_combo://自动连拍:
|
||||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了自动连拍的按钮 ,");
|
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了自动连拍的按钮 ,");
|
||||||
@@ -583,10 +513,6 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
|||||||
startActivityForResult(intent, 0x102);
|
startActivityForResult(intent, 0x102);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_poi_video_upload:
|
case R.id.btn_poi_video_upload:
|
||||||
if (spnRoadName.getTag() == null) {
|
|
||||||
com.github.lazylibrary.util.ToastUtils.showToast(getActivity(), "没有POI名称,无法保存!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了上传的按钮 ,");
|
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了上传的按钮 ,");
|
||||||
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
|
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
|
||||||
if (poiEntity.getTaskStatus() == 1 || poiEntity.getTaskStatus() == 2 || poiEntity.getTaskStatus() == 0 || poiEntity.getTaskStatus() == 5) {
|
if (poiEntity.getTaskStatus() == 1 || poiEntity.getTaskStatus() == 2 || poiEntity.getTaskStatus() == 0 || poiEntity.getTaskStatus() == 5) {
|
||||||
@@ -599,34 +525,6 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkAreaType(View.OnClickListener listener) {
|
|
||||||
String message;
|
|
||||||
if (spnRoadName.getTag() == null || spnRoadName.getTag().toString().endsWith("层")) { // 名称下拉框为空,说明选择了 楼层选择,但是没选择楼层层数
|
|
||||||
message = "请先选择楼层!";
|
|
||||||
if (spnRoadName.getTag()!=null&&spnRoadName.getTag().toString().endsWith("层")) { // 如果当前spn的tag是X层这样的tag,说明已经选择了楼层层数
|
|
||||||
message = "请首先拍摄楼层证明";
|
|
||||||
}
|
|
||||||
MessageDialog.show((AppCompatActivity) getActivity(), "提示", message)
|
|
||||||
.setCustomDialogStyleId(R.style.iOSDialogAnimStyle)
|
|
||||||
.setAlign(BaseDialog.ALIGN.DEFAULT)
|
|
||||||
.setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
|
||||||
if (spnRoadName.getTag()!=null) { // 只有tag为非空时,才可以继续走拍照流程
|
|
||||||
listener.onClick(v);
|
|
||||||
}
|
|
||||||
if (baseDialog.isShow) {
|
|
||||||
baseDialog.doDismiss();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else { // 名称下拉框选项不为空,说明选择的不是 楼层选择 选项
|
|
||||||
listener.onClick(spnRoadName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void initPoiSaveLocal(boolean isLocal) {
|
public void initPoiSaveLocal(boolean isLocal) {
|
||||||
if (spnRoadName.getTag() == null) {
|
if (spnRoadName.getTag() == null) {
|
||||||
com.github.lazylibrary.util.ToastUtils.showToast(getActivity(), "没有POI名称,无法保存!");
|
com.github.lazylibrary.util.ToastUtils.showToast(getActivity(), "没有POI名称,无法保存!");
|
||||||
@@ -851,7 +749,7 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
|||||||
String newPoiEntity = new Gson().toJson(poiEntity);
|
String newPoiEntity = new Gson().toJson(poiEntity);
|
||||||
//以键值对的形式添加新值。
|
//以键值对的形式添加新值。
|
||||||
edit.putString("poiEntity", newPoiEntity);
|
edit.putString("poiEntity", newPoiEntity);
|
||||||
edit.putInt("roadVideoType", 2);
|
edit.putInt("roadVideoType", 3);
|
||||||
//提交新值。必须执行,否则前面的操作都无效。
|
//提交新值。必须执行,否则前面的操作都无效。
|
||||||
edit.apply();
|
edit.apply();
|
||||||
Log.d("TAG", "initRoadSharePre: " + newPoiEntity);
|
Log.d("TAG", "initRoadSharePre: " + newPoiEntity);
|
||||||
@@ -949,10 +847,8 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||||
if (spnRoadName.getTag()!=null) {
|
String roadName = spnRoadName.getTag().toString();
|
||||||
String roadName = spnRoadName.getTag().toString();
|
poiEntity.setName(roadName);
|
||||||
poiEntity.setName(roadName);
|
|
||||||
}
|
|
||||||
// if (!roadName.equals("")) {
|
// if (!roadName.equals("")) {
|
||||||
// poiEntity.setName(roadName);
|
// poiEntity.setName(roadName);
|
||||||
// } else {
|
// } else {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -14,12 +15,15 @@ import android.widget.Button;
|
|||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.NumberPicker;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.annotation.RequiresApi;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
|
|
||||||
@@ -33,6 +37,7 @@ import com.hjq.permissions.XXPermissions;
|
|||||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||||
import com.kongzue.dialog.util.BaseDialog;
|
import com.kongzue.dialog.util.BaseDialog;
|
||||||
import com.kongzue.dialog.util.DialogSettings;
|
import com.kongzue.dialog.util.DialogSettings;
|
||||||
|
import com.kongzue.dialog.v3.CustomDialog;
|
||||||
import com.kongzue.dialog.v3.MessageDialog;
|
import com.kongzue.dialog.v3.MessageDialog;
|
||||||
import com.kongzue.dialog.v3.WaitDialog;
|
import com.kongzue.dialog.v3.WaitDialog;
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
@@ -74,15 +79,17 @@ import org.locationtech.jts.geom.Geometry;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 寻宝-上报弹窗-建筑物内部
|
* 寻宝-上报弹窗-交通枢纽
|
||||||
*/
|
*/
|
||||||
public class BuildingInsideFragment extends BaseDrawerFragment implements View.OnClickListener {
|
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||||
|
public class BuildingInFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||||
private EditText etDesc;
|
private EditText etDesc;
|
||||||
private Spinner spnRoadName;
|
private Spinner spnRoadName;
|
||||||
private ImageView ivPoiVideoPicture;
|
private ImageView ivPoiVideoPicture;
|
||||||
@@ -95,9 +102,11 @@ public class BuildingInsideFragment extends BaseDrawerFragment implements View.O
|
|||||||
private StringBuilder poiVideoBuilder;
|
private StringBuilder poiVideoBuilder;
|
||||||
private LatLng rearLatLng;
|
private LatLng rearLatLng;
|
||||||
private boolean booleanExtra = true;
|
private boolean booleanExtra = true;
|
||||||
|
private TextView btnSelectFloor;
|
||||||
|
private String[] items;
|
||||||
|
|
||||||
public static BuildingInsideFragment newInstance(Bundle bundle) {
|
public static BuildingInFragment newInstance(Bundle bundle) {
|
||||||
BuildingInsideFragment fragment = new BuildingInsideFragment();
|
BuildingInFragment fragment = new BuildingInFragment();
|
||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
@@ -287,18 +296,65 @@ public class BuildingInsideFragment extends BaseDrawerFragment implements View.O
|
|||||||
private void initShowPoi() {
|
private void initShowPoi() {
|
||||||
// 添加信息:
|
// 添加信息:
|
||||||
assert getArguments() != null;
|
assert getArguments() != null;
|
||||||
|
btnSelectFloor = findViewById(R.id.btn_select_floor);
|
||||||
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
showPoiEntity = (PoiEntity) getArguments().getSerializable("poiEntity");
|
||||||
if (showPoiEntity != null) {
|
if (showPoiEntity != null) {
|
||||||
|
btnSelectFloor.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
// 显示对话框选择对应的楼层
|
||||||
|
CustomDialog
|
||||||
|
.show((AppCompatActivity) getActivity(), R.layout.dialog_select_floor, new CustomDialog.OnBindView() {
|
||||||
|
@Override
|
||||||
|
public void onBind(CustomDialog dialog, View v) {
|
||||||
|
List<String> numValues = new ArrayList<String>();
|
||||||
|
for (int i = -10; i <= 100; i++) {
|
||||||
|
if (i == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
numValues.add(i+"");
|
||||||
|
}
|
||||||
|
NumberPicker numberPicker = v.findViewById(R.id.number_picker);
|
||||||
|
numberPicker.setDisplayedValues(numValues.toArray(new String[numValues.size()]));
|
||||||
|
numberPicker.setMinValue(0);
|
||||||
|
numberPicker.setMaxValue(numValues.size()-1);
|
||||||
|
numberPicker.setValue(10); // 设置默认选择1楼
|
||||||
|
TextView confirmTv = v.findViewById(R.id.btn_select_floor_confirm);
|
||||||
|
confirmTv.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
int index = numberPicker.getValue();
|
||||||
|
int floor = Integer.parseInt(numValues.get(index));
|
||||||
|
btnSelectFloor.setTag(floor);
|
||||||
|
btnSelectFloor.setText(floor+"层");
|
||||||
|
spnRoadName.setTag(floor+"层");
|
||||||
|
dialog.doDismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setCustomLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT))
|
||||||
|
.setCustomDialogStyleId(R.style.iOSDialogAnimStyle);
|
||||||
|
}
|
||||||
|
});
|
||||||
String name = showPoiEntity.getName();//名称
|
String name = showPoiEntity.getName();//名称
|
||||||
SpinnerUtils spinnerUtils = new SpinnerUtils();
|
SpinnerUtils spinnerUtils = new SpinnerUtils();
|
||||||
String[] items = {"园区外围(含门)", "园区引导图", "园区底商"};
|
items = new String[]{"建筑物全景", "建筑物底商", "楼层引导图", "楼层选择"};
|
||||||
if (StringUtils.isEmpty(name)) {// 如果从数据获取的名称为空,则设置name显示为默认的第一个选项
|
if (StringUtils.isEmpty(name)) { // 如果从数据获取的名称为空,则设置name显示为默认的第一个选项
|
||||||
name = items[0];
|
name = items[0];
|
||||||
}
|
}
|
||||||
spinnerUtils.initSpinner(getActivity(), spnRoadName, new AdapterView.OnItemSelectedListener() {
|
spinnerUtils.initSpinner(getActivity(), spnRoadName, new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
spnRoadName.setTag(items[position]);
|
if (items[position].equals("楼层选择")) {
|
||||||
|
btnSelectFloor.setVisibility(View.VISIBLE);
|
||||||
|
btnSelectFloor.setTag(null);
|
||||||
|
btnSelectFloor.setText("楼层");
|
||||||
|
spnRoadName.setTag(null);
|
||||||
|
} else {
|
||||||
|
btnSelectFloor.setVisibility(View.GONE);
|
||||||
|
spnRoadName.setTag(items[position]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -306,6 +362,11 @@ public class BuildingInsideFragment extends BaseDrawerFragment implements View.O
|
|||||||
|
|
||||||
}
|
}
|
||||||
}, name, items);
|
}, name, items);
|
||||||
|
if (name.endsWith("层")) {
|
||||||
|
btnSelectFloor.setVisibility(View.VISIBLE);
|
||||||
|
btnSelectFloor.setText(name);
|
||||||
|
btnSelectFloor.setTag(name.replace("层", ""));
|
||||||
|
}
|
||||||
String geoWkt = showPoiEntity.getGeoWkt();
|
String geoWkt = showPoiEntity.getGeoWkt();
|
||||||
if (geoWkt != null) {
|
if (geoWkt != null) {
|
||||||
String geo = Geohash.getInstance().decode(geoWkt);
|
String geo = Geohash.getInstance().decode(geoWkt);
|
||||||
@@ -451,36 +512,44 @@ public class BuildingInsideFragment extends BaseDrawerFragment implements View.O
|
|||||||
initPoiSaveLocal(false);
|
initPoiSaveLocal(false);
|
||||||
break;
|
break;
|
||||||
case R.id.tv_short://点击拍摄
|
case R.id.tv_short://点击拍摄
|
||||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了拍摄的按钮 ,");
|
// 检查是否选择了楼层选择选项
|
||||||
double latitude = LocationLifeCycle.getInstance().getMainLocation().getLatitude();
|
checkAreaType(new View.OnClickListener() {
|
||||||
double longitude = LocationLifeCycle.getInstance().getMainLocation().getLongitude();
|
@Override
|
||||||
LatLng startLatLng = new LatLng(latitude, longitude);// 用户当前位置
|
public void onClick(View v) {
|
||||||
double geometry = GeometryTools.distanceToDouble(startLatLng, latLng);// 起點 于用戶的距離
|
if (spnRoadName.getTag()!=null) { // 用户已经设置楼层信息
|
||||||
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);// 終點于用戶的距離
|
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了拍摄的按钮 ,");
|
||||||
if (geometry > rearGeometry) {//用戶在终点开始作业
|
double latitude = LocationLifeCycle.getInstance().getMainLocation().getLatitude();
|
||||||
if (rearGeometry > 5000) {
|
double longitude = LocationLifeCycle.getInstance().getMainLocation().getLongitude();
|
||||||
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
LatLng startLatLng = new LatLng(latitude, longitude);// 用户当前位置
|
||||||
return;
|
double geometry = GeometryTools.distanceToDouble(startLatLng, latLng);// 起點 于用戶的距離
|
||||||
|
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);// 終點于用戶的距離
|
||||||
|
if (geometry > rearGeometry) {//用戶在终点开始作业
|
||||||
|
if (rearGeometry > 5000) {
|
||||||
|
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {//用户在起点开始作业
|
||||||
|
if (geometry > 5000) {
|
||||||
|
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Intent intents = new Intent(getActivity(), PicturesActivity.class);
|
||||||
|
File filePath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
||||||
|
intents.putExtra(Constant.INTENT_JPG_PATH, filePath.getAbsolutePath());
|
||||||
|
intents.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
|
||||||
|
intents.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
||||||
|
intents.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
|
||||||
|
int gpsRssi = LocationLifeCycle.getInstance().getTencentLocation().getGPSRssi();
|
||||||
|
if (gpsRssi == 0) {
|
||||||
|
intents.putExtra(Constant.INTENT_BOOLEAN, false);
|
||||||
|
} else {
|
||||||
|
intents.putExtra(Constant.INTENT_BOOLEAN, true);
|
||||||
|
}
|
||||||
|
startActivityForResult(intents, 0x101);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {//用户在起点开始作业
|
});
|
||||||
if (geometry > 5000) {
|
|
||||||
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Intent intents = new Intent(getActivity(), PicturesActivity.class);
|
|
||||||
File filePath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
|
|
||||||
intents.putExtra(Constant.INTENT_JPG_PATH, filePath.getAbsolutePath());
|
|
||||||
intents.putExtra(Constant.INTENT_TYPE, showPoiEntity.getType());
|
|
||||||
intents.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
|
|
||||||
intents.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
|
|
||||||
int gpsRssi = LocationLifeCycle.getInstance().getTencentLocation().getGPSRssi();
|
|
||||||
if (gpsRssi == 0) {
|
|
||||||
intents.putExtra(Constant.INTENT_BOOLEAN, false);
|
|
||||||
} else {
|
|
||||||
intents.putExtra(Constant.INTENT_BOOLEAN, true);
|
|
||||||
}
|
|
||||||
startActivityForResult(intents, 0x101);
|
|
||||||
break;
|
break;
|
||||||
case R.id.tv_combo://自动连拍:
|
case R.id.tv_combo://自动连拍:
|
||||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了自动连拍的按钮 ,");
|
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了自动连拍的按钮 ,");
|
||||||
@@ -513,6 +582,10 @@ public class BuildingInsideFragment extends BaseDrawerFragment implements View.O
|
|||||||
startActivityForResult(intent, 0x102);
|
startActivityForResult(intent, 0x102);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_poi_video_upload:
|
case R.id.btn_poi_video_upload:
|
||||||
|
if (spnRoadName.getTag() == null) {
|
||||||
|
com.github.lazylibrary.util.ToastUtils.showToast(getActivity(), "没有POI名称,无法保存!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了上传的按钮 ,");
|
poiVideoBuilder.append(TimestampUtil.time()).append(",").append("点击了上传的按钮 ,");
|
||||||
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
|
PoiEntity poiEntity = initPoiEntityByUI(showPoiEntity);
|
||||||
if (poiEntity.getTaskStatus() == 1 || poiEntity.getTaskStatus() == 2 || poiEntity.getTaskStatus() == 0 || poiEntity.getTaskStatus() == 5) {
|
if (poiEntity.getTaskStatus() == 1 || poiEntity.getTaskStatus() == 2 || poiEntity.getTaskStatus() == 0 || poiEntity.getTaskStatus() == 5) {
|
||||||
@@ -525,6 +598,34 @@ public class BuildingInsideFragment extends BaseDrawerFragment implements View.O
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkAreaType(View.OnClickListener listener) {
|
||||||
|
String message;
|
||||||
|
if (spnRoadName.getTag() == null || spnRoadName.getTag().toString().endsWith("层")) { // 名称下拉框为空,说明选择了 楼层选择,但是没选择楼层层数
|
||||||
|
message = "请先选择楼层!";
|
||||||
|
if (spnRoadName.getTag()!=null&&spnRoadName.getTag().toString().endsWith("层")) { // 如果当前spn的tag是X层这样的tag,说明已经选择了楼层层数
|
||||||
|
message = "请首先拍摄楼层证明";
|
||||||
|
}
|
||||||
|
MessageDialog.show((AppCompatActivity) getActivity(), "提示", message)
|
||||||
|
.setCustomDialogStyleId(R.style.iOSDialogAnimStyle)
|
||||||
|
.setAlign(BaseDialog.ALIGN.DEFAULT)
|
||||||
|
.setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
|
if (spnRoadName.getTag()!=null) { // 只有tag为非空时,才可以继续走拍照流程
|
||||||
|
listener.onClick(v);
|
||||||
|
}
|
||||||
|
if (baseDialog.isShow) {
|
||||||
|
baseDialog.doDismiss();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else { // 名称下拉框选项不为空,说明选择的不是 楼层选择 选项
|
||||||
|
listener.onClick(spnRoadName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void initPoiSaveLocal(boolean isLocal) {
|
public void initPoiSaveLocal(boolean isLocal) {
|
||||||
if (spnRoadName.getTag() == null) {
|
if (spnRoadName.getTag() == null) {
|
||||||
com.github.lazylibrary.util.ToastUtils.showToast(getActivity(), "没有POI名称,无法保存!");
|
com.github.lazylibrary.util.ToastUtils.showToast(getActivity(), "没有POI名称,无法保存!");
|
||||||
@@ -749,7 +850,7 @@ public class BuildingInsideFragment extends BaseDrawerFragment implements View.O
|
|||||||
String newPoiEntity = new Gson().toJson(poiEntity);
|
String newPoiEntity = new Gson().toJson(poiEntity);
|
||||||
//以键值对的形式添加新值。
|
//以键值对的形式添加新值。
|
||||||
edit.putString("poiEntity", newPoiEntity);
|
edit.putString("poiEntity", newPoiEntity);
|
||||||
edit.putInt("roadVideoType", 3);
|
edit.putInt("roadVideoType", 2);
|
||||||
//提交新值。必须执行,否则前面的操作都无效。
|
//提交新值。必须执行,否则前面的操作都无效。
|
||||||
edit.apply();
|
edit.apply();
|
||||||
Log.d("TAG", "initRoadSharePre: " + newPoiEntity);
|
Log.d("TAG", "initRoadSharePre: " + newPoiEntity);
|
||||||
@@ -847,8 +948,10 @@ public class BuildingInsideFragment extends BaseDrawerFragment implements View.O
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
protected PoiEntity initPoiEntityByUI(PoiEntity poiEntity) {
|
||||||
String roadName = spnRoadName.getTag().toString();
|
if (spnRoadName.getTag()!=null) {
|
||||||
poiEntity.setName(roadName);
|
String roadName = spnRoadName.getTag().toString();
|
||||||
|
poiEntity.setName(roadName);
|
||||||
|
}
|
||||||
// if (!roadName.equals("")) {
|
// if (!roadName.equals("")) {
|
||||||
// poiEntity.setName(roadName);
|
// poiEntity.setName(roadName);
|
||||||
// } else {
|
// } else {
|
||||||
@@ -22,10 +22,8 @@ import android.view.Window;
|
|||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.EditText;
|
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
@@ -53,20 +51,16 @@ import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
|||||||
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
||||||
import com.kongzue.dialog.util.BaseDialog;
|
import com.kongzue.dialog.util.BaseDialog;
|
||||||
import com.kongzue.dialog.util.DialogSettings;
|
import com.kongzue.dialog.util.DialogSettings;
|
||||||
import com.kongzue.dialog.v3.CustomDialog;
|
|
||||||
import com.kongzue.dialog.v3.MessageDialog;
|
import com.kongzue.dialog.v3.MessageDialog;
|
||||||
import com.kongzue.dialog.v3.ShareDialog;
|
import com.kongzue.dialog.v3.ShareDialog;
|
||||||
import com.lzy.okgo.OkGo;
|
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
import com.lzy.okgo.model.Progress;
|
import com.lzy.okgo.model.Progress;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.activity.AutoTakePictureActivity;
|
import com.navinfo.outdoor.activity.AutoTakePictureActivity;
|
||||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||||
import com.navinfo.outdoor.activity.HomeActivity;
|
|
||||||
import com.navinfo.outdoor.activity.WebActivity;
|
import com.navinfo.outdoor.activity.WebActivity;
|
||||||
import com.navinfo.outdoor.adapter.MarkerAdapter;
|
import com.navinfo.outdoor.adapter.MarkerAdapter;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.api.UserApplication;
|
|
||||||
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
import com.navinfo.outdoor.base.BaseDrawerFragment;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
import com.navinfo.outdoor.bean.GetPhoneBean;
|
import com.navinfo.outdoor.bean.GetPhoneBean;
|
||||||
@@ -79,7 +73,6 @@ import com.navinfo.outdoor.http.HttpInterface;
|
|||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
import com.navinfo.outdoor.http.UploadCallBack;
|
import com.navinfo.outdoor.http.UploadCallBack;
|
||||||
import com.navinfo.outdoor.room.ChargingPileEntity;
|
import com.navinfo.outdoor.room.ChargingPileEntity;
|
||||||
import com.navinfo.outdoor.room.PoiDatabase;
|
|
||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
import com.navinfo.outdoor.util.Geohash;
|
import com.navinfo.outdoor.util.Geohash;
|
||||||
@@ -114,13 +107,10 @@ import com.tencent.tencentmap.mapsdk.maps.model.Polygon;
|
|||||||
import com.tencent.tencentmap.mapsdk.maps.model.PolygonOptions;
|
import com.tencent.tencentmap.mapsdk.maps.model.PolygonOptions;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.Polyline;
|
import com.tencent.tencentmap.mapsdk.maps.model.Polyline;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
||||||
import com.umeng.message.UmengNotificationClickHandler;
|
|
||||||
import com.umeng.message.entity.UMessage;
|
|
||||||
|
|
||||||
import org.locationtech.jts.geom.Coordinate;
|
import org.locationtech.jts.geom.Coordinate;
|
||||||
import org.locationtech.jts.geom.Geometry;
|
import org.locationtech.jts.geom.Geometry;
|
||||||
import org.locationtech.jts.geom.MultiPoint;
|
import org.locationtech.jts.geom.MultiPoint;
|
||||||
import org.locationtech.jts.geom.Point;
|
|
||||||
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@@ -131,7 +121,6 @@ import java.text.DateFormat;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1230,10 +1219,10 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
TrafficHubFragment trafficHubFragment = TrafficHubFragment.newInstance(bundle);
|
TrafficHubFragment trafficHubFragment = TrafficHubFragment.newInstance(bundle);
|
||||||
showSlidingFragment(trafficHubFragment);
|
showSlidingFragment(trafficHubFragment);
|
||||||
} else if (roadVideoType == 2) {
|
} else if (roadVideoType == 2) {
|
||||||
AreaHubFragment areaHubFragment = AreaHubFragment.newInstance(bundle);
|
BuildingInFragment areaHubFragment = BuildingInFragment.newInstance(bundle);
|
||||||
showSlidingFragment(areaHubFragment);
|
showSlidingFragment(areaHubFragment);
|
||||||
} else if (roadVideoType == 3) {
|
} else if (roadVideoType == 3) {
|
||||||
BuildingInsideFragment buildingInsideFragment = BuildingInsideFragment.newInstance(bundle);
|
AreaHubFragment buildingInsideFragment = AreaHubFragment.newInstance(bundle);
|
||||||
showSlidingFragment(buildingInsideFragment);
|
showSlidingFragment(buildingInsideFragment);
|
||||||
}
|
}
|
||||||
initRemovePoiSharePre();
|
initRemovePoiSharePre();
|
||||||
@@ -1486,7 +1475,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
showSlidingFragment(areaHubFragment);
|
showSlidingFragment(areaHubFragment);
|
||||||
XLog.d("点击弹窗上的区域设施");
|
XLog.d("点击弹窗上的区域设施");
|
||||||
} else if (item.getText().equals("建筑物内部")) {
|
} else if (item.getText().equals("建筑物内部")) {
|
||||||
BuildingInsideFragment buildingInsideFragment = BuildingInsideFragment.newInstance(bundle);
|
BuildingInFragment buildingInsideFragment = BuildingInFragment.newInstance(bundle);
|
||||||
showSlidingFragment(buildingInsideFragment);
|
showSlidingFragment(buildingInsideFragment);
|
||||||
XLog.d("点击弹窗上的建筑物内部");
|
XLog.d("点击弹窗上的建筑物内部");
|
||||||
}
|
}
|
||||||
@@ -1539,14 +1528,14 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
fragmentTransaction.hide(trafficHubFragment);
|
fragmentTransaction.hide(trafficHubFragment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(fragment instanceof AreaHubFragment)) {
|
if (!(fragment instanceof BuildingInFragment)) {
|
||||||
AreaHubFragment areaHubFragment = (AreaHubFragment) supportFragmentManager.findFragmentByTag(AreaHubFragment.class.getName());
|
BuildingInFragment areaHubFragment = (BuildingInFragment) supportFragmentManager.findFragmentByTag(BuildingInFragment.class.getName());
|
||||||
if (areaHubFragment != null) {
|
if (areaHubFragment != null) {
|
||||||
fragmentTransaction.hide(areaHubFragment);
|
fragmentTransaction.hide(areaHubFragment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(fragment instanceof BuildingInsideFragment)) {
|
if (!(fragment instanceof AreaHubFragment)) {
|
||||||
BuildingInsideFragment buildingInsideFragment = (BuildingInsideFragment) supportFragmentManager.findFragmentByTag(BuildingInsideFragment.class.getName());
|
AreaHubFragment buildingInsideFragment = (AreaHubFragment) supportFragmentManager.findFragmentByTag(AreaHubFragment.class.getName());
|
||||||
if (buildingInsideFragment != null) {
|
if (buildingInsideFragment != null) {
|
||||||
fragmentTransaction.hide(buildingInsideFragment);
|
fragmentTransaction.hide(buildingInsideFragment);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package com.navinfo.outdoor.http;
|
|||||||
public class HttpInterface {
|
public class HttpInterface {
|
||||||
// public static final String IP = "http://172.23.138.133:9999/m4";//测试接口-IP
|
// public static final String IP = "http://172.23.138.133:9999/m4";//测试接口-IP
|
||||||
public static final String IPm = "http://dtxbmaps.navinfo.com/dtxb/dev/m4";//开发接口-外网
|
public static final String IPm = "http://dtxbmaps.navinfo.com/dtxb/dev/m4";//开发接口-外网
|
||||||
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/test/m4";//测试接口-外网
|
public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/test/m4";//测试接口-外网
|
||||||
public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||||
public static final String USER_PATH = "/user/";//我的
|
public static final String USER_PATH = "/user/";//我的
|
||||||
public static final String MSG_LIST_PATH = "/msgList/";//发现
|
public static final String MSG_LIST_PATH = "/msgList/";//发现
|
||||||
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
|
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
|
||||||
|
|||||||
5
app/src/main/res/drawable/ic_baseline_add_24.xml
Normal file
5
app/src/main/res/drawable/ic_baseline_add_24.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12c0,5.52 4.48,10 10,10s10,-4.48 10,-10C22,6.48 17.52,2 12,2zM12.06,19v-2.01c-0.02,0 -0.04,0 -0.06,0c-1.28,0 -2.56,-0.49 -3.54,-1.46c-1.71,-1.71 -1.92,-4.35 -0.64,-6.29l1.1,1.1c-0.71,1.33 -0.53,3.01 0.59,4.13c0.7,0.7 1.62,1.03 2.54,1.01v-2.14l2.83,2.83L12.06,19zM16.17,14.76l-1.1,-1.1c0.71,-1.33 0.53,-3.01 -0.59,-4.13C13.79,8.84 12.9,8.5 12,8.5c-0.02,0 -0.04,0 -0.06,0v2.15L9.11,7.83L11.94,5v2.02c1.3,-0.02 2.61,0.45 3.6,1.45C17.24,10.17 17.45,12.82 16.17,14.76z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#8C8C8C"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12c0,5.52 4.48,10 10,10s10,-4.48 10,-10C22,6.48 17.52,2 12,2zM12.06,19v-2.01c-0.02,0 -0.04,0 -0.06,0c-1.28,0 -2.56,-0.49 -3.54,-1.46c-1.71,-1.71 -1.92,-4.35 -0.64,-6.29l1.1,1.1c-0.71,1.33 -0.53,3.01 0.59,4.13c0.7,0.7 1.62,1.03 2.54,1.01v-2.14l2.83,2.83L12.06,19zM16.17,14.76l-1.1,-1.1c0.71,-1.33 0.53,-3.01 -0.59,-4.13C13.79,8.84 12.9,8.5 12,8.5c-0.02,0 -0.04,0 -0.06,0v2.15L9.11,7.83L11.94,5v2.02c1.3,-0.02 2.61,0.45 3.6,1.45C17.24,10.17 17.45,12.82 16.17,14.76z"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M20.94,11c-0.46,-4.17 -3.77,-7.48 -7.94,-7.94V1h-2v2.06C6.83,3.52 3.52,6.83 3.06,11H1v2h2.06c0.46,4.17 3.77,7.48 7.94,7.94V23h2v-2.06c4.17,-0.46 7.48,-3.77 7.94,-7.94H23v-2h-2.06zM12,19c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"/>
|
||||||
|
</vector>
|
||||||
5
app/src/main/res/drawable/ic_baseline_sub_24.xml
Normal file
5
app/src/main/res/drawable/ic_baseline_sub_24.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<vector android:height="24dp" android:tint="#000000"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M19,13H5v-2h14v2z"/>
|
||||||
|
</vector>
|
||||||
14
app/src/main/res/drawable/selector_camera_switch.xml
Normal file
14
app/src/main/res/drawable/selector_camera_switch.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_pressed="true"
|
||||||
|
android:drawable="@drawable/ic_baseline_change_circle_24_press"/> <!-- pressed -->
|
||||||
|
<item android:state_focused="true"
|
||||||
|
android:drawable="@drawable/ic_baseline_change_circle_24_press"/> <!-- focused -->
|
||||||
|
<item android:state_selected="true"
|
||||||
|
android:drawable="@drawable/ic_baseline_change_circle_24_press"/>
|
||||||
|
<item android:state_checked="true"
|
||||||
|
android:drawable="@drawable/ic_baseline_change_circle_24_press"/>
|
||||||
|
<item android:state_enabled="false"
|
||||||
|
android:drawable="@drawable/ic_baseline_change_circle_24_press"/>
|
||||||
|
<item android:drawable="@drawable/ic_baseline_change_circle_24" /> <!-- default -->
|
||||||
|
</selector>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
app:layout_constraintHeight_default="percent"
|
app:layout_constraintHeight_default="percent"
|
||||||
app:layout_constraintHeight_percent="0.4"
|
app:layout_constraintHeight_percent="0.4"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintWidth_default="percent"
|
app:layout_constraintWidth_default="percent"
|
||||||
app:layout_constraintWidth_percent="0.4" />
|
app:layout_constraintWidth_percent="0.4" />
|
||||||
@@ -80,26 +80,36 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:id="@+id/iv_zoom_add"
|
android:id="@+id/layer_map_controller"
|
||||||
android:layout_width="50dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="50dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="25dp"
|
android:orientation="vertical"
|
||||||
android:src="@mipmap/zoom_add"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/btn_stop_picture"
|
android:padding="@dimen/default_widget_padding"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toTopOf="@id/btn_stop_picture"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintRight_toRightOf="parent">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_zoom_add"
|
||||||
|
android:layout_width="@dimen/default_round_widget"
|
||||||
|
android:layout_height="@dimen/default_round_widget"
|
||||||
|
android:src="@drawable/ic_baseline_add_24"
|
||||||
|
android:padding="@dimen/default_widget_padding"
|
||||||
|
android:background="@drawable/selector_round_bg"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/btn_stop_picture"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_zoom_del"
|
android:id="@+id/iv_zoom_del"
|
||||||
android:layout_width="50dp"
|
android:layout_width="@dimen/default_round_widget"
|
||||||
android:layout_height="50dp"
|
android:layout_height="@dimen/default_round_widget"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="@dimen/default_widget_padding"
|
||||||
android:src="@mipmap/zoom_del"
|
android:src="@drawable/ic_baseline_sub_24"
|
||||||
android:visibility="gone"
|
android:padding="@dimen/default_widget_padding"
|
||||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_add"
|
android:background="@drawable/selector_round_bg"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_add" />
|
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_add"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/iv_zoom_add" />
|
||||||
|
|
||||||
<!--<CheckBox
|
<!--<CheckBox
|
||||||
android:id="@+id/cb_map_type"
|
android:id="@+id/cb_map_type"
|
||||||
@@ -113,88 +123,95 @@
|
|||||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />-->
|
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />-->
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_location"
|
android:id="@+id/iv_location"
|
||||||
android:layout_width="50dp"
|
android:layout_width="@dimen/default_round_widget"
|
||||||
android:layout_height="50dp"
|
android:layout_height="@dimen/default_round_widget"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="@dimen/default_widget_padding"
|
||||||
android:background="@drawable/selector_round_bg"
|
android:src="@drawable/ic_baseline_location_searching_24"
|
||||||
android:src="@mipmap/location_auto_pic"
|
android:padding="@dimen/default_widget_padding"
|
||||||
android:padding="8dp"
|
android:background="@drawable/selector_round_bg"
|
||||||
android:visibility="gone"
|
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
||||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:id="@+id/btn_switch"
|
|
||||||
android:layout_width="36dp"
|
|
||||||
android:layout_height="36dp"
|
|
||||||
android:background="@drawable/selector_round_bg"
|
|
||||||
android:layout_marginTop="35dp"
|
|
||||||
android:src="@drawable/selector_picture_map_change"
|
|
||||||
android:padding="@dimen/default_widget_padding"
|
|
||||||
android:layout_marginRight="@dimen/default_widget_padding"
|
|
||||||
android:text="切换"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_setting"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="gone"
|
|
||||||
android:text="设置"
|
|
||||||
android:layout_marginTop="@dimen/default_widget_padding"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_switch"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"></Button>
|
|
||||||
|
|
||||||
<Switch
|
|
||||||
android:id="@+id/location_switch"
|
|
||||||
android:text="启用定位"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:checked="true"
|
|
||||||
android:padding="@dimen/default_widget_padding"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_setting"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"></Switch>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/img_navi_distance"
|
|
||||||
android:layout_width="36dp"
|
|
||||||
android:layout_height="36dp"
|
|
||||||
android:src="@drawable/selector_navi_distance"
|
|
||||||
android:background="@drawable/selector_round_bg"
|
|
||||||
android:text="按距离自动导航"
|
|
||||||
android:padding="@dimen/default_widget_padding"
|
|
||||||
android:layout_margin="@dimen/default_widget_padding"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/location_switch"/>
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/img_road_direction"
|
|
||||||
android:layout_width="36dp"
|
|
||||||
android:layout_height="36dp"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:background="@drawable/selector_round_bg"
|
|
||||||
android:text="起点方向捕捉"
|
|
||||||
android:src="@drawable/selector_direction"
|
|
||||||
android:padding="@dimen/default_widget_padding"
|
android:padding="@dimen/default_widget_padding"
|
||||||
android:layout_margin="@dimen/default_widget_padding"
|
android:layout_marginTop="@dimen/fab_margin"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
android:orientation="vertical">
|
||||||
app:layout_constraintTop_toBottomOf="@id/img_navi_distance"></ImageView>
|
<ImageView
|
||||||
|
android:id="@+id/btn_switch"
|
||||||
|
android:layout_width="@dimen/default_round_widget"
|
||||||
|
android:layout_height="@dimen/default_round_widget"
|
||||||
|
android:background="@drawable/selector_round_bg"
|
||||||
|
android:src="@drawable/selector_camera_switch"
|
||||||
|
android:padding="@dimen/default_widget_padding"
|
||||||
|
android:text="切换"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/img_location_type"
|
android:id="@+id/img_navi_distance"
|
||||||
android:layout_width="36dp"
|
android:layout_width="@dimen/default_round_widget"
|
||||||
android:layout_height="36dp"
|
android:layout_height="@dimen/default_round_widget"
|
||||||
android:background="@drawable/selector_round_bg"
|
android:src="@drawable/selector_navi_distance"
|
||||||
android:text="定位方式"
|
android:background="@drawable/selector_round_bg"
|
||||||
android:src="@drawable/selector_location_type"
|
android:text="按距离自动导航"
|
||||||
android:padding="@dimen/default_widget_padding"
|
android:padding="@dimen/default_widget_padding"
|
||||||
android:layout_margin="@dimen/default_widget_padding"
|
android:layout_marginTop="@dimen/default_widget_padding"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"/>
|
||||||
app:layout_constraintTop_toBottomOf="@id/img_road_direction"></ImageView>
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_road_direction"
|
||||||
|
android:layout_width="@dimen/default_round_widget"
|
||||||
|
android:layout_height="@dimen/default_round_widget"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:background="@drawable/selector_round_bg"
|
||||||
|
android:text="起点方向捕捉"
|
||||||
|
android:src="@drawable/selector_direction"
|
||||||
|
android:padding="@dimen/default_widget_padding"
|
||||||
|
android:layout_marginTop="@dimen/default_widget_padding"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/img_navi_distance"></ImageView>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_location_type"
|
||||||
|
android:layout_width="@dimen/default_round_widget"
|
||||||
|
android:layout_height="@dimen/default_round_widget"
|
||||||
|
android:background="@drawable/selector_round_bg"
|
||||||
|
android:text="定位方式"
|
||||||
|
android:src="@drawable/selector_location_type"
|
||||||
|
android:padding="@dimen/default_widget_padding"
|
||||||
|
android:layout_marginTop="@dimen/default_widget_padding"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/img_road_direction"></ImageView>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_setting"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:text="设置"
|
||||||
|
android:layout_marginTop="@dimen/default_widget_padding"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/btn_switch"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"></Button>
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:id="@+id/location_switch"
|
||||||
|
android:text="启用定位"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="true"
|
||||||
|
android:padding="@dimen/default_widget_padding"
|
||||||
|
android:layout_marginTop="@dimen/default_widget_padding"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/btn_setting"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"></Switch>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
android:id="@+id/radio_group_picture"
|
android:id="@+id/radio_group_picture"
|
||||||
|
|||||||
@@ -78,27 +78,36 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
<ImageView
|
android:id="@+id/layer_map_controller"
|
||||||
android:id="@+id/iv_zoom_add"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="50dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="50dp"
|
android:orientation="vertical"
|
||||||
android:layout_marginEnd="25dp"
|
|
||||||
android:src="@mipmap/zoom_add"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/btn_stop_picture"
|
android:padding="@dimen/default_widget_padding"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toTopOf="@id/btn_stop_picture"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintRight_toRightOf="parent">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_zoom_add"
|
||||||
|
android:layout_width="@dimen/default_round_widget"
|
||||||
|
android:layout_height="@dimen/default_round_widget"
|
||||||
|
android:src="@drawable/ic_baseline_add_24"
|
||||||
|
android:padding="@dimen/default_widget_padding"
|
||||||
|
android:background="@drawable/selector_round_bg"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/btn_stop_picture"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_zoom_del"
|
android:id="@+id/iv_zoom_del"
|
||||||
android:layout_width="50dp"
|
android:layout_width="@dimen/default_round_widget"
|
||||||
android:layout_height="50dp"
|
android:layout_height="@dimen/default_round_widget"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="@dimen/default_widget_padding"
|
||||||
android:src="@mipmap/zoom_del"
|
android:src="@drawable/ic_baseline_sub_24"
|
||||||
android:visibility="gone"
|
android:padding="@dimen/default_widget_padding"
|
||||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_add"
|
android:background="@drawable/selector_round_bg"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_add" />
|
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_add"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/iv_zoom_add" />
|
||||||
|
|
||||||
<!--<CheckBox
|
<!--<CheckBox
|
||||||
android:id="@+id/cb_map_type"
|
android:id="@+id/cb_map_type"
|
||||||
@@ -112,49 +121,59 @@
|
|||||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />-->
|
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />-->
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_location"
|
android:id="@+id/iv_location"
|
||||||
android:layout_width="50dp"
|
android:layout_width="@dimen/default_round_widget"
|
||||||
android:layout_height="50dp"
|
android:layout_height="@dimen/default_round_widget"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="@dimen/default_widget_padding"
|
||||||
android:src="@mipmap/mine_location"
|
android:src="@drawable/ic_baseline_location_searching_24"
|
||||||
android:visibility="gone"
|
android:padding="@dimen/default_widget_padding"
|
||||||
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
android:background="@drawable/selector_round_bg"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />
|
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:id="@+id/btn_switch"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="25dp"
|
|
||||||
android:layout_marginEnd="25dp"
|
|
||||||
android:text="切换"
|
|
||||||
android:padding="@dimen/default_widget_padding"
|
|
||||||
android:src="@mipmap/switcher"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:layout_marginTop="@dimen/fab_margin"
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_setting"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="设置"
|
|
||||||
android:layout_marginTop="@dimen/default_widget_padding"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_switch"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"></Button>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/img_location_type"
|
|
||||||
android:layout_width="36dp"
|
|
||||||
android:layout_height="36dp"
|
|
||||||
android:background="@drawable/selector_round_bg"
|
|
||||||
android:text="定位方式"
|
|
||||||
android:src="@drawable/selector_location_type"
|
|
||||||
android:padding="@dimen/default_widget_padding"
|
android:padding="@dimen/default_widget_padding"
|
||||||
android:layout_margin="@dimen/default_widget_padding"
|
android:orientation="vertical">
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
<ImageView
|
||||||
app:layout_constraintTop_toBottomOf="@id/btn_setting"></ImageView>
|
android:id="@+id/btn_switch"
|
||||||
|
android:layout_width="@dimen/default_round_widget"
|
||||||
|
android:layout_height="@dimen/default_round_widget"
|
||||||
|
android:background="@drawable/selector_round_bg"
|
||||||
|
android:text="切换"
|
||||||
|
android:padding="@dimen/default_widget_padding"
|
||||||
|
android:src="@drawable/selector_camera_switch"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_setting"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="设置"
|
||||||
|
android:layout_marginTop="@dimen/default_widget_padding"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/btn_switch"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"></Button>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_location_type"
|
||||||
|
android:layout_width="@dimen/default_round_widget"
|
||||||
|
android:layout_height="@dimen/default_round_widget"
|
||||||
|
android:background="@drawable/selector_round_bg"
|
||||||
|
android:text="定位方式"
|
||||||
|
android:src="@drawable/selector_location_type"
|
||||||
|
android:padding="@dimen/default_widget_padding"
|
||||||
|
android:layout_marginTop="@dimen/default_widget_padding"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/btn_setting"></ImageView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
android:id="@+id/radio_group_picture"
|
android:id="@+id/radio_group_picture"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<dimen name="top_pind_sp">20dp</dimen>
|
<dimen name="top_pind_sp">20dp</dimen>
|
||||||
<dimen name="fab_margin">16dp</dimen>
|
<dimen name="fab_margin">16dp</dimen>
|
||||||
<dimen name="default_widget_padding">6dp</dimen>
|
<dimen name="default_widget_padding">6dp</dimen>
|
||||||
|
<dimen name="default_round_widget">42dp</dimen>
|
||||||
|
|
||||||
<dimen name="navigation_line_width">10dp</dimen>
|
<dimen name="navigation_line_width">10dp</dimen>
|
||||||
<dimen name="navigation_line_margin_left">30dp</dimen>
|
<dimen name="navigation_line_margin_left">30dp</dimen>
|
||||||
|
|||||||
Reference in New Issue
Block a user