Is VrPanoramaView a subclass of GvrView?

google-vr

268 просмотра

1 ответ

What I'm trying to do is trap the onCardboardTrigger event from a VrPanoramaView. So I think I can do setGvrView on a GvrActivity. But I can't see how I can do that on a VrPanoramaView. Any thoughts?

activity = new GvrActivity();
activity.setGvrView(panoWidgetView);


Error:(65, 29) error: incompatible types: VrPanoramaView cannot be converted to GvrView
Автор: Queenvictoria Источник Размещён: 08.11.2019 10:56

Ответы (1)


2 плюса

Решение

No. As shown in the API documentation, VrPanoramaView extends VrWidgetView. Therefore, you can't set a VrPanoramaView as a GvrView.

Following the inheritance hierarchy of this components in Android Studio, you can see that both VrPanoramaView and GvrView inherit directly from FrameLayout. In consequence, VrPanoramaView can't extend GvrView.

Автор: Onitsuma Размещён: 29.08.2016 01:32
Вопросы из категории :
32x32