fix: 修改自动采集时大图模式不跟随当前位置移动地图的问题

This commit is contained in:
xiaoyan 2022-08-12 15:22:53 +08:00
parent 0fe733d138
commit 0459d1e87c
3 changed files with 10 additions and 8 deletions

View File

@ -10,7 +10,7 @@ android {
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 30 targetSdkVersion 30
versionCode 25 versionCode 25
versionName "8.220809" versionName "8.220812"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
lintOptions { lintOptions {

View File

@ -456,7 +456,6 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
@Override @Override
public boolean onFling(float v, float v1) { public boolean onFling(float v, float v1) {
setLocMarkerStyle(MyLocationStyle.LOCATION_TYPE_FOLLOW_NO_CENTER);
return false; return false;
} }
@ -472,6 +471,9 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
@Override @Override
public boolean onDown(float v, float v1) { public boolean onDown(float v, float v1) {
if (isMapSlide) {
setLocMarkerStyle(MyLocationStyle.LOCATION_TYPE_FOLLOW_NO_CENTER);
}
return false; return false;
} }
@ -1385,10 +1387,10 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
// 设置当前界面亮度 // 设置当前界面亮度
private void setWindowBrightness(int brightness) { private void setWindowBrightness(int brightness) {
Window window = getWindow(); // Window window = getWindow();
WindowManager.LayoutParams lp = window.getAttributes(); // WindowManager.LayoutParams lp = window.getAttributes();
lp.screenBrightness = brightness / 255.0f; // lp.screenBrightness = brightness / 255.0f;
window.setAttributes(lp); // window.setAttributes(lp);
} }
private TencentLocation obtainTecentLocation(LatLng latLng) { private TencentLocation obtainTecentLocation(LatLng latLng) {
@ -1643,7 +1645,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
return; return;
} }
TencentLocation tencentLocation = (TencentLocation) msg.obj; TencentLocation tencentLocation = (TencentLocation) msg.obj;
if (tencentMap != null && !isMapSlide) { if (tencentMap != null && ivLocation!=null && !ivLocation.isEnabled()) { // 当定位按钮禁用
CameraUpdate cameraSigma = CameraUpdateFactory.newCameraPosition(new CameraPosition( CameraUpdate cameraSigma = CameraUpdateFactory.newCameraPosition(new CameraPosition(
new LatLng(tencentLocation.getLatitude(), tencentLocation.getLongitude()), //中心点坐标地图目标经纬度 new LatLng(tencentLocation.getLatitude(), tencentLocation.getLongitude()), //中心点坐标地图目标经纬度
17, //目标缩放级别 17, //目标缩放级别

View File

@ -783,7 +783,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
if (getPhoneBean.getCode() == 200) { if (getPhoneBean.getCode() == 200) {
String code = getPhoneBean.getBody().getCode(); String code = getPhoneBean.getBody().getCode();
Integer telLength = getPhoneBean.getBody().getTelLength(); Integer telLength = getPhoneBean.getBody().getTelLength();
if (!code.equals(Constant.CODE)) { if (!Constant.CODE.equals(code)) {
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "此地区区号为" + code + ",请手动修改", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override