android - show VR tour in android
问题描述
I want to show VR tour like this http://alfavr.ir/alfavr.ir/to/park.html in my Android app. how can I do that? I tried to display with web view because the file format is Html but did not work.
解决方案
您可以尝试使用 Google VR SDK 中包含的 VRPanormaView。这是来自https://developers.google.com/vr/develop/android/vrview的示例:
<com.google.vr.sdk.widgets.pano.VrPanoramaView
android:id="@+id/pano_view"
android:layout_margin="5dip"
android:layout_width="match_parent"
android:scrollbars="@null"
android:layout_height="250dip" />
在 Activity 内部,主要方法是VrPanoramaView.loadImageFromBitmap()
. 使用标准 Android 位图对象和可选VrPanoramaView.Options
对象调用它。后者用于配置图像的格式。Activity 还实现了一个VrPanoramaEventListener
在加载操作成功或失败时接收事件的方法。
推荐阅读
- laravel - laravel-datepicker 没有显示?
- asp.net-core - ASP .NET Core 应用程序自定义设置的存储位置
- javascript - 带有无效 PDF 源的嵌入标签不会触发错误
- android - 跳过对 Azure 管道特定任务的 Android 测试
- kotlin - Kotlin RecyclerView如何在活动加载后选择第一个列表项?尝试(下面的代码)失败:(
- php - 如果登录为真重定向到 php 中的仪表板不起作用
- google-apps-script - 通过单击谷歌表格中的图标将单元格值从一个单元格自动复制到另一张表格
- python - 如何序列化 Python 对象的位置参数和非位置参数?
- php - 从内容中删除 []
- excel - 更改工作表 VBA Excel 中所有图表的字体大小