Stay organized with collections Save and categorize content based on your preferences.
A View that wraps and supports a concrete VR presentation view (usually a SurfaceView).
This class operates as the *root* View of a VR scene. It abstracts a number of VR-related auxiliary tasks, e.g., presenting to an external display, obtaining a handle to the Google VR API wrapper and supporting "asynchronous reprojection"-based low-latency rendering.
The client is responsible for installing a "presentation" view. This is the view to which the VR scene (*not 2D, View-based UI*) should be rendered, and will most often be some deriviative of a SurfaceView, e.g., GLSurfaceView. It is this presentation view that owns the render loop; GvrLayout itself does not perform rendering unless asynchronous reprojection is enabled and supported by the client. A typical setup might look something like:
GvrApi
instance to inform and perform stereo rendering, e.g., gvrApi = gvrLayout.getApi(); nativeOnDrawFrame(gvrApi.getNativeGvrContext());The GvrLayout must be notified when the activity is paused and resumed. GvrLayout clients are required to call onPause()
when the activity pauses and onResume()
when the activity resumes. These calls allow GvrLayout to detach and reattach any listeners it uses to monitor for external displays. The GvrLayout should also be explicitly shut down by the client using shutdown()
, typically when the activity is being destroyed.
Note: This class is *not* generally thread-safe, and should be used solely on the UI thread unless otherwise noted. The same applies for the GvrApi
instance owned by this class and exposed via getGvrApi()
.
addStatesFromChildren()
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 GvrLayout (Context context)Creates a new GvrLayout
instance.
GvrLayout
instance.Creates a new GvrLayout
instance.
GvrLayout
instance.Enables asynchronous reprojection with supported for protected buffers. Applications should stop calling eglSwapBuffers on their native view once this feature is enabled. Will only activate on VR-Ready devices. Once asynchronous reprojection is enabled, it cannot be disabled.
This function must be called before any calls to initializeGl()
on the GvrApi
instance, and must be called on the UI thread.
true
if enabling the feature worked, false
otherwise.Enables video Surface with async reprojection.
Applications should set the Surface as the output buffer for their Media playback. Video rendering will occur on the reprojection thread, and so will not be limited to App framerate.
Note: This will implicitly invoke setAsyncReprojectionEnabled(boolean)
.
GvrLayout.ExternalSurfaceListener
to receive callbacks from the video Surface. Cannot be null. handler The Handler that listener events are posted to. Cannot be null. useProtectedBuffers Whether to use protected buffers when rendering to the video Surface. Returns
true
if setting the feature worked, false
otherwise.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 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 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 tracker the user's head motion, which may be less than intuitive for users accustomed to controller-driven reticle motion in a typical Daydream app.
Parameters cardboardTriggerListener The callback to execute when a simulated Cardboard trigger event (Daydream controller button press) is detected. Must not be null. ReturnsGets the GvrApi
object associated with the GvrLayout
.
Typical usage of the GvrApi object will take place in the presentation View's render loop, as provided via setPresentationView
. However, this is not a strict requirement. In either case, it is up to the caller to ensure that the api is used in a thread-safe fashion, as GvrApi itself is not strictly thread-safe.
Once created, the GvrApi instance will remain alive and valid for the duration of GvrLayout's existence.
Note: The returned GvrApi
instance is *live* from the moment of creation, and will start head tracking immediately. The caller should pause and/or resume tracking as desired, typically using the Activity pause and resume signals.
Returns the GvrUiLayout
associated with this view.
The UI layout provides the static, 2D UI overlays like the settings gear icon and the stereo divider line. It is attached and initialized by default when the GvrLayout is created.
public void onBackPressed ()Optional hook the client can trigger from Activity.onBackPressed().
This will invoke the currently configured "close" behavior for the layout. 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 ()This must be called when the parent activity is paused.
public void onResume ()This must be called when the parent activity is resumed.
public boolean setAsyncReprojectionEnabled (boolean enabled)Enables or disables asynchronous reprojection. Applications should stop calling eglSwapBuffers on their native view once this feature is enabled. Will only activate on VR-Ready devices. Once asynchronous reprojection is enabled, it cannot be disabled.
This function must be called before any calls to initializeGl()
on the GvrApi
instance, and must be called on the UI thread.
true
to enable async reprojection,
false to disable. Returns
true
if setting the feature worked, false
otherwise.Updates the pipeline to accommodate a custom, fixed presentation surface size.
By default, the renderer assumes that the display size matches the surface size. If that is the case for the client app, this method need never be called. However, in certain cases (e.g., hardware scaling via SurfaceView.setFixedSize()), this will not always hold, in which case the vr pipeline must be informed of the custom surface size, e.g., surfaceView.getHolder().setFixedSize(1280, 720); gvrLayout.setPresentationView(surfaceView); gvrLayout.setFixedPresentationSurfaceSize(1280, 720);
If both surface dimensions are set to 0, it is assumed that the rendering surface dimensions match that of the active display.
Note: A custom surface size will *also* change the recommended render target and screen target sizes. The caller should respond accordingly.
Warning: This method calls into GvrApi
, and so should be called on the same thread on which the GvrApi
instance is used for rendering (or the caller should otheriwise ensure thread-safe GvrApi access).
Sets the presentation view to a given View. The presentation view will be placed at the bottom of this layout, and will be reparented whenever an appropriate external display is discovered. Any previously presented view will be removed and discarded.
This view should contain the stereo content for consumption through a Cardboard device, and not any mono content.
Reparenting to an external display is only supported on devices with Android APIs > 16. For API 16, the passed in presentationView is always attached to the GvrLayout and never reparented.
Parameters view a view with stereo VR content public void shutdown ()Shuts down the GvrLayout
, freeing associated resources.
This should be called when the parent activity is destroyed.
Warning: This will shut down the GvrApi
instance. The caller is responsible for ensuring safe interaction with these objects after shutdown.
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."],[[["GvrLayout serves as the root view for VR scenes in Android, handling VR-specific tasks like external display presentation and asynchronous reprojection."],["It simplifies VR development by providing a framework for managing the presentation view, interacting with the Google VR API, and optimizing rendering for low latency."],["Developers use GvrLayout to create and install a presentation view (typically a SurfaceView), attach it to the GvrLayout, and then add the GvrLayout to the activity's view hierarchy."],["GvrLayout offers essential lifecycle management methods (onPause, onResume, shutdown) and thread safety considerations (primarily used on the UI thread)."],["It provides access to important functionalities such as asynchronous reprojection, Cardboard trigger emulation, GvrApi interaction, and UI layout management through dedicated methods."]]],["`GvrLayout` manages VR scenes in Android, serving as the root view for VR content and handling external display presentation. It hosts a presentation view (e.g., `SurfaceView`) responsible for the rendering loop, except during asynchronous reprojection. Key actions include setting up the presentation view within `GvrLayout`, integrating it into the activity's hierarchy, and using `GvrApi` for stereo rendering. It manages lifecycle events (`onPause`, `onResume`, `shutdown`), supports asynchronous reprojection, and offers methods to manage focus, children, layout, drawing, event handling, and accessibility. It is not thread-safe.\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