这是我向地图添加标记的方法: marker = map.addMarker(new MarkerOptions() .position(point) .title(title) .snippet(text) .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker)) );解决方案在Google Play服务4.0+中,您可以将Marker.setAlpha与Handler结合使用,每隔几毫秒发布一次Runnable.代码将类似于我在这里的答案将标记从屏幕顶部缓慢拖放到android map V2上的位置.只是setAlpha而不是setPosition,您就在回家的路上.How would one fade in and out a GoogleMap marker?This is how I add a marker to the Map: marker = map.addMarker(new MarkerOptions() .position(point) .title(title) .snippet(text) .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker)) ); 解决方案 With Google Play services 4.0+ you can use Marker.setAlpha in conjunction with Handler that posts some Runnable every few milliseconds.The code will be similar to my answer here Drop marker slowly from top of screen to location on android map V2. Just setAlpha instead of setPosition and you are on your way home. 这篇关于Maps v2标记动画-淡入和淡出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-06 14:06