Stay organized with collections Save and categorize content based on your preferences.
A View that supports VR rendering.
Designed to work in full screen mode with a landscape or reverse landscape orientation.
This view can be used like a GLSurfaceView
by implementing one of its rendering interfaces:
GvrView.StereoRenderer
: abstracts all stereoscopic rendering details from the renderer.GvrView.Renderer
: for complex engines that need to handle all stereo rendering details by themselves.The GvrView.StereoRenderer
interface is recommended for all applications that can make use of it, while the GvrView.Renderer
interface is discouraged and should only be used if really needed.
The view allows switching from stereo mode to mono rendering mode in stereo renderers at any time by calling the setStereoModeEnabled
method.
()
Optional hook the client can trigger from Activity.onBackPressed().
void onPause()
Informs the view that the activity has been paused.
void onResume()
Informs the view that the activity has been resumed.
void void recenterHeadTracker()
Recenters the head orientation (resets the yaw to zero, leaving pitch and roll unmodified).
void resetHeadTracker()
This method is deprecated. This method will be removed in future versions of this API. All uses of this method can be safely replaced with calls torecenterHeadTracker()
. boolean void void void setEGLConfigChooser
(int redSize, int greenSize, int blueSize, int alphaSize, int depthSize, int stencilSize)
Install a config chooser which will choose a config with at least the specified depthSize and stencilSize, and exactly the specified redSize, greenSize, blueSize and alphaSize.
void void setMultisampling(int numSamples)
Sets the number of samples per pixel, for multisampling.
void setNeckModelEnabled(boolean enabled)
Fully enables or disables use of the neck model for head tracking.
void void void void void void void void void setTransitionViewEnabled(boolean enabled)
Enables/disables the transition view used to prompt the user to place their phone into a GVR viewer.
void shutdown()
Shuts down the GvrView implementation, freeing associated resources.
void void Inherited Methods From class android.widget.FrameLayout From class android.view.ViewGroup void void void booleanaddStatesFromChildren()
void void void addView(
Viewarg0, int arg1)
void void void addView(
Viewarg0, int arg1, int arg2)
void bringChildToFront(
Viewarg0)
void childDrawableStateChanged(
Viewarg0)
void childHasTransientStateChanged(
Viewarg0, boolean arg1)
void clearChildFocus(
Viewarg0)
voidclearDisappearingChildren()
voidclearFocus()
WindowInsets boolean void voiddispatchDisplayHint(int arg0)
boolean voiddispatchDrawableHotspotChanged(float arg0, float arg1)
voiddispatchFinishTemporaryDetach()
boolean boolean boolean dispatchKeyShortcutEvent(
KeyEventarg0)
voiddispatchPointerCaptureChanged(boolean arg0)
voiddispatchProvideAutofillStructure(ViewStructure arg0, int arg1)
voiddispatchProvideStructure(ViewStructure arg0)
voiddispatchSetActivated(boolean arg0)
voiddispatchSetSelected(boolean arg0)
voiddispatchStartTemporaryDetach()
voiddispatchSystemUiVisibilityChanged(int arg0)
boolean boolean boolean dispatchUnhandledMove(
Viewarg0, int arg1)
voiddispatchWindowFocusChanged(boolean arg0)
voiddispatchWindowSystemUiVisiblityChanged(int arg0)
voiddispatchWindowVisibilityChanged(int arg0)
void endViewTransition(
Viewarg0)
ViewfindFocus()
void View focusSearch(
Viewarg0, int arg1)
void focusableViewAvailable(
Viewarg0)
boolean gatherTransparentRegion(
Regionarg0)
ViewGroup.LayoutParams CharSequencegetAccessibilityClassName()
ViewgetChildAt(int arg0)
intgetChildCount()
static intgetChildMeasureSpec(int arg0, int arg1, int arg2)
boolean booleangetClipChildren()
booleangetClipToPadding()
intgetDescendantFocusability()
ViewgetFocusedChild()
LayoutAnimationControllergetLayoutAnimation()
Animation.AnimationListenergetLayoutAnimationListener()
intgetLayoutMode()
LayoutTransitiongetLayoutTransition()
intgetNestedScrollAxes()
ViewOverlaygetOverlay()
intgetPersistentDrawingCache()
booleangetTouchscreenBlocksFocus()
booleanhasFocus()
booleanhasTransientState()
int indexOfChild(
Viewarg0)
final void ViewParent invalidateChildInParent(int[] arg0,
Rectarg1)
booleanisAlwaysDrawnWithCacheEnabled()
booleanisAnimationCacheEnabled()
booleanisLayoutSuppressed()
booleanisMotionEventSplittingEnabled()
booleanisTransitionGroup()
voidjumpDrawablesToCurrentState()
final voidlayout(int arg0, int arg1, int arg2, int arg3)
void notifySubtreeAccessibilityStateChanged(
Viewarg0,
Viewarg1, int arg2)
final void offsetDescendantRectToMyCoords(
Viewarg0,
Rectarg1)
final void offsetRectIntoDescendantCoords(
Viewarg0,
Rectarg1)
void onDescendantInvalidated(
Viewarg0,
Viewarg1)
boolean boolean boolean onNestedFling(
Viewarg0, float arg1, float arg2, boolean arg3)
boolean onNestedPreFling(
Viewarg0, float arg1, float arg2)
boolean onNestedPrePerformAccessibilityAction(
Viewarg0, int arg1,
Bundlearg2)
void onNestedPreScroll(
Viewarg0, int arg1, int arg2, int[] arg3)
void onNestedScroll(
Viewarg0, int arg1, int arg2, int arg3, int arg4)
void onNestedScrollAccepted(
Viewarg0,
Viewarg1, int arg2)
boolean PointerIcon boolean onStartNestedScroll(
Viewarg0,
Viewarg1, int arg2)
void onStopNestedScroll(
Viewarg0)
void void onViewRemoved(
Viewarg0)
void recomputeViewAttributes(
Viewarg0)
voidremoveAllViews()
voidremoveAllViewsInLayout()
void voidremoveViewAt(int arg0)
void removeViewInLayout(
Viewarg0)
voidremoveViews(int arg0, int arg1)
voidremoveViewsInLayout(int arg0, int arg1)
void requestChildFocus(
Viewarg0,
Viewarg1)
boolean requestChildRectangleOnScreen(
Viewarg0,
Rectarg1, boolean arg2)
voidrequestDisallowInterceptTouchEvent(boolean arg0)
boolean requestFocus(int arg0,
Rectarg1)
boolean void requestTransparentRegion(
Viewarg0)
booleanrestoreDefaultFocus()
voidscheduleLayoutAnimation()
voidsetAddStatesFromChildren(boolean arg0)
voidsetAlwaysDrawnWithCacheEnabled(boolean arg0)
voidsetAnimationCacheEnabled(boolean arg0)
voidsetClipChildren(boolean arg0)
voidsetClipToPadding(boolean arg0)
voidsetDescendantFocusability(int arg0)
void void voidsetLayoutMode(int arg0)
void voidsetMotionEventSplittingEnabled(boolean arg0)
void voidsetPersistentDrawingCache(int arg0)
voidsetTouchscreenBlocksFocus(boolean arg0)
voidsetTransitionGroup(boolean arg0)
booleanshouldDelayChildPressedState()
boolean showContextMenuForChild(
Viewarg0, float arg1, float arg2)
boolean showContextMenuForChild(
Viewarg0)
ActionMode ActionMode voidstartLayoutAnimation()
void startViewTransition(
Viewarg0)
voidsuppressLayout(boolean arg0)
void From class android.view.View void void void void void void void voidaddOnUnhandledKeyEventListener(View.OnUnhandledKeyEventListener arg0)
void ViewPropertyAnimatoranimate()
void voidautofill(AutofillValue arg0)
void voidbringToFront()
voidbuildDrawingCache(boolean arg0)
voidbuildDrawingCache()
voidbuildLayer()
booleancallOnClick()
booleancanResolveLayoutDirection()
booleancanResolveTextAlignment()
booleancanResolveTextDirection()
booleancanScrollHorizontally(int arg0)
booleancanScrollVertically(int arg0)
final voidcancelDragAndDrop()
voidcancelLongPress()
final voidcancelPendingInputEvents()
boolean checkInputConnectionProxy(
Viewarg0)
voidclearAnimation()
voidclearFocus()
static intcombineMeasuredStates(int arg0, int arg1)
voidcomputeScroll()
WindowInsets AccessibilityNodeInfocreateAccessibilityNodeInfo()
void voiddestroyDrawingCache()
WindowInsets boolean void voiddispatchDisplayHint(int arg0)
boolean voiddispatchDrawableHotspotChanged(float arg0, float arg1)
voiddispatchFinishTemporaryDetach()
boolean boolean boolean boolean dispatchKeyShortcutEvent(
KeyEventarg0)
booleandispatchNestedFling(float arg0, float arg1, boolean arg2)
booleandispatchNestedPreFling(float arg0, float arg1)
boolean dispatchNestedPrePerformAccessibilityAction(int arg0,
Bundlearg1)
booleandispatchNestedPreScroll(int arg0, int arg1, int[] arg2, int[] arg3)
booleandispatchNestedScroll(int arg0, int arg1, int arg2, int arg3, int[] arg4)
voiddispatchPointerCaptureChanged(boolean arg0)
boolean voiddispatchProvideAutofillStructure(ViewStructure arg0, int arg1)
voiddispatchProvideStructure(ViewStructure arg0)
voiddispatchStartTemporaryDetach()
voiddispatchSystemUiVisibilityChanged(int arg0)
boolean boolean boolean dispatchUnhandledMove(
Viewarg0, int arg1)
voiddispatchWindowFocusChanged(boolean arg0)
voiddispatchWindowSystemUiVisiblityChanged(int arg0)
voiddispatchWindowVisibilityChanged(int arg0)
void voiddrawableHotspotChanged(float arg0, float arg1)
ViewfindFocus()
final <T extends View> TfindViewById(int arg0)
final <T extends View> T findViewWithTag(
Objectarg0)
void ViewfocusSearch(int arg0)
voidforceHasOverlappingRendering(boolean arg0)
voidforceLayout()
static intgenerateViewId()
CharSequencegetAccessibilityClassName()
View.AccessibilityDelegategetAccessibilityDelegate()
intgetAccessibilityLiveRegion()
AccessibilityNodeProvidergetAccessibilityNodeProvider()
CharSequencegetAccessibilityPaneTitle()
intgetAccessibilityTraversalAfter()
intgetAccessibilityTraversalBefore()
floatgetAlpha()
AnimationgetAnimation()
IBindergetApplicationWindowToken()
String[]getAutofillHints()
final AutofillIdgetAutofillId()
intgetAutofillType()
AutofillValuegetAutofillValue()
DrawablegetBackground()
ColorStateListgetBackgroundTintList()
PorterDuff.ModegetBackgroundTintMode()
intgetBaseline()
final intgetBottom()
floatgetCameraDistance()
boolean getClipBounds(
Rectarg0)
RectgetClipBounds()
final booleangetClipToOutline()
CharSequencegetContentDescription()
final ContextgetContext()
final booleangetDefaultFocusHighlightEnabled()
static intgetDefaultSize(int arg0, int arg1)
DisplaygetDisplay()
final int[]getDrawableState()
BitmapgetDrawingCache()
BitmapgetDrawingCache(boolean arg0)
intgetDrawingCacheBackgroundColor()
intgetDrawingCacheQuality()
void getDrawingRect(
Rectarg0)
longgetDrawingTime()
floatgetElevation()
booleangetFilterTouchesWhenObscured()
booleangetFitsSystemWindows()
intgetFocusable()
ArrayList<View>getFocusables(int arg0)
void getFocusedRect(
Rectarg0)
DrawablegetForeground()
intgetForegroundGravity()
ColorStateListgetForegroundTintList()
PorterDuff.ModegetForegroundTintMode()
final boolean getGlobalVisibleRect(
Rectarg0)
boolean getGlobalVisibleRect(
Rectarg0,
Pointarg1)
HandlergetHandler()
final booleangetHasOverlappingRendering()
final intgetHeight()
void intgetHorizontalFadingEdgeLength()
intgetId()
intgetImportantForAccessibility()
intgetImportantForAutofill()
booleangetKeepScreenOn()
KeyEvent.DispatcherStategetKeyDispatcherState()
intgetLabelFor()
intgetLayerType()
intgetLayoutDirection()
ViewGroup.LayoutParamsgetLayoutParams()
final intgetLeft()
final boolean getLocalVisibleRect(
Rectarg0)
voidgetLocationInWindow(int[] arg0)
voidgetLocationOnScreen(int[] arg0)
MatrixgetMatrix()
final intgetMeasuredHeight()
final intgetMeasuredHeightAndState()
final intgetMeasuredState()
final intgetMeasuredWidth()
final intgetMeasuredWidthAndState()
intgetMinimumHeight()
intgetMinimumWidth()
intgetNextClusterForwardId()
intgetNextFocusDownId()
intgetNextFocusForwardId()
intgetNextFocusLeftId()
intgetNextFocusRightId()
intgetNextFocusUpId()
View.OnFocusChangeListenergetOnFocusChangeListener()
intgetOutlineAmbientShadowColor()
ViewOutlineProvidergetOutlineProvider()
intgetOutlineSpotShadowColor()
intgetOverScrollMode()
ViewOverlaygetOverlay()
intgetPaddingBottom()
intgetPaddingEnd()
intgetPaddingLeft()
intgetPaddingRight()
intgetPaddingStart()
intgetPaddingTop()
final ViewParentgetParent()
ViewParentgetParentForAccessibility()
floatgetPivotX()
floatgetPivotY()
PointerIcongetPointerIcon()
ResourcesgetResources()
final booleangetRevealOnFocusHint()
final intgetRight()
ViewgetRootView()
WindowInsetsgetRootWindowInsets()
floatgetRotation()
floatgetRotationX()
floatgetRotationY()
floatgetScaleX()
floatgetScaleY()
intgetScrollBarDefaultDelayBeforeFade()
intgetScrollBarFadeDuration()
intgetScrollBarSize()
intgetScrollBarStyle()
intgetScrollIndicators()
final intgetScrollX()
final intgetScrollY()
intgetSolidColor()
intgetSourceLayoutResId()
StateListAnimatorgetStateListAnimator()
intgetSystemUiVisibility()
ObjectgetTag()
ObjectgetTag(int arg0)
intgetTextAlignment()
intgetTextDirection()
CharSequencegetTooltipText()
final intgetTop()
TouchDelegategetTouchDelegate()
ArrayList<View>getTouchables()
floatgetTransitionAlpha()
StringgetTransitionName()
floatgetTranslationX()
floatgetTranslationY()
floatgetTranslationZ()
longgetUniqueDrawingId()
intgetVerticalFadingEdgeLength()
intgetVerticalScrollbarPosition()
intgetVerticalScrollbarWidth()
ViewTreeObservergetViewTreeObserver()
intgetVisibility()
final intgetWidth()
WindowIdgetWindowId()
intgetWindowSystemUiVisibility()
IBindergetWindowToken()
intgetWindowVisibility()
void getWindowVisibleDisplayFrame(
Rectarg0)
floatgetX()
floatgetY()
floatgetZ()
booleanhasExplicitFocusable()
booleanhasFocus()
booleanhasFocusable()
booleanhasNestedScrollingParent()
booleanhasOnClickListeners()
booleanhasOverlappingRendering()
booleanhasPointerCapture()
booleanhasTransientState()
booleanhasWindowFocus()
static View voidinvalidate()
void voidinvalidate(int arg0, int arg1, int arg2, int arg3)
void voidinvalidateOutline()
booleanisAccessibilityFocused()
booleanisAccessibilityHeading()
booleanisActivated()
booleanisAttachedToWindow()
booleanisClickable()
booleanisContextClickable()
booleanisDirty()
booleanisDrawingCacheEnabled()
booleanisDuplicateParentStateEnabled()
booleanisEnabled()
final booleanisFocusable()
final booleanisFocusableInTouchMode()
booleanisFocused()
final booleanisFocusedByDefault()
booleanisForceDarkAllowed()
booleanisHapticFeedbackEnabled()
booleanisHardwareAccelerated()
booleanisHorizontalFadingEdgeEnabled()
booleanisHorizontalScrollBarEnabled()
booleanisHovered()
booleanisImportantForAccessibility()
final booleanisImportantForAutofill()
booleanisInEditMode()
booleanisInLayout()
booleanisInTouchMode()
final booleanisKeyboardNavigationCluster()
booleanisLaidOut()
booleanisLayoutDirectionResolved()
booleanisLayoutRequested()
booleanisLongClickable()
booleanisNestedScrollingEnabled()
booleanisOpaque()
booleanisPaddingRelative()
booleanisPivotSet()
booleanisPressed()
booleanisSaveEnabled()
booleanisSaveFromParentEnabled()
booleanisScreenReaderFocusable()
booleanisScrollContainer()
booleanisScrollbarFadingEnabled()
booleanisSelected()
booleanisShown()
booleanisSoundEffectsEnabled()
final booleanisTemporarilyDetached()
booleanisTextAlignmentResolved()
booleanisTextDirectionResolved()
booleanisVerticalFadingEdgeEnabled()
booleanisVerticalScrollBarEnabled()
booleanisVisibleToUserForAutofill(int arg0)
voidjumpDrawablesToCurrentState()
View keyboardNavigationClusterSearch(
Viewarg0, int arg1)
voidlayout(int arg0, int arg1, int arg2, int arg3)
final voidmeasure(int arg0, int arg1)
voidoffsetLeftAndRight(int arg0)
voidoffsetTopAndBottom(int arg0)
WindowInsets voidonCancelPendingInputEvents()
boolean booleanonCheckIsTextEditor()
InputConnection boolean void onDrawForeground(
Canvasarg0)
boolean voidonFinishTemporaryDetach()
boolean voidonHoverChanged(boolean arg0)
boolean void void boolean boolean onKeyLongPress(int arg0,
KeyEventarg1)
boolean onKeyMultiple(int arg0, int arg1,
KeyEventarg2)
boolean boolean boolean voidonPointerCaptureChange(boolean arg0)
void voidonProvideAutofillStructure(ViewStructure arg0, int arg1)
voidonProvideAutofillVirtualStructure(ViewStructure arg0, int arg1)
voidonProvideStructure(ViewStructure arg0)
voidonProvideVirtualStructure(ViewStructure arg0)
PointerIcon voidonRtlPropertiesChanged(int arg0)
voidonScreenStateChanged(int arg0)
voidonStartTemporaryDetach()
boolean boolean voidonVisibilityAggregated(boolean arg0)
voidonWindowFocusChanged(boolean arg0)
voidonWindowSystemUiVisibilityChanged(int arg0)
boolean performAccessibilityAction(int arg0,
Bundlearg1)
booleanperformClick()
booleanperformContextClick(float arg0, float arg1)
booleanperformContextClick()
booleanperformHapticFeedback(int arg0)
booleanperformHapticFeedback(int arg0, int arg1)
booleanperformLongClick(float arg0, float arg1)
booleanperformLongClick()
voidplaySoundEffect(int arg0)
boolean boolean voidpostInvalidate()
voidpostInvalidate(int arg0, int arg1, int arg2, int arg3)
voidpostInvalidateDelayed(long arg0, int arg1, int arg2, int arg3, int arg4)
voidpostInvalidateDelayed(long arg0)
voidpostInvalidateOnAnimation(int arg0, int arg1, int arg2, int arg3)
voidpostInvalidateOnAnimation()
void void postOnAnimationDelayed(
Runnablearg0, long arg1)
voidrefreshDrawableState()
voidreleasePointerCapture()
boolean void void voidremoveOnUnhandledKeyEventListener(View.OnUnhandledKeyEventListener arg0)
voidrequestApplyInsets()
voidrequestFitSystemWindows()
final booleanrequestFocus(int arg0)
final booleanrequestFocus()
boolean requestFocus(int arg0,
Rectarg1)
final booleanrequestFocusFromTouch()
voidrequestLayout()
voidrequestPointerCapture()
boolean requestRectangleOnScreen(
Rectarg0)
boolean requestRectangleOnScreen(
Rectarg0, boolean arg1)
final void final <T extends View> TrequireViewById(int arg0)
voidresetPivot()
static intresolveSize(int arg0, int arg1)
static intresolveSizeAndState(int arg0, int arg1, int arg2)
booleanrestoreDefaultFocus()
void void void voidscrollBy(int arg0, int arg1)
voidscrollTo(int arg0, int arg1)
voidsendAccessibilityEvent(int arg0)
void void voidsetAccessibilityHeading(boolean arg0)
voidsetAccessibilityLiveRegion(int arg0)
void voidsetAccessibilityTraversalAfter(int arg0)
voidsetAccessibilityTraversalBefore(int arg0)
voidsetActivated(boolean arg0)
voidsetAlpha(float arg0)
void void setAnimationMatrix(
Matrixarg0)
void voidsetAutofillId(AutofillId arg0)
void voidsetBackgroundColor(int arg0)
void voidsetBackgroundResource(int arg0)
void void final voidsetBottom(int arg0)
voidsetCameraDistance(float arg0)
voidsetClickable(boolean arg0)
void setClipBounds(
Rectarg0)
voidsetClipToOutline(boolean arg0)
void voidsetContextClickable(boolean arg0)
voidsetDefaultFocusHighlightEnabled(boolean arg0)
voidsetDrawingCacheBackgroundColor(int arg0)
voidsetDrawingCacheEnabled(boolean arg0)
voidsetDrawingCacheQuality(int arg0)
voidsetDuplicateParentStateEnabled(boolean arg0)
voidsetElevation(float arg0)
voidsetEnabled(boolean arg0)
voidsetFadingEdgeLength(int arg0)
voidsetFilterTouchesWhenObscured(boolean arg0)
voidsetFitsSystemWindows(boolean arg0)
voidsetFocusable(boolean arg0)
voidsetFocusable(int arg0)
voidsetFocusableInTouchMode(boolean arg0)
voidsetFocusedByDefault(boolean arg0)
voidsetForceDarkAllowed(boolean arg0)
void voidsetForegroundGravity(int arg0)
void void voidsetHapticFeedbackEnabled(boolean arg0)
voidsetHasTransientState(boolean arg0)
voidsetHorizontalFadingEdgeEnabled(boolean arg0)
voidsetHorizontalScrollBarEnabled(boolean arg0)
voidsetHovered(boolean arg0)
voidsetId(int arg0)
voidsetImportantForAccessibility(int arg0)
voidsetImportantForAutofill(int arg0)
voidsetKeepScreenOn(boolean arg0)
voidsetKeyboardNavigationCluster(boolean arg0)
voidsetLabelFor(int arg0)
void setLayerPaint(
Paintarg0)
void setLayerType(int arg0,
Paintarg1)
voidsetLayoutDirection(int arg0)
void final voidsetLeft(int arg0)
final voidsetLeftTopRightBottom(int arg0, int arg1, int arg2, int arg3)
voidsetLongClickable(boolean arg0)
voidsetMinimumHeight(int arg0)
voidsetMinimumWidth(int arg0)
voidsetNestedScrollingEnabled(boolean arg0)
voidsetNextClusterForwardId(int arg0)
voidsetNextFocusDownId(int arg0)
voidsetNextFocusForwardId(int arg0)
voidsetNextFocusLeftId(int arg0)
voidsetNextFocusRightId(int arg0)
voidsetNextFocusUpId(int arg0)
void voidsetOnCapturedPointerListener(View.OnCapturedPointerListener arg0)
void voidsetOnContextClickListener(View.OnContextClickListener arg0)
void void void void void void void voidsetOnScrollChangeListener(View.OnScrollChangeListener arg0)
void void voidsetOutlineAmbientShadowColor(int arg0)
void voidsetOutlineSpotShadowColor(int arg0)
voidsetOverScrollMode(int arg0)
voidsetPadding(int arg0, int arg1, int arg2, int arg3)
voidsetPaddingRelative(int arg0, int arg1, int arg2, int arg3)
voidsetPivotX(float arg0)
voidsetPivotY(float arg0)
voidsetPointerIcon(PointerIcon arg0)
voidsetPressed(boolean arg0)
final voidsetRevealOnFocusHint(boolean arg0)
final voidsetRight(int arg0)
voidsetRotation(float arg0)
voidsetRotationX(float arg0)
voidsetRotationY(float arg0)
voidsetSaveEnabled(boolean arg0)
voidsetSaveFromParentEnabled(boolean arg0)
voidsetScaleX(float arg0)
voidsetScaleY(float arg0)
voidsetScreenReaderFocusable(boolean arg0)
voidsetScrollBarDefaultDelayBeforeFade(int arg0)
voidsetScrollBarFadeDuration(int arg0)
voidsetScrollBarSize(int arg0)
voidsetScrollBarStyle(int arg0)
voidsetScrollContainer(boolean arg0)
voidsetScrollIndicators(int arg0, int arg1)
voidsetScrollIndicators(int arg0)
voidsetScrollX(int arg0)
voidsetScrollY(int arg0)
voidsetScrollbarFadingEnabled(boolean arg0)
voidsetSelected(boolean arg0)
voidsetSoundEffectsEnabled(boolean arg0)
void voidsetSystemUiVisibility(int arg0)
void setTag(int arg0,
Objectarg1)
void voidsetTextAlignment(int arg0)
voidsetTextDirection(int arg0)
void final voidsetTop(int arg0)
void voidsetTransitionAlpha(float arg0)
final void setTransitionName(
Stringarg0)
voidsetTranslationX(float arg0)
voidsetTranslationY(float arg0)
voidsetTranslationZ(float arg0)
voidsetVerticalFadingEdgeEnabled(boolean arg0)
voidsetVerticalScrollBarEnabled(boolean arg0)
voidsetVerticalScrollbarPosition(int arg0)
voidsetVisibility(int arg0)
voidsetWillNotCacheDrawing(boolean arg0)
voidsetWillNotDraw(boolean arg0)
voidsetX(float arg0)
voidsetY(float arg0)
voidsetZ(float arg0)
booleanshowContextMenu()
booleanshowContextMenu(float arg0, float arg1)
ActionMode ActionMode void final boolean final boolean booleanstartNestedScroll(int arg0)
voidstopNestedScroll()
StringtoString()
void transformMatrixToGlobal(
Matrixarg0)
void transformMatrixToLocal(
Matrixarg0)
void void final void booleanwillNotCacheDrawing()
booleanwillNotDraw()
From class java.lang.Object boolean final Class<?>getClass()
inthashCode()
final voidnotify()
final voidnotifyAll()
StringtoString()
final voidwait(long arg0, int arg1)
final voidwait(long arg0)
final voidwait()
From interface android.view.ViewParent abstract void bringChildToFront(
Viewarg0)
abstract booleancanResolveLayoutDirection()
abstract booleancanResolveTextAlignment()
abstract booleancanResolveTextDirection()
abstract void childDrawableStateChanged(
Viewarg0)
abstract void childHasTransientStateChanged(
Viewarg0, boolean arg1)
abstract void clearChildFocus(
Viewarg0)
abstract void abstract View focusSearch(
Viewarg0, int arg1)
abstract void focusableViewAvailable(
Viewarg0)
abstract boolean abstract intgetLayoutDirection()
abstract ViewParentgetParent()
abstract ViewParentgetParentForAccessibility()
abstract intgetTextAlignment()
abstract intgetTextDirection()
abstract void abstract ViewParent invalidateChildInParent(int[] arg0,
Rectarg1)
abstract booleanisLayoutDirectionResolved()
abstract booleanisLayoutRequested()
abstract booleanisTextAlignmentResolved()
abstract booleanisTextDirectionResolved()
abstract View keyboardNavigationClusterSearch(
Viewarg0, int arg1)
abstract void notifySubtreeAccessibilityStateChanged(
Viewarg0,
Viewarg1, int arg2)
void onDescendantInvalidated(
Viewarg0,
Viewarg1)
abstract boolean onNestedFling(
Viewarg0, float arg1, float arg2, boolean arg3)
abstract boolean onNestedPreFling(
Viewarg0, float arg1, float arg2)
abstract boolean onNestedPrePerformAccessibilityAction(
Viewarg0, int arg1,
Bundlearg2)
abstract void onNestedPreScroll(
Viewarg0, int arg1, int arg2, int[] arg3)
abstract void onNestedScroll(
Viewarg0, int arg1, int arg2, int arg3, int arg4)
abstract void onNestedScrollAccepted(
Viewarg0,
Viewarg1, int arg2)
abstract boolean onStartNestedScroll(
Viewarg0,
Viewarg1, int arg2)
abstract void onStopNestedScroll(
Viewarg0)
abstract void recomputeViewAttributes(
Viewarg0)
abstract void requestChildFocus(
Viewarg0,
Viewarg1)
abstract boolean requestChildRectangleOnScreen(
Viewarg0,
Rectarg1, boolean arg2)
abstract voidrequestDisallowInterceptTouchEvent(boolean arg0)
abstract voidrequestFitSystemWindows()
abstract voidrequestLayout()
abstract boolean abstract void requestTransparentRegion(
Viewarg0)
abstract boolean showContextMenuForChild(
Viewarg0)
abstract boolean showContextMenuForChild(
Viewarg0, float arg1, float arg2)
abstract ActionMode abstract ActionMode From interface android.view.ViewManager From interface android.graphics.drawable.Drawable.Callback From interface android.view.KeyEvent.Callback abstract boolean abstract boolean onKeyLongPress(int arg0,
KeyEventarg1)
abstract boolean onKeyMultiple(int arg0, int arg1,
KeyEventarg2)
abstract boolean From interface android.view.accessibility.AccessibilityEventSource abstract voidsendAccessibilityEvent(int arg0)
abstract void Public Constructors public GvrView (Context context)Creates a new GvrView
instance.
GvrView
instance.Creates a new GvrView
instance.
GvrView
instance.Enables emulation of Cardboard-style touch trigger input when using a Daydream headset.
A Cardboard viewer supports touch-trigger based input, whereas a Daydream headest supports controller input. Enabling Cardboard trigger emulation will simulate Cardboard-style touch trigger input (see setOnCardboardTriggerListener(Runnable)
using app and touchpad button events from a Daydream controller. This allows Cardboard-supporting apps to simply and easily support operation on a Daydream headset. Enabling this emulation will have no effect when the paired viewer is already a Cardboard viewer.
Note: It is not sufficient to enable Cardboard trigger emulation to run a Cardboard app on a Daydream headset. The following adjustments to a regular Cardboard app need also be made:
setVrModeEnabled(Activity, boolean)
.setAsyncReprojectionEnabled(boolean)
.Note: Enabling trigger emulation will *only* translate controller clicks into trigger events. The client reticle (if present) will continue to track the user's head motion, which may be less than intuitive for users accustomed to controller-driven reticle motion in a typical Daydream app.
public boolean getAsyncReprojectionEnabled ()Returns the current asynchronous reprojection setting.
Returnstrue
if asynchronous reprojection is enabled, false
otherwise. Disabled by default.Gets whether distortion correction is enabled.
Returnstrue
if distortion correction is enabled, false
otherwise.Returns the current head mounted display this view is rendering for.
Contains various parameters about the screen and GVR viewer that combined make up the head mounted display.
Changes to the returned object do not have any effect on rendering.
ReturnsGets the interpupillary distance. The GVR framework currently assumes that user IPD matches inter-lens distance of the viewer.
ReturnsGets the neck model factor for head tracking.
Refer to {link #setNeckModelEnabled()} for more detail on neck model and {link #setNeckModelFactor()} for more detail on neck model factor.
ReturnsReturns the current stereo mode setting.
Returnstrue
if stereo mode is currently enabled, false
otherwise. Enabled by default.Optional hook the client can trigger from Activity.onBackPressed().
This will invoke the currently configured "close" behavior for the view. For Daydream-compatible Activities this will quit VR and restore the Android launcher. If the user has configured an override for the close button behavior, that action will be invoked. Otherwise, this call will simply invoke Activity.finish().
public void onPause ()Informs the view that the activity has been paused.
public void onResume ()Informs the view that the activity has been resumed.
public void queueEvent (Runnable r)Queue a runnable to be run on the GL rendering thread. This can be used to communicate with the Renderer on the rendering thread. If the renderer has not been set, the task will be run synchronously.
Parameters r The Runnable to be run on the GL rendering thread. public void recenterHeadTracker ()Recenters the head orientation (resets the yaw to zero, leaving pitch and roll unmodified).
This will make the scene's Z axis align with the current phone heading (compass direction). In other words, after calling this method, the direction that the user is currently looking at will be redefined as "forward" (zero yaw). Pitch and roll are not modified.
Warning: This method must only be used by Cardboard apps. Do not call this on Daydream apps. On the Daydream platform, recentering is handled automatically and should never be programatically triggered by apps. Hybrid apps that work both in Cardboard and Daydream mode must only call this method when in Cardboard mode (that is, when the phone is paired with a Cardboard viewer), never in Daydream mode.
public void resetHeadTracker ()This method was deprecated in API level .
This method will be removed in future versions of this API. All uses of this method can be safely replaced with calls to recenterHeadTracker()
.
Ask the head-tracker to reset itself.
This method is deprecated. Use recenterHeadTracker()
instead, which accomplishes the same effects but avoids the undesirable side-effects of a full reset (temporary loss of tracking quality).
Among other things, this will make the scene's Z axis align with the current phone heading (compass direction). Warning resetHeadTracker()
wipes out all the head-tracking state, so recenterHeadTracker()
should be used instead in most cases.
Warning: This method must only be used by Cardboard apps. Do not call this on Daydream apps. On the Daydream platform, recentering is handled automatically and should never be programatically triggered by apps. Hybrid apps that work both in Cardboard and Daydream mode must only call this method when in Cardboard mode (that is, when the phone is paired with a Cardboard viewer), never in Daydream mode.
public boolean setAsyncReprojectionEnabled (boolean enabled)Enables or disables asynchronous reprojection.
Must be called on the UI thread. If enabled, buffers will be submitted to an asynchronous thread, for stabilized reprojection and rendering.
Note: Async reprojection may not be available on every platform. Once enabled, async reprojection cannot be disabled.
Parameters enabledtrue
to enable asynchronous reprojection,
false to disable. Returns
true
if the new setting was successfully applied, false
otherwise. Disabled by default.Sets the depth and stencil widths for the offscreen framebuffer.
Note that this applies to the framebuffer that the app renders to, not the window's backbuffer.
If this method is called, it must be called before setRenderer(Renderer)
is called.
Sets whether distortion correction is enabled.
Enabled by default. Changes will be effective from the first frame after this call.
Parameters enabledtrue
to enable distortion correction, false
to disable. public void setEGLConfigChooser (int redSize, int greenSize, int blueSize, int alphaSize, int depthSize, int stencilSize)
Install a config chooser which will choose a config with at least the specified depthSize and stencilSize, and exactly the specified redSize, greenSize, blueSize and alphaSize.
If this method is called, it must be called before setRenderer(Renderer)
is called.
If this method is not called, then by default the view will choose an RGB_888 surface with a depth buffer depth of at least 16 bits.
Parameters redSize greenSize blueSize alphaSize depthSize stencilSize public void setEGLContextClientVersion (int version)Sets the desired EGLContext version to use.
If this method is called, it must be called before setRenderer(Renderer)
is called. If this function is not called, OpenGL ES 2.0 is used.
Sets the number of samples per pixel, for multisampling. Multisampling is disabled by default.
Note that this applies to the framebuffer that the app renders to, not the window's backbuffer.
If this method is called, it must be called before setRenderer(Renderer)
is called.
If this method is called, it is recommended to reduce the distortion correction scale via setRenderTargetScale(float)
to improve performance.
Fully enables or disables use of the neck model for head tracking.
The neck model simulates how head rotations naturally happen relative to the base of the neck, not around the midpoint between the eyes, causing translational viewpoint movement in addition to rotation.
Parameters enabledtrue
to enable the neck model, false
to disable. It is equivalent to calling setNeckModelFactor(enabled ? 1.0 : 0.0). public void setNeckModelFactor (float factor)
Sets the neck model factor for head tracking.
Refer to {link #setNeckModelEnabled()} for more detail on neck model.
Parameters factor Neck model factor between 0.0f and 1.0f. Set factor to 0.0f will completely disable the neck model, and 1.0f will completely activate the neck model. Value beturn 0.0f and 1.0f will partially use the neck model by linear interpolating the full neck model and no neck model according to the factor value. public void setOnCardboardTriggerListener (Runnable listener)Sets a runnable that gets called back whenever a Cardboard trigger event occurs.
This is only useful if you're not using GvrActivity
and want to handle trigger events at the GvrView
level. If you're using GvrActivity
, then it's recommended to use the onCardboardTrigger method from GvrActivity
instead of using this function.
Sets a runnable that gets called back when the close button is clicked.
For Daydream-compatible activities, the default close behavior is to finish the activity and navigate back to the 2D Android home launcher. For Cardboard activities, the default close behavior is to simply navigate back.
The client can and should override this if they desire custom behavior, particularly with hybrid VR apps where there are 2D activity components.
Parameters listener The task to execute when the close button is clicked. A null argument restores the default behavior. public void setOnTransitionViewDoneListener (Runnable listener)Sets a runnable that gets called back when users have gone through the transition view.
This must be called from the UI thread.
Note: Transition view behavior can vary for Daydream Activities and viewers, and it cannot be assumed that the transition view will be displayed to the user in all cases. As such, this callback should not be used to gate any critical functionality or logic.
Parameters listener Runnable called on the UI thread when the transition view is dismissed. public void setRenderTargetScale (float scale)Sets the scaling factor for the buffer that the app renders to.
Sets the factor by which we multiply the resolution of the image we render off-screen before passing it into the DistortionRenderer. This factor must be greater than 0.0 and at most 1.0. The renderer's onDrawFrame method will receive a Viewport with size (W * scale) x (H * scale) where W and H is the full size of the render target. When set to 1.0, the scene is rendered at approximately 150% of the device's display resolution. This results in a 1-to-1 pixel size ratio at the center of the distorted image but has a significant performance impact.
This factor has no effect if distortion correction is not enabled.
1.0 by default. Changes will be effective from the first frame after this call.
Parameters scale The factor by which the resolution is multiplied. Greater than 0.0 and at most 1.0. public void setRenderer (GvrView.StereoRenderer renderer)Sets a renderer that delegates all details about stereoscopic rendering to the view.
Only one renderer should be set during the entire lifetime of this object. See the StereoRenderer
interface for details.
null
. public void setRenderer (GvrView.Renderer renderer)
Sets a renderer that handles all stereoscoping rendering details by itself.
Only one renderer should be set during the entire lifetime of this object. See the Renderer
interface for details.
null
. public void setStereoModeEnabled (boolean enabled)
Enables or disables stereo rendering mode.
Controls stereo rendering and distortion correction. Enabled by default. Changes will be effective from the first frame after this call.
If disabled, no interpupillary distance will be applied to the eye transformations, automatic distortion correction will not take place, field of view and perspective may look off especially if the view is not set to fullscreen. Changes will be applied to the next frames being drawn.
See the documentation of the Renderer
and StereoRenderer
interfaces for details on how they are affected by stereo mode.
true
to enable stereo mode, false
to disable. public void setTransitionViewEnabled (boolean enabled)
Enables/disables the transition view used to prompt the user to place their phone into a GVR viewer.
Note: Transition view behavior can vary for Daydream Activities and viewers, and may not respect the user setting.
Parameters enabled Whether the transition view is enabled. Disabled by default. public void shutdown ()Shuts down the GvrView implementation, freeing associated resources.
This method should typically be called from the hosting activity's onDestroy() method.
Note: This method should *always* be called by the creator to properly dispose of resources. After shutdown, the caller is responsible for ensuring that the GvrView
instance is no longer explicitly used.
Updates the physical parameters of the GVR viewer used for rendering.
Changes will be effective from the first frame after this call until the next call to onResume()
. The caller is responsible for injecting the parameters again after onResume()
.
Note: This method is only supported when using a Cardboard headset, and only updates the parameters for the current application.
Parameters gvrViewerParams Physical parameters of a GVR-compatible viewer. Ignores the request if the object is null or same as current. public void updateScreenParams (ScreenParams screenParams)Updates the screen parameters used for rendering.
Updates the screen parameters of the display inserted in the Cardboard. Changes will be effective from the first frame after this call until the next call to onResume()
. The caller is responsible for injecting the parameters again after onResume()
.
Note: This method is only supported when using a Cardboard headset, and only updates the parameters for the current application.
Parameters screenParams Parameters to update. Ignored if null.All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["`GvrView` is an Android View designed for VR rendering in fullscreen, supporting landscape orientations and offering two rendering interfaces: `GvrView.StereoRenderer` and `GvrView.Renderer`."],["Developers can switch between stereo and mono rendering modes, enable Cardboard trigger emulation, control asynchronous reprojection, and manage distortion correction using provided methods."],["Key methods include `setStereoModeEnabled()`, `enableCardboardTriggerEmulation()`, `setAsyncReprojectionEnabled()`, `setDistortionCorrectionEnabled()`, `onPause()`, `onResume()`, and others for managing various aspects of the VR experience."],["`GvrView` provides a foundation for building VR applications on Android, handling key aspects like rendering, head tracking, and stereo/mono modes for full-screen, landscape-oriented VR experiences."],["While offering flexibility in rendering approaches, `GvrView` encourages the use of the simpler `GvrView.StereoRenderer` interface for easier development."]]],["`GvrView` is a `View` for VR rendering, offering `StereoRenderer` for stereoscopic rendering and `Renderer` for manual control. Key features include switching between stereo/mono modes, managing distortion correction and asynchronous reprojection, setting rendering target scale, and controlling head tracking with recentering. It handles Cardboard trigger events and allows updates to viewer/screen parameters. Additional functionalities include lifecycle methods (pause/resume), queueing GL events, shutting down, getting gvrApi and HeadMountedDisplay and setting close button/transition view listener.\n"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4