我想在Google地图中实现搜索进度,如下图所示

时间:2013-08-06 11:18:45

标签: android google-maps

enter image description here 我需要一个透明的圆圈来显示Google地图上的搜索进度,这会增加每秒的大小,并在搜索过程中为其添加一些标记。

3 个答案:

答案 0 :(得分:1)

创建一个看起来像这样的图像,使用透明背景,将其放在地图上,然后每隔毫秒左右向右旋转一下。

如果你提供了更多你需要知道的细节,也许我能够回答它。

答案 1 :(得分:1)

***最后我得到了解决方案。我只是简单地使用一个图像并将其设置在地图屏幕上并在其上添加动画,它完美无缺。 这是我的地图类的代码。 progressBar =(ImageView)findViewById(R.id.mapprogressbar);

    RotateAnimation rotateAnimation1 = new RotateAnimation(0, 360,
            Animation.RELATIVE_TO_SELF, 0.5f,
            Animation.RELATIVE_TO_SELF, 0.5f);
    rotateAnimation1.setInterpolator(new LinearInterpolator());
    rotateAnimation1.setDuration(1000);
    rotateAnimation1.setRepeatCount(1000);
    progressBar.startAnimation(rotateAnimation1);

这满足了我的需要**

答案 2 :(得分:0)

使用SweepGradient http://developer.android.com/reference/android/graphics/SweepGradient.html,使用setShader将其设置为Canvas,最后绘制弧