Merge branch 'dev' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into dev

This commit is contained in:
wangcongtao
2020-09-18 09:45:56 +08:00
67 changed files with 209 additions and 183 deletions

View File

@@ -1086,7 +1086,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
if (!NetworkUtils.isConnected(getContext())) { //没有网络
TipToast.shortTip("分享失败,请检查网络",new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_fail)));
} else if(TanluServiceManager.getMogoStatusManager().isMainPageOnResume()) {
} else {
float bearing = TanluServiceManager.getLocationClient().getLastKnowLocation().getBearing(); //角度
Logger.d(TAG, "onMarkerInfo event.type = " + event.type + " >>event.lat = " + event.lat + " >>event.lon = " + event.lon + " >>event.imageUrl =" + event.imageUrl);
String poiType = event.type;
@@ -1095,49 +1095,51 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
Logger.d(TAG, "onMarkerInfo share poiType = " + poiType + " --isCumtom = " + isCumtom + " >> getMathRandom = " + getMathRandom() + " >>> bearing = " + bearing + ">>>fromType = " + fromType);
if (!fromType.equals("5")) {
if (isCumtom && !poiType.equals("0")) {
double lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude();
double lon = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude();
Log.d(TAG, "onMarkerInfo lat = " + lat + " >>>> lon = " + lon);
String cityName = TanluServiceManager.getLocationClient().getLastKnowLocation().getCityName();
String address = TanluServiceManager.getLocationClient().getLastKnowLocation().getAddress();
MarkerExploreWay markerExploreWay = new MarkerExploreWay();
markerExploreWay.setCityName(cityName);
markerExploreWay.setPoiType(poiType);
MarkerLocation markerLocation = new MarkerLocation();
markerLocation.setLat(lat);
markerLocation.setLon(lon);
markerLocation.setAddress(address);
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
markerShowEntity.setBindObj(markerExploreWay);
markerShowEntity.setTextContent(address);
markerShowEntity.setMarkerType(TanluConstants.MODEL_NAME);
markerShowEntity.setMarkerLocation(markerLocation);
// 不管在不在前台,都要提示分享成功
AIAssist.getInstance(getContext()).speakTTSVoice((
String.format(voiceShareSuccessTts, getMathRandom())), null);
TipToast.shortTip("分享成功",new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_success)));
TipToast.shortTip("分享成功", new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_success)));
if(TanluServiceManager.getMogoStatusManager().isMainPageOnResume()) {
double lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude();
double lon = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude();
Log.d(TAG, "onMarkerInfo lat = " + lat + " >>>> lon = " + lon);
String cityName = TanluServiceManager.getLocationClient().getLastKnowLocation().getCityName();
String address = TanluServiceManager.getLocationClient().getLastKnowLocation().getAddress();
MarkerExploreWay markerExploreWay = new MarkerExploreWay();
markerExploreWay.setCityName(cityName);
markerExploreWay.setPoiType(poiType);
IMogoMarker mogoMarker = TanluServiceManager.getServiceApis().getMarkerService().drawMarker(markerShowEntity);
mogoMarker.setClickable(false);
MarkerLocation markerLocation = new MarkerLocation();
markerLocation.setLat(lat);
markerLocation.setLon(lon);
markerLocation.setAddress(address);
//开启动画
mogoMarker.startScaleAnimationWithAlpha(0, 1.2f, 0, 1.2f, 0f, 1f, 300, new LinearInterpolator(), new OnMarkerAnimationListener() {
@Override
public void onAnimStart() {
Logger.d(TAG, " onAnimStart ---1----> ");
}
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
markerShowEntity.setBindObj(markerExploreWay);
markerShowEntity.setTextContent(address);
markerShowEntity.setMarkerType(TanluConstants.MODEL_NAME);
markerShowEntity.setMarkerLocation(markerLocation);
@Override
public void onAnimEnd() {
if (mogoMarker.isDestroyed()) {
return;
IMogoMarker mogoMarker = TanluServiceManager.getServiceApis().getMarkerService().drawMarker(markerShowEntity);
mogoMarker.setClickable(false);
//开启动画
mogoMarker.startScaleAnimationWithAlpha(0, 1.2f, 0, 1.2f, 0f, 1f, 300, new LinearInterpolator(), new OnMarkerAnimationListener() {
@Override
public void onAnimStart() {
Logger.d(TAG, " onAnimStart ---1----> ");
}
mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null);
}
});
@Override
public void onAnimEnd() {
if (mogoMarker.isDestroyed()) {
return;
}
mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null);
}
});
}
} else {
Logger.e(TAG, "onMarkerInfo share onCompleted poiType = -1 --- else ---->");
}