想要在我的应用程序中显示谷歌地图像地球一样谷歌地球

时间:2018-03-12 06:26:47

标签: android google-maps google-earth

我想创建一个像google earth这样的应用程序。所以想要在谷歌地球应用程序这样的领域中显示谷歌地图。有什么办法吗?

1 个答案:

答案 0 :(得分:0)

ImageView globe = (ImageView) findViewById(R.id.globe);

AnimationDrawable animation = new AnimationDrawable();
animation.setOneShot(true);

Resources res = this.getResources();

while (from <= to) {
    String name = "globe_" + String.format("%03d", from);
    int globeId = res.getIdentifier(name, "drawable",
            this.getPackageName());
    animation.addFrame(res.getDrawable(globeId), 200);
    from++;
}

globe.setBackgroundDrawable(animation);
globe.post(new Runnable(){
        @Override
        public void run() {
            animation.start();
        }
});
相关问题