本文共 2274 字,大约阅读时间需要 7 分钟。
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.
() |
() | |
synchronized boolean | () |
void | () |
void | ( cardboardView) |
synchronized void | (boolean enabled) |
void | ( newParams) |
Returns the associated with this activity.
object associated with this activity. Can be null.Returns whether single screen taps are converted to Cardboard trigger events.
Override to detect when the Cardboard trigger was pulled and released.
Provides click-like events when the device is inside a Cardboard.
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).
cardboardView | The to associate with. Can be null. |
---|
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.
enabled | whether screen taps should be converted to Cardboard trigger events. |
---|
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
.
newParams | New Cardboard device params to set. |
---|
转载地址:http://lffpn.baihongyu.com/