如何使用覆盖的UI元素显示股票全景图活动? [英] How to show a stock panorama activity with UI elements overlayed?

查看:259
本文介绍了如何使用覆盖的UI元素显示股票全景图活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Google Panorama API



我使用与大多数教程相同的代码:

  @Override 
public void onConnected(Bundle bundle){
Panorama.PanoramaApi.loadPanoramaInfo(GOOGLE_CLIENT,Uri.parse(url))。setResultCallback(
new ResultCallback< PanoramaApi.PanoramaResult>(){
@Override
public void onResult(PanoramaApi.PanoramaResult result){
if(result.getStatus()。isSuccess()){
Intent intent = result.getViewerIntent();
if(intent!= null){
startActivity(intent);
}
}
}
});
}

实际上,我不仅有一个球体,而且还有5个左右。我想能够在图像之间切换,点击叠加在图像上的菜单项。



由于显示球体的实际活动不是由我定义的,而是从接收到的意图开始的在成功回调中,我不知道如何实现这一点,API似乎没有提供更多的可能性。



我猜我甚至无法显示对话框顶部的球。



有人对我有什么想法吗?我会很感激的。



注意:这个问题故意与这个 SO post 。解决方案:切换到最近的Google API - 解决方案:切换到最近的Google API - Google VR - 可以在视图中嵌入球形360°图像,而不是启动活动通过一个意图,哪一个无法控制。



注意:仍然标记为实验性的,但是作为VR API的一部分,这看起来像是正在积极开发的库。
另一个优点:这是开源的,而旧的
PanoramaGL OpenPanodroid 。这两个图书馆都没有维护多年,并没有什么大惊喜,结果跟不上谷歌图书馆。


I am successfully showing a spherical image using the Google Panorama API

I am using the same code as most tutorials do:

@Override
    public void onConnected(Bundle bundle){
        Panorama.PanoramaApi.loadPanoramaInfo(GOOGLE_CLIENT,Uri.parse(url)).setResultCallback(
                new ResultCallback<PanoramaApi.PanoramaResult>(){
                    @Override
                    public void onResult(PanoramaApi.PanoramaResult result){
                        if (result.getStatus().isSuccess()){
                            Intent intent = result.getViewerIntent();
                            if (intent != null){
                                startActivity(intent);
                            }
                        }
                    }
                });
    }

Actually, I do not only have one sphere but around 5. I would like to be able to switch between the images clicking on menu items overlayed over the images.

Since the actual activity showing the sphere is not defined by me but started through an intent received in the success callback I have no idea how I can achieve this and the API does not seem to offer much more possibilities.

I guess I can not even show a dialog on top of the sphere.

Does anybody have any ideas for me? I'd appreciate it a lot

Note: This question purposely is phrased very similarly to this SO post.

解决方案

Solution: Switch to the more recent Google API – Google VR – with which it is possible to embed spherical 360° images in a view instead of starting an activity through an intent, which one has no control of.

Note: The API is still labeled experimental but being part of the VR API this looks like the library being actively developed. Another advantage: This is open source while the older Google Panorama API is part of google play services, which is not.

PS: Before I looked into these libraries I tested PanoramaGL and OpenPanodroid. Both libraries are not maintained for years and it was no big suprise the results could not keep up with the Google libraries.

这篇关于如何使用覆盖的UI元素显示股票全景图活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆