Android 如何在图像视图中查看光球图像
我正在尝试开发一个虚拟旅游android应用程序。我的本地设备中有光球图像。我需要打开此图像,并允许用户浏览。但图像未加载到图像视图中。是否有其他方法加载此图像并对图像执行一些操作,如滚动或滑动。您可以使用Google play服务提供的Photo Sphere Api。下面是如何使用它的示例- 请点击下面的链接了解更多信息- [ 创建客户端实例并连接到它。 连接到客户端后,启动异步检查 该图像是一个可查看的全景图。Android 如何在图像视图中查看光球图像,android,google-cardboard,virtual-reality,Android,Google Cardboard,Virtual Reality,我正在尝试开发一个虚拟旅游android应用程序。我的本地设备中有光球图像。我需要打开此图像,并允许用户浏览。但图像未加载到图像视图中。是否有其他方法加载此图像并对图像执行一些操作,如滚动或滑动。您可以使用Google play服务提供的Photo Sphere Api。下面是如何使用它的示例- 请点击下面的链接了解更多信息- [ 创建客户端实例并连接到它。 连接到客户端后,启动异步检查 该图像是一个可查看的全景图。 client.loadPanoramaInfo(infoLoadedListe
client.loadPanoramaInfo(infoLoadedListener,panoramaUri)
// This listener will be called with information about the given panorama.
OnPanoramaInfoLoadedListener infoLoadedListener =
new OnPanoramaInfoLoadedListener() {
@Override
public void onPanoramaInfoLoaded(ConnectionResult result,
Intent viewerIntent) {
if (result.isSuccess()) {
// If the intent is not null, the image can be shown as a
// panorama.
if (viewerIntent != null) {
// Use the given intent to start the panorama viewer.
startActivity(viewerIntent);
}
}
}
// If viewerIntent is null, the image is not a viewable panorama.
};