void animateMarker(final Bitmap bitmap, final Marker marker) {
if (marker == null)
return;
ValueAnimator animator = ValueAnimator.ofFloat(0.1f, 1);
animator.setDuration(1000);
animator.setStartDelay(500);
animator.setInterpolator(new BounceInterpolator());
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float scale = (float) animation.getAnimatedValue();
try {
marker.setIcon(BitmapDescriptorFactory.fromBitmap(DisplayUtils.resizeMarkerIcon(bitmap, Math.round(scale * 75), Math.round(scale * 75))));
} catch (IllegalArgumentException ex) {
Log.e("MAPP", ex.getMessage());
}
}
});
animator.start();
}
MainMapFragment.java 文件源码
java
阅读 40
收藏 0
点赞 0
评论 0
项目:FastFoodFinder
作者:
评论列表
文章目录