黄舟2017-04-18 09:19:50
This is indeed done by the front end. The UI layout I analyzed shows that it is used WebView
:
And there is a VR in this one, I don’t know how to experience it:
I don’t know what equipment is needed. . .
However, this panorama is a bit confusing. It seems that it does not support Android 4.4
and below. My test machine cannot open it after it is installed:
I checkedAndroid 全景
, and I didn’t get much information. Here are two:
How to support WebGL in mobile phones with webview below 5.0 in Android?
This question was raised last year, but no one has answered it yet. It is probably because 4.4 is not supported. The question is mainly to ask if it can be solved or if there are any alternatives that can be improved.
2. Confusion about developing webview in android
做全景很长时间个人感觉webview不是很好用,但是必须要用,用了这么长时间感觉问题很多,下面整理了比较容易忽略或难解决的问题
1.webview的shouldOverrideUrlLoading方法的返回值问题
(1)之前在网上看了一下说 返回true是由程序控制进行加载,说白了就是在shouldOverrideUrlLoading方法中写一些逻辑,最后在执行view.loadUrl方法,好处显而易见 可以截获并控制url是否加载,但是个人遇到一点问题就是网页通过goback返回时会出现无法返回的现象,个人认为是返回后又调用了loadUrl方法。
(2)返回false 加载过程全部由webview自行加载,个人感觉返回false较好。
(3)webview的goback方法应该是必须用的,(2)中说到返回false较好也是因为返回过程中不会出现重复加载的问题,个人亲测。
(4)全景的加载困扰了我很长时间,总是出现第一次可以加载,但是退出第二次或后面几次总是无法加载,网上搜了很多方法也没解决,看到一篇博客终于解决的问题
在onPause方法中加上webview.pauseTimers() 在onResume方法中加上webview.resumeTimers() 真是好用呀,现在测试全景每次都可以加载进去。