【发布时间】:2019-05-22 09:46:17
【问题描述】:
我在VrPanoramaView中使用以下图片
当我在视图中加载它时,它看起来像这样。
但我希望它在打开图像之前将图像动态移动到左侧,就像这样。
我可以用手指移动图像,但我希望它在加载时设置它的角度。
这是我的代码。
VrPanoramaView.Options options = new VrPanoramaView.Options();
InputStream inputStream = null;
AssetManager assetManager = getAssets();
inputStream = assetManager.open("test_2"+ ".jpg");
options.inputType = VrPanoramaView.Options.TYPE_MONO;
mVrPanoramaView.loadImageFromBitmap(BitmapFactory.decodeStream(inputStream), options);
mVrPanoramaView.setStereoModeButtonEnabled(false);
mVrPanoramaView.setInfoButtonEnabled(false);
mVrPanoramaView.setPureTouchTracking(true);
mVrPanoramaView.setFullscreenButtonEnabled(true);
我试过mVrPanoramaView.setPivotX(100);,但没有任何影响。我需要知道如何使用任何手势翻译全景视图中的图像。
我正在使用GoogleVrSDK
implementation 'com.google.vr:sdk-base:1.160.0'
implementation 'com.google.vr:sdk-panowidget:1.170.0'
【问题讨论】:
标签: android android-layout android-view panoramas