opt
This commit is contained in:
@@ -10,7 +10,9 @@ import com.amap.api.maps.model.BitmapDescriptorFactory;
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.amap.api.maps.model.Marker;
|
||||
import com.amap.api.maps.model.MarkerOptions;
|
||||
import com.amap.api.maps.model.animation.AlphaAnimation;
|
||||
import com.amap.api.maps.model.animation.Animation;
|
||||
import com.amap.api.maps.model.animation.AnimationSet;
|
||||
import com.amap.api.maps.model.animation.ScaleAnimation;
|
||||
import com.amap.api.maps.model.animation.TranslateAnimation;
|
||||
import com.amap.api.maps.utils.overlay.MovingPointOverlay;
|
||||
@@ -382,6 +384,47 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
|
||||
mMarker.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startScaleAnimationWithAlpha( float fromX, float toX, float fromY, float toY, float fromAlpha, float toAlpha, int duration, Interpolator interpolator, OnMarkerAnimationListener listener ) {
|
||||
if ( isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
ScaleAnimation animationScale = new ScaleAnimation( fromX, toX, fromY, toY );
|
||||
animationScale.setFillMode( Animation.FILL_MODE_FORWARDS );
|
||||
|
||||
AlphaAnimation alphaAnimation = new AlphaAnimation( fromAlpha, toAlpha );
|
||||
alphaAnimation.setFillMode( Animation.FILL_MODE_FORWARDS );
|
||||
|
||||
AnimationSet animationSet = new AnimationSet( true );
|
||||
animationSet.setDuration( duration );
|
||||
animationSet.setInterpolator( interpolator);
|
||||
animationSet.setAnimationListener( new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart() {
|
||||
if ( isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
if ( listener != null ) {
|
||||
listener.onAnimStart();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd() {
|
||||
if ( isDestroyed() ) {
|
||||
return;
|
||||
}
|
||||
if ( listener != null ) {
|
||||
listener.onAnimEnd();
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
mMarker.setAnimation( animationSet );
|
||||
mMarker.startAnimation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startJumpAnimation( float high, long duration, Interpolator interpolator, OnMarkerAnimationListener listener ) {
|
||||
if ( isDestroyed() || high <= 0.0f || interpolator == null || duration < 0 ) {
|
||||
|
||||
@@ -267,9 +267,33 @@ public interface IMogoMarker {
|
||||
Interpolator interpolator,
|
||||
OnMarkerAnimationListener listener );
|
||||
|
||||
/**
|
||||
* 缩放动画
|
||||
*
|
||||
* @param fromX
|
||||
* @param toX
|
||||
* @param fromY
|
||||
* @param toY
|
||||
* @param fromAlpha
|
||||
* @param toAlpha
|
||||
* @param duration
|
||||
* @param interpolator
|
||||
* @param listener
|
||||
*/
|
||||
void startScaleAnimationWithAlpha( float fromX,
|
||||
float toX,
|
||||
float fromY,
|
||||
float toY,
|
||||
float fromAlpha,
|
||||
float toAlpha,
|
||||
int duration,
|
||||
Interpolator interpolator,
|
||||
OnMarkerAnimationListener listener );
|
||||
|
||||
|
||||
/**
|
||||
* 弹跳动画
|
||||
*
|
||||
* @param high
|
||||
* @param duration
|
||||
* @param interpolator
|
||||
@@ -278,7 +302,7 @@ public interface IMogoMarker {
|
||||
void startJumpAnimation( float high,
|
||||
long duration,
|
||||
Interpolator interpolator,
|
||||
OnMarkerAnimationListener listener);
|
||||
OnMarkerAnimationListener listener );
|
||||
|
||||
/**
|
||||
* 是否是否可点击
|
||||
|
||||
@@ -713,6 +713,7 @@ public class MogoServices implements IMogoMapListener,
|
||||
break;
|
||||
case ACC_STATUS:
|
||||
if ( isTrue ) {
|
||||
initLocationServiceProcess( mContext );
|
||||
mADASController.showADAS();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -388,7 +388,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
return;
|
||||
}
|
||||
IMogoMarker marker = drawMapMarker( entity, ServiceConst.MARKER_Z_INDEX_HIGH );
|
||||
marker.startScaleAnimation( 0, 1.2f, 0, 1.2f, 300, new AccelerateInterpolator(), new OnMarkerAnimationListener() {
|
||||
marker.startScaleAnimationWithAlpha( 0, 1.2f, 0, 1.2f, 0f, 1f,300, new AccelerateInterpolator(), new OnMarkerAnimationListener() {
|
||||
@Override
|
||||
public void onAnimStart() {
|
||||
Logger.d( TAG, " onAnimStart ---1----> " );
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_service_marker_anchor_size">20dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">8dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">100px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">117px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="module_service_marker_anchor_size">16dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
|
||||
<dimen name="module_service_marker_dot_marginTop">2dp</dimen>
|
||||
<dimen name="module_service_marker_bubble_width">56px</dimen>
|
||||
<dimen name="module_service_marker_bubble_height">65px</dimen>
|
||||
<dimen name="module_service_marker_bubble_icon_width">35px</dimen>
|
||||
|
||||
Reference in New Issue
Block a user