博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Google cardBoard Android API (一):CardboardActivity
阅读量:3759 次
发布时间:2019-05-22

本文共 2274 字,大约阅读时间需要 7 分钟。

public class CardboardActivity

Base activity that provides easy integration with Cardboard devices.

Exposes events to interact with Cardboards and handles many of the details commonly required when creating an Activity for VR rendering.

Public Constructors

()

Public Methods

()
synchronized boolean
()
void
()
void
(  cardboardView)
synchronized void
(boolean enabled)

Protected Methods

void
(  newParams)

Inherited Methods

Public Constructors

public CardboardActivity ()

Public Methods

public  getCardboardView ()

Returns the  associated with this activity.

Returns
  • The  object associated with this activity. Can be null.

public synchronized boolean getConvertTapIntoTrigger ()

Returns whether single screen taps are converted to Cardboard trigger events.

Returns
  • whether single screen taps are converted to Cardboard trigger events.

public void onCardboardTrigger ()

Override to detect when the Cardboard trigger was pulled and released.

Provides click-like events when the device is inside a Cardboard.

public void setCardboardView ( cardboardView)

Associates a Cardboard view with this activity.

This method does not set or change the content view, but associates the activity with a and ensures it receives any required activity lifecycle notifications.

This is automatically done if setContentView is used to directly set a object. Should be called if the  is set in any other way (e.g. from a layout resource).

Parameters
cardboardView The  to associate with. Can be null.

public synchronized void setConvertTapIntoTrigger (boolean enabled)

Sets whether single screen taps should be converted to Cardboard trigger events.

If this is true, a single tap on the phone screen will result in a call to. This is enabled by default.

Parameters
enabled whether screen taps should be converted to Cardboard trigger events.

Protected Methods

protected void updateCardboardDeviceParams ( newParams)

Requests an update of the parameters for the current Cardboard device.

Compares against existing configuration and updates if the new parameters differ.

This method requires a  to be already set. See .

Parameters
newParams New Cardboard device params to set.
 

转载地址:http://lffpn.baihongyu.com/

你可能感兴趣的文章
JSON和AJAX
查看>>
web之监听器listener
查看>>
类加载器
查看>>
数据库设计
查看>>
Java虚拟机的内存分配和运行机制(粗谈)
查看>>
web开发之BaseServlet的使用
查看>>
初识Maven
查看>>
Maven分模块构建项目
查看>>
MyBatis初识
查看>>
MyBatis【进阶详解】
查看>>
面试题集锦(七)
查看>>
注解开发——Spring整合dao/service/web
查看>>
架构的演进
查看>>
Elastic-Job的基础使用
查看>>
策略过滤器的灵活性分析
查看>>
POI的使用
查看>>
Anaconda和PyCharm的下载、安装和配置
查看>>
Mockito单元测试简述
查看>>
GUAVA的常用方法汇总
查看>>
装饰器和门面设计模式介绍
查看>>