This commit is contained in:
lixiaopeng
2020-11-02 15:15:42 +08:00
parent bcb507fe11
commit 17015329c2
2 changed files with 35 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ package com.mogo.module.tanlu.fragment;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Rect;
import android.location.LocationManager;
import android.net.Uri;
@@ -103,6 +104,7 @@ import com.mogo.service.windowview.IMogoTopViewStatusListener;
import com.mogo.utils.NetworkUtils;
import com.mogo.utils.TipDrawable;
import com.mogo.utils.TipToast;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.WorkThreadHandler;
import com.mogo.utils.logger.Logger;
//import com.shuyu.gsyvideoplayer.GSYVideoManager;
@@ -515,7 +517,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
* 唤醒语音
*/
private IMogoIntentListener mogoIntentListener = (intentStr, intent) -> {
AIAssist.getInstance(getContext()).speakTTSVoice(searchingVoiceStrings[mRandom.nextInt(3)] , null);
AIAssist.getInstance(getContext()).speakTTSVoice(searchingVoiceStrings[mRandom.nextInt(3)], null);
if (TanluServiceManager.getMogoStatusManager().isMainPageOnResume()) {
// 直接执行相关查询操作
Logger.d(TAG, "智慧出行在前台,可直接分享--->");
@@ -1142,21 +1144,46 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
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() {
//添加图片动画
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_circle_image, null);
MarkerShowEntity markerShowEntityAnimation = new MarkerShowEntity();
markerShowEntityAnimation.setTextContent(address);
markerShowEntityAnimation.setMarkerType(TanluConstants.MODEL_NAME);
MogoMarkerOptions options = new MogoMarkerOptions()
.object(markerShowEntityAnimation)
.icon(bitmap)
.anchor(0.5f, 0.5f)
.latitude(lat)
.owner(TanluConstants.MODEL_NAME)
.longitude(lon);
IMogoMarker mogoAnimationMarker = mMarkerManager.addMarker(TanluConstants.MODEL_NAME, options);
mogoAnimationMarker.startScaleAnimation(0, 4f, 0, 4f, 500, new LinearInterpolator(), new OnMarkerAnimationListener() {
@Override
public void onAnimStart() {
Logger.d(TAG, " onAnimStart ---1----> ");
}
@Override
public void onAnimEnd() {
if (mogoMarker.isDestroyed()) {
return;
}
mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null);
mogoAnimationMarker.destroy();
}
});
//开启动画
// mogoMarker.startScaleAnimationWithAlpha(0, 1.2f, 0, 1.2f, 0f, 1f, 300, new LinearInterpolator(), new OnMarkerAnimationListener() {
// @Override
// public void onAnimStart() {
// Logger.d(TAG, " onAnimStart ---1----> ");
// }
//
// @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 ---->");

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB