Package com.mapbox.mapboxsdk.maps.renderer.glsurfaceview

Contains the Mapbox Maps Android GLSurfaceView API classes.

Types

Name Summary
GLSurfaceViewMapRenderer
open class GLSurfaceViewMapRenderer : MapRenderer, GLSurfaceView.Renderer
The GLSurfaceViewMapRenderer encapsulates the GL thread and GLSurfaceView specifics to render the map.
MapboxGLSurfaceView
open class MapboxGLSurfaceView : SurfaceView, SurfaceHolder.Callback2
GLSurfaceView extension that notifies a listener when the view is detached from window, which is the point of destruction of the GL thread.

GLSurfaceViewMapRenderer

open class GLSurfaceViewMapRenderer : MapRenderer, GLSurfaceView.Renderer

The GLSurfaceViewMapRenderer encapsulates the GL thread and GLSurfaceView specifics to render the map.

See also

Name Summary
com.mapbox.mapboxsdk.maps.renderer.MapRenderer  
   

Constructors

Name Summary
GLSurfaceViewMapRenderer open fun GLSurfaceViewMapRenderer(context: Context, glSurfaceView: MapboxGLSurfaceView, localIdeographFontFamily: String)

Functions

Name Summary
onDestroy
open fun onDestroy()
onDrawFrame
abstract fun onDrawFrame(p: GL10)
open fun onDrawFrame(gl: GL10)
onPause
open fun onPause()
onResume
open fun onResume()
onStart
open fun onStart()
onStop
open fun onStop()
onSurfaceChanged
abstract fun onSurfaceChanged(p: GL10, p1: Int, p2: Int)
open fun onSurfaceChanged(gl: GL10, width: Int, height: Int)
onSurfaceCreated
abstract fun onSurfaceCreated(p: GL10, p1: EGLConfig)
open fun onSurfaceCreated(gl: GL10, config: EGLConfig)
queueEvent
open fun queueEvent(runnable: Runnable)
@CallSuper()
open fun queueEvent(runnable: MapRendererRunnable)
May be called from any thread.
requestRender
open fun requestRender()
May be called from any thread.
setMaximumFps
open fun setMaximumFps(maximumFps: Int)
The max frame rate at which this render is rendered,but it can’t excess the ability of device hardware.
setOnFpsChangedListener
open fun setOnFpsChangedListener(listener: MapboxMap.OnFpsChangedListener)

onDestroy

open fun onDestroy()

onDrawFrame

open fun onDrawFrame(gl: GL10)

onPause

open fun onPause()

onResume

open fun onResume()

onStart

open fun onStart()

onStop

open fun onStop()

onSurfaceChanged

open fun onSurfaceChanged(gl: GL10, width: Int, height: Int)

onSurfaceCreated

open fun onSurfaceCreated(gl: GL10, config: EGLConfig)

queueEvent

open fun queueEvent(runnable: Runnable)

May be called from any thread.

Schedules work to be performed on the MapRenderer thread.

Parameters
Name Summary
runnable
the runnable to execute
   
   

requestRender

open fun requestRender()

May be called from any thread.

Called from the renderer frontend to schedule a render.

MapboxGLSurfaceView

open class MapboxGLSurfaceView : SurfaceView, SurfaceHolder.Callback2

GLSurfaceView extension that notifies a listener when the view is detached from window, which is the point of destruction of the GL thread.

Constructors

Name Summary
MapboxGLSurfaceView open fun MapboxGLSurfaceView(context: Context)Standard View constructor.
MapboxGLSurfaceView open fun MapboxGLSurfaceView(context: Context, attrs: AttributeSet)Standard View constructor.

Types

Name Summary
GLThread
open class GLThread : Thread
A generic GL Thread.
LogWriter
open class LogWriter : Writer
OnGLSurfaceViewDetachedListener
interface OnGLSurfaceViewDetachedListener
Listener interface that notifies when a MapboxGLSurfaceView is detached from window.

Functions

Name Summary
addChildrenForAccessibility
open fun addChildrenForAccessibility(outChildren: ArrayList)
addExtraDataToAccessibilityNodeInfo
open fun addExtraDataToAccessibilityNodeInfo(info: AccessibilityNodeInfo, extraDataKey: String, arguments: Bundle)
addFocusables
open fun addFocusables(views: ArrayList, direction: Int)
addKeyboardNavigationClusters
open fun addKeyboardNavigationClusters(views: Collection, direction: Int)
addOnAttachStateChangeListener
open fun addOnAttachStateChangeListener(listener: View.OnAttachStateChangeListener)
addOnLayoutChangeListener
open fun addOnLayoutChangeListener(listener: View.OnLayoutChangeListener)
addOnUnhandledKeyEventListener
open fun addOnUnhandledKeyEventListener(listener: View.OnUnhandledKeyEventListener)
addTouchables
open fun addTouchables(views: ArrayList)
animate
open fun animate(): ViewPropertyAnimator
announceForAccessibility
open fun announceForAccessibility(text: CharSequence)
autofill
open fun autofill(value: AutofillValue)
awakenScrollBars
open fun awakenScrollBars(): Boolean
bringToFront
open fun bringToFront()
buildDrawingCache
open fun buildDrawingCache()
buildLayer
open fun buildLayer()
callOnClick
open fun callOnClick(): Boolean
cancelDragAndDrop
fun cancelDragAndDrop()
cancelLongPress
open fun cancelLongPress()
cancelPendingInputEvents
fun cancelPendingInputEvents()
canResolveLayoutDirection
open fun canResolveLayoutDirection(): Boolean
canResolveTextAlignment
open fun canResolveTextAlignment(): Boolean
canResolveTextDirection
open fun canResolveTextDirection(): Boolean
canScrollHorizontally
open fun canScrollHorizontally(direction: Int): Boolean
canScrollVertically
open fun canScrollVertically(direction: Int): Boolean
checkInputConnectionProxy
open fun checkInputConnectionProxy(view: View): Boolean
clearAnimation
open fun clearAnimation()
clearFocus
open fun clearFocus()
combineMeasuredStates
open fun combineMeasuredStates(curState: Int, newState: Int): Int
computeHorizontalScrollExtent
open fun computeHorizontalScrollExtent(): Int
computeHorizontalScrollOffset
open fun computeHorizontalScrollOffset(): Int
computeHorizontalScrollRange
open fun computeHorizontalScrollRange(): Int
computeScroll
open fun computeScroll()
computeSystemWindowInsets
open fun computeSystemWindowInsets(in: WindowInsets, outLocalInsets: Rect): WindowInsets
computeVerticalScrollExtent
open fun computeVerticalScrollExtent(): Int
computeVerticalScrollOffset
open fun computeVerticalScrollOffset(): Int
computeVerticalScrollRange
open fun computeVerticalScrollRange(): Int
createAccessibilityNodeInfo
open fun createAccessibilityNodeInfo(): AccessibilityNodeInfo
createContextMenu
open fun createContextMenu(menu: ContextMenu)
destroyDrawingCache
open fun destroyDrawingCache()
dispatchApplyWindowInsets
open fun dispatchApplyWindowInsets(insets: WindowInsets): WindowInsets
dispatchCapturedPointerEvent
open fun dispatchCapturedPointerEvent(event: MotionEvent): Boolean
dispatchConfigurationChanged
open fun dispatchConfigurationChanged(newConfig: Configuration)
dispatchDisplayHint
open fun dispatchDisplayHint(hint: Int)
dispatchDragEvent
open fun dispatchDragEvent(event: DragEvent): Boolean
dispatchDraw
open fun dispatchDraw(canvas: Canvas)
dispatchDrawableHotspotChanged
open fun dispatchDrawableHotspotChanged(x: Float, y: Float)
dispatchFinishTemporaryDetach
open fun dispatchFinishTemporaryDetach()
dispatchGenericFocusedEvent
open fun dispatchGenericFocusedEvent(event: MotionEvent): Boolean
dispatchGenericMotionEvent
open fun dispatchGenericMotionEvent(event: MotionEvent): Boolean
dispatchGenericPointerEvent
open fun dispatchGenericPointerEvent(event: MotionEvent): Boolean
dispatchHoverEvent
open fun dispatchHoverEvent(event: MotionEvent): Boolean
dispatchKeyEvent
open fun dispatchKeyEvent(event: KeyEvent): Boolean
dispatchKeyEventPreIme
open fun dispatchKeyEventPreIme(event: KeyEvent): Boolean
dispatchKeyShortcutEvent
open fun dispatchKeyShortcutEvent(event: KeyEvent): Boolean
dispatchNestedFling
open fun dispatchNestedFling(velocityX: Float, velocityY: Float, consumed: Boolean): Boolean
dispatchNestedPreFling
open fun dispatchNestedPreFling(velocityX: Float, velocityY: Float): Boolean
dispatchNestedPrePerformAccessibilityAction
open fun dispatchNestedPrePerformAccessibilityAction(action: Int, arguments: Bundle): Boolean
dispatchNestedPreScroll
open fun dispatchNestedPreScroll(dx: Int, dy: Int, consumed: Array, offsetInWindow: Array): Boolean
dispatchNestedScroll
open fun dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, offsetInWindow: Array): Boolean
dispatchPointerCaptureChanged
open fun dispatchPointerCaptureChanged(hasCapture: Boolean)
dispatchPopulateAccessibilityEvent
open fun dispatchPopulateAccessibilityEvent(event: AccessibilityEvent): Boolean
dispatchProvideAutofillStructure
open fun dispatchProvideAutofillStructure(structure: ViewStructure, flags: Int)
dispatchProvideStructure
open fun dispatchProvideStructure(structure: ViewStructure)
dispatchRestoreInstanceState
open fun dispatchRestoreInstanceState(container: SparseArray)
dispatchSaveInstanceState
open fun dispatchSaveInstanceState(container: SparseArray)
dispatchSetActivated
open fun dispatchSetActivated(activated: Boolean)
dispatchSetPressed
open fun dispatchSetPressed(pressed: Boolean)
dispatchSetSelected
open fun dispatchSetSelected(selected: Boolean)
dispatchStartTemporaryDetach
open fun dispatchStartTemporaryDetach()
dispatchSystemUiVisibilityChanged
open fun dispatchSystemUiVisibilityChanged(visibility: Int)
dispatchTouchEvent
open fun dispatchTouchEvent(event: MotionEvent): Boolean
dispatchTrackballEvent
open fun dispatchTrackballEvent(event: MotionEvent): Boolean
dispatchUnhandledMove
open fun dispatchUnhandledMove(focused: View, direction: Int): Boolean
dispatchVisibilityChanged
open fun dispatchVisibilityChanged(changedView: View, visibility: Int)
dispatchWindowFocusChanged
open fun dispatchWindowFocusChanged(hasFocus: Boolean)
dispatchWindowSystemUiVisiblityChanged
open fun dispatchWindowSystemUiVisiblityChanged(visible: Int)
dispatchWindowVisibilityChanged
open fun dispatchWindowVisibilityChanged(visibility: Int)
draw
open fun draw(canvas: Canvas)
drawableHotspotChanged
open fun drawableHotspotChanged(x: Float, y: Float)
drawableStateChanged
open fun drawableStateChanged()
findFocus
open fun findFocus(): View
findViewById
fun <T : View?> findViewById(id: Int): T
findViewsWithText
open fun findViewsWithText(outViews: ArrayList, searched: CharSequence, flags: Int)
findViewWithTag
fun <T : View?> findViewWithTag(tag: Any): T
fitSystemWindows
open fun fitSystemWindows(insets: Rect): Boolean
focusSearch
open fun focusSearch(direction: Int): View
forceHasOverlappingRendering
open fun forceHasOverlappingRendering(hasOverlappingRendering: Boolean)
forceLayout
open fun forceLayout()
gatherTransparentRegion
open fun gatherTransparentRegion(region: Region): Boolean
generateViewId
open fun generateViewId(): Int
getAccessibilityClassName
open fun getAccessibilityClassName(): CharSequence
getAccessibilityLiveRegion
open fun getAccessibilityLiveRegion(): Int
getAccessibilityNodeProvider
open fun getAccessibilityNodeProvider(): AccessibilityNodeProvider
getAccessibilityPaneTitle
open fun getAccessibilityPaneTitle(): CharSequence
getAccessibilityTraversalAfter
open fun getAccessibilityTraversalAfter(): Int
getAccessibilityTraversalBefore
open fun getAccessibilityTraversalBefore(): Int
getAlpha
open fun getAlpha(): Float
getAnimation
open fun getAnimation(): Animation
getApplicationWindowToken
open fun getApplicationWindowToken(): IBinder
getAutofillHints
open fun getAutofillHints(): Array
getAutofillId
fun getAutofillId(): AutofillId
getAutofillType
open fun getAutofillType(): Int
getAutofillValue
open fun getAutofillValue(): AutofillValue
getBackground
open fun getBackground(): Drawable
getBackgroundTintList
open fun getBackgroundTintList(): ColorStateList
getBackgroundTintMode
open fun getBackgroundTintMode(): PorterDuff.Mode
getBaseline
open fun getBaseline(): Int
getBottom
fun getBottom(): Int
getBottomFadingEdgeStrength
open fun getBottomFadingEdgeStrength(): Float
getBottomPaddingOffset
open fun getBottomPaddingOffset(): Int
getCameraDistance
open fun getCameraDistance(): Float
getClipBounds
open fun getClipBounds(): Rect
open fun getClipBounds(outRect: Rect): Boolean
getClipToOutline
fun getClipToOutline(): Boolean
getContentDescription
open fun getContentDescription(): CharSequence
getContext
fun getContext(): Context
getContextMenuInfo
open fun getContextMenuInfo(): ContextMenu.ContextMenuInfo
getDefaultFocusHighlightEnabled
fun getDefaultFocusHighlightEnabled(): Boolean
getDefaultSize
open fun getDefaultSize(size: Int, measureSpec: Int): Int
getDisplay
open fun getDisplay(): Display
getDrawableState
fun getDrawableState(): Array
getDrawingCache
open fun getDrawingCache(): Bitmap
getDrawingCacheBackgroundColor
open fun getDrawingCacheBackgroundColor(): Int
getDrawingCacheQuality
open fun getDrawingCacheQuality(): Int
getDrawingRect
open fun getDrawingRect(outRect: Rect)
getDrawingTime
open fun getDrawingTime(): Long
getElevation
open fun getElevation(): Float
getFilterTouchesWhenObscured
open fun getFilterTouchesWhenObscured(): Boolean
getFitsSystemWindows
open fun getFitsSystemWindows(): Boolean
getFocusable
open fun getFocusable(): Int
getFocusables
open fun getFocusables(direction: Int): ArrayList
getFocusedRect
open fun getFocusedRect(r: Rect)
getForeground
open fun getForeground(): Drawable
getForegroundGravity
open fun getForegroundGravity(): Int
getForegroundTintList
open fun getForegroundTintList(): ColorStateList
getForegroundTintMode
open fun getForegroundTintMode(): PorterDuff.Mode
getGlobalVisibleRect
open fun getGlobalVisibleRect(r: Rect, globalOffset: Point): Boolean
getHandler
open fun getHandler(): Handler
getHasOverlappingRendering
fun getHasOverlappingRendering(): Boolean
getHeight
fun getHeight(): Int
getHitRect
open fun getHitRect(outRect: Rect)
getHolder
open fun getHolder(): SurfaceHolder
getHorizontalFadingEdgeLength
open fun getHorizontalFadingEdgeLength(): Int
getHorizontalScrollbarHeight
open fun getHorizontalScrollbarHeight(): Int
getId
open fun getId(): Int
getImportantForAccessibility
open fun getImportantForAccessibility(): Int
getImportantForAutofill
open fun getImportantForAutofill(): Int
getKeepScreenOn
open fun getKeepScreenOn(): Boolean
getKeyDispatcherState
open fun getKeyDispatcherState(): KeyEvent.DispatcherState
getLabelFor
open fun getLabelFor(): Int
getLayerType
open fun getLayerType(): Int
getLayoutDirection
open fun getLayoutDirection(): Int
getLayoutParams
open fun getLayoutParams(): ViewGroup.LayoutParams
getLeft
fun getLeft(): Int
getLeftFadingEdgeStrength
open fun getLeftFadingEdgeStrength(): Float
getLeftPaddingOffset
open fun getLeftPaddingOffset(): Int
getLocalVisibleRect
fun getLocalVisibleRect(r: Rect): Boolean
getLocationInWindow
open fun getLocationInWindow(outLocation: Array)
getLocationOnScreen
open fun getLocationOnScreen(outLocation: Array)
getMatrix
open fun getMatrix(): Matrix
getMeasuredHeight
fun getMeasuredHeight(): Int
getMeasuredHeightAndState
fun getMeasuredHeightAndState(): Int
getMeasuredState
fun getMeasuredState(): Int
getMeasuredWidth
fun getMeasuredWidth(): Int
getMeasuredWidthAndState
fun getMeasuredWidthAndState(): Int
getMinimumHeight
open fun getMinimumHeight(): Int
getMinimumWidth
open fun getMinimumWidth(): Int
getNextClusterForwardId
open fun getNextClusterForwardId(): Int
getNextFocusDownId
open fun getNextFocusDownId(): Int
getNextFocusForwardId
open fun getNextFocusForwardId(): Int
getNextFocusLeftId
open fun getNextFocusLeftId(): Int
getNextFocusRightId
open fun getNextFocusRightId(): Int
getNextFocusUpId
open fun getNextFocusUpId(): Int
getOnFocusChangeListener
open fun getOnFocusChangeListener(): View.OnFocusChangeListener
getOutlineAmbientShadowColor
open fun getOutlineAmbientShadowColor(): Int
getOutlineProvider
open fun getOutlineProvider(): ViewOutlineProvider
getOutlineSpotShadowColor
open fun getOutlineSpotShadowColor(): Int
getOverlay
open fun getOverlay(): ViewOverlay
getOverScrollMode
open fun getOverScrollMode(): Int
getPaddingBottom
open fun getPaddingBottom(): Int
getPaddingEnd
open fun getPaddingEnd(): Int
getPaddingLeft
open fun getPaddingLeft(): Int
getPaddingRight
open fun getPaddingRight(): Int
getPaddingStart
open fun getPaddingStart(): Int
getPaddingTop
open fun getPaddingTop(): Int
getParent
fun getParent(): ViewParent
getParentForAccessibility
open fun getParentForAccessibility(): ViewParent
getPivotX
open fun getPivotX(): Float
getPivotY
open fun getPivotY(): Float
getPointerIcon
open fun getPointerIcon(): PointerIcon
getRenderMode
open fun getRenderMode(): Int
Get the current rendering mode.
getResources
open fun getResources(): Resources
getRevealOnFocusHint
fun getRevealOnFocusHint(): Boolean
getRight
fun getRight(): Int
getRightFadingEdgeStrength
open fun getRightFadingEdgeStrength(): Float
getRightPaddingOffset
open fun getRightPaddingOffset(): Int
getRootView
open fun getRootView(): View
getRootWindowInsets
open fun getRootWindowInsets(): WindowInsets
getRotation
open fun getRotation(): Float
getRotationX
open fun getRotationX(): Float
getRotationY
open fun getRotationY(): Float
getScaleX
open fun getScaleX(): Float
getScaleY
open fun getScaleY(): Float
getScrollBarDefaultDelayBeforeFade
open fun getScrollBarDefaultDelayBeforeFade(): Int
getScrollBarFadeDuration
open fun getScrollBarFadeDuration(): Int
getScrollBarSize
open fun getScrollBarSize(): Int
getScrollBarStyle
open fun getScrollBarStyle(): Int
getScrollIndicators
open fun getScrollIndicators(): Int
getScrollX
fun getScrollX(): Int
getScrollY
fun getScrollY(): Int
getSolidColor
open fun getSolidColor(): Int
getStateListAnimator
open fun getStateListAnimator(): StateListAnimator
getSuggestedMinimumHeight
open fun getSuggestedMinimumHeight(): Int
getSuggestedMinimumWidth
open fun getSuggestedMinimumWidth(): Int
getSystemUiVisibility
open fun getSystemUiVisibility(): Int
getTag
open fun getTag(): Any
getTextAlignment
open fun getTextAlignment(): Int
getTextDirection
open fun getTextDirection(): Int
getTooltipText
open fun getTooltipText(): CharSequence
getTop
fun getTop(): Int
getTopFadingEdgeStrength
open fun getTopFadingEdgeStrength(): Float
getTopPaddingOffset
open fun getTopPaddingOffset(): Int
getTouchables
open fun getTouchables(): ArrayList
getTouchDelegate
open fun getTouchDelegate(): TouchDelegate
getTransitionName
open fun getTransitionName(): String
getTranslationX
open fun getTranslationX(): Float
getTranslationY
open fun getTranslationY(): Float
getTranslationZ
open fun getTranslationZ(): Float
getVerticalFadingEdgeLength
open fun getVerticalFadingEdgeLength(): Int
getVerticalScrollbarPosition
open fun getVerticalScrollbarPosition(): Int
getVerticalScrollbarWidth
open fun getVerticalScrollbarWidth(): Int
getViewTreeObserver
open fun getViewTreeObserver(): ViewTreeObserver
getVisibility
open fun getVisibility(): Int
getWidth
fun getWidth(): Int
getWindowAttachCount
open fun getWindowAttachCount(): Int
getWindowId
open fun getWindowId(): WindowId
getWindowSystemUiVisibility
open fun getWindowSystemUiVisibility(): Int
getWindowToken
open fun getWindowToken(): IBinder
getWindowVisibility
open fun getWindowVisibility(): Int
getWindowVisibleDisplayFrame
open fun getWindowVisibleDisplayFrame(outRect: Rect)
getX
open fun getX(): Float
getY
open fun getY(): Float
getZ
open fun getZ(): Float
hasExplicitFocusable
open fun hasExplicitFocusable(): Boolean
hasFocus
open fun hasFocus(): Boolean
hasFocusable
open fun hasFocusable(): Boolean
hasNestedScrollingParent
open fun hasNestedScrollingParent(): Boolean
hasOnClickListeners
open fun hasOnClickListeners(): Boolean
hasOverlappingRendering
open fun hasOverlappingRendering(): Boolean
hasPointerCapture
open fun hasPointerCapture(): Boolean
hasTransientState
open fun hasTransientState(): Boolean
hasWindowFocus
open fun hasWindowFocus(): Boolean
inflate
open fun inflate(context: Context, resource: Int, root: ViewGroup): View
invalidate
open fun invalidate(dirty: Rect)
invalidateDrawable
open fun invalidateDrawable(drawable: Drawable)
invalidateOutline
open fun invalidateOutline()
isAccessibilityFocused
open fun isAccessibilityFocused(): Boolean
isAccessibilityHeading
open fun isAccessibilityHeading(): Boolean
isActivated
open fun isActivated(): Boolean
isAttachedToWindow
open fun isAttachedToWindow(): Boolean
isClickable
open fun isClickable(): Boolean
isContextClickable
open fun isContextClickable(): Boolean
isDirty
open fun isDirty(): Boolean
isDrawingCacheEnabled
open fun isDrawingCacheEnabled(): Boolean
isDuplicateParentStateEnabled
open fun isDuplicateParentStateEnabled(): Boolean
isEnabled
open fun isEnabled(): Boolean
isFocusable
fun isFocusable(): Boolean
isFocusableInTouchMode
fun isFocusableInTouchMode(): Boolean
isFocused
open fun isFocused(): Boolean
isFocusedByDefault
fun isFocusedByDefault(): Boolean
isHapticFeedbackEnabled
open fun isHapticFeedbackEnabled(): Boolean
isHardwareAccelerated
open fun isHardwareAccelerated(): Boolean
isHorizontalFadingEdgeEnabled
open fun isHorizontalFadingEdgeEnabled(): Boolean
isHorizontalScrollBarEnabled
open fun isHorizontalScrollBarEnabled(): Boolean
isHovered
open fun isHovered(): Boolean
isImportantForAccessibility
open fun isImportantForAccessibility(): Boolean
isImportantForAutofill
fun isImportantForAutofill(): Boolean
isInEditMode
open fun isInEditMode(): Boolean
isInLayout
open fun isInLayout(): Boolean
isInTouchMode
open fun isInTouchMode(): Boolean
isKeyboardNavigationCluster
fun isKeyboardNavigationCluster(): Boolean
isLaidOut
open fun isLaidOut(): Boolean
isLayoutDirectionResolved
open fun isLayoutDirectionResolved(): Boolean
isLayoutRequested
open fun isLayoutRequested(): Boolean
isLongClickable
open fun isLongClickable(): Boolean
isNestedScrollingEnabled
open fun isNestedScrollingEnabled(): Boolean
isOpaque
open fun isOpaque(): Boolean
isPaddingOffsetRequired
open fun isPaddingOffsetRequired(): Boolean
isPaddingRelative
open fun isPaddingRelative(): Boolean
isPivotSet
open fun isPivotSet(): Boolean
isPressed
open fun isPressed(): Boolean
isSaveEnabled
open fun isSaveEnabled(): Boolean
isSaveFromParentEnabled
open fun isSaveFromParentEnabled(): Boolean
isScreenReaderFocusable
open fun isScreenReaderFocusable(): Boolean
isScrollbarFadingEnabled
open fun isScrollbarFadingEnabled(): Boolean
isScrollContainer
open fun isScrollContainer(): Boolean
isSelected
open fun isSelected(): Boolean
isShown
open fun isShown(): Boolean
isSoundEffectsEnabled
open fun isSoundEffectsEnabled(): Boolean
isTemporarilyDetached
fun isTemporarilyDetached(): Boolean
isTextAlignmentResolved
open fun isTextAlignmentResolved(): Boolean
isTextDirectionResolved
open fun isTextDirectionResolved(): Boolean
isVerticalFadingEdgeEnabled
open fun isVerticalFadingEdgeEnabled(): Boolean
isVerticalScrollBarEnabled
open fun isVerticalScrollBarEnabled(): Boolean
isVisibleToUserForAutofill
open fun isVisibleToUserForAutofill(virtualId: Int): Boolean
jumpDrawablesToCurrentState
open fun jumpDrawablesToCurrentState()
keyboardNavigationClusterSearch
open fun keyboardNavigationClusterSearch(currentCluster: View, direction: Int): View
layout
open fun layout(l: Int, t: Int, r: Int, b: Int)
measure
fun measure(widthMeasureSpec: Int, heightMeasureSpec: Int)
mergeDrawableStates
open fun mergeDrawableStates(baseState: Array, additionalState: Array): Array
offsetLeftAndRight
open fun offsetLeftAndRight(offset: Int)
offsetTopAndBottom
open fun offsetTopAndBottom(offset: Int)
onAnimationEnd
open fun onAnimationEnd()
onAnimationStart
open fun onAnimationStart()
onApplyWindowInsets
open fun onApplyWindowInsets(insets: WindowInsets): WindowInsets
onAttachedToWindow
open fun onAttachedToWindow()
onCancelPendingInputEvents
open fun onCancelPendingInputEvents()
onCapturedPointerEvent
open fun onCapturedPointerEvent(event: MotionEvent): Boolean
onCheckIsTextEditor
open fun onCheckIsTextEditor(): Boolean
onConfigurationChanged
open fun onConfigurationChanged(newConfig: Configuration)
onCreateContextMenu
open fun onCreateContextMenu(menu: ContextMenu)
onCreateDrawableState
open fun onCreateDrawableState(extraSpace: Int): Array
onCreateInputConnection
open fun onCreateInputConnection(outAttrs: EditorInfo): InputConnection
onDetachedFromWindow
open fun onDetachedFromWindow()
onDisplayHint
open fun onDisplayHint(hint: Int)
onDragEvent
open fun onDragEvent(event: DragEvent): Boolean
onDraw
open fun onDraw(canvas: Canvas)
onDrawForeground
open fun onDrawForeground(canvas: Canvas)
onDrawScrollBars
fun onDrawScrollBars(canvas: Canvas)
onFilterTouchEventForSecurity
open fun onFilterTouchEventForSecurity(event: MotionEvent): Boolean
onFinishInflate
open fun onFinishInflate()
onFinishTemporaryDetach
open fun onFinishTemporaryDetach()
onFocusChanged
open fun onFocusChanged(gainFocus: Boolean, direction: Int, previouslyFocusedRect: Rect)
onGenericMotionEvent
open fun onGenericMotionEvent(event: MotionEvent): Boolean
onHoverChanged
open fun onHoverChanged(hovered: Boolean)
onHoverEvent
open fun onHoverEvent(event: MotionEvent): Boolean
onInitializeAccessibilityEvent
open fun onInitializeAccessibilityEvent(event: AccessibilityEvent)
onInitializeAccessibilityNodeInfo
open fun onInitializeAccessibilityNodeInfo(info: AccessibilityNodeInfo)
onKeyDown
open fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean
onKeyLongPress
open fun onKeyLongPress(keyCode: Int, event: KeyEvent): Boolean
onKeyMultiple
open fun onKeyMultiple(keyCode: Int, repeatCount: Int, event: KeyEvent): Boolean
onKeyPreIme
open fun onKeyPreIme(keyCode: Int, event: KeyEvent): Boolean
onKeyShortcut
open fun onKeyShortcut(keyCode: Int, event: KeyEvent): Boolean
onKeyUp
open fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean
onLayout
open fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int)
onMeasure
open fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)
onOverScrolled
open fun onOverScrolled(scrollX: Int, scrollY: Int, clampedX: Boolean, clampedY: Boolean)
onPause
open fun onPause()
Pause the rendering thread, optionally tearing down the EGL contextdepending upon the value of setPreserveEGLContextOnPause.
onPointerCaptureChange
open fun onPointerCaptureChange(hasCapture: Boolean)
onPopulateAccessibilityEvent
open fun onPopulateAccessibilityEvent(event: AccessibilityEvent)
onProvideAutofillStructure
open fun onProvideAutofillStructure(structure: ViewStructure, flags: Int)
onProvideAutofillVirtualStructure
open fun onProvideAutofillVirtualStructure(structure: ViewStructure, flags: Int)
onProvideStructure
open fun onProvideStructure(structure: ViewStructure)
onProvideVirtualStructure
open fun onProvideVirtualStructure(structure: ViewStructure)
onResolvePointerIcon
open fun onResolvePointerIcon(event: MotionEvent, pointerIndex: Int): PointerIcon
onRestoreInstanceState
open fun onRestoreInstanceState(state: Parcelable)
onResume
open fun onResume()
Resumes the rendering thread, re-creating the OpenGL context if necessary.
onRtlPropertiesChanged
open fun onRtlPropertiesChanged(layoutDirection: Int)
onSaveInstanceState
open fun onSaveInstanceState(): Parcelable
onScreenStateChanged
open fun onScreenStateChanged(screenState: Int)
onScrollChanged
open fun onScrollChanged(l: Int, t: Int, oldl: Int, oldt: Int)
onSetAlpha
open fun onSetAlpha(alpha: Int): Boolean
onSizeChanged
open fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int)
onStartTemporaryDetach
open fun onStartTemporaryDetach()
onTouchEvent
open fun onTouchEvent(event: MotionEvent): Boolean
onTrackballEvent
open fun onTrackballEvent(event: MotionEvent): Boolean
onVisibilityAggregated
open fun onVisibilityAggregated(isVisible: Boolean)
onVisibilityChanged
open fun onVisibilityChanged(changedView: View, visibility: Int)
onWindowFocusChanged
open fun onWindowFocusChanged(hasWindowFocus: Boolean)
onWindowSystemUiVisibilityChanged
open fun onWindowSystemUiVisibilityChanged(visible: Int)
onWindowVisibilityChanged
open fun onWindowVisibilityChanged(visibility: Int)
overScrollBy
open fun overScrollBy(deltaX: Int, deltaY: Int, scrollX: Int, scrollY: Int, scrollRangeX: Int, scrollRangeY: Int, maxOverScrollX: Int, maxOverScrollY: Int, isTouchEvent: Boolean): Boolean
performAccessibilityAction
open fun performAccessibilityAction(action: Int, arguments: Bundle): Boolean
performClick
open fun performClick(): Boolean
performContextClick
open fun performContextClick(x: Float, y: Float): Boolean
performHapticFeedback
open fun performHapticFeedback(feedbackConstant: Int): Boolean
performLongClick
open fun performLongClick(): Boolean
playSoundEffect
open fun playSoundEffect(soundConstant: Int)
post
open fun post(action: Runnable): Boolean
postDelayed
open fun postDelayed(action: Runnable, delayMillis: Long): Boolean
postInvalidate
open fun postInvalidate()
postInvalidateDelayed
open fun postInvalidateDelayed(delayMilliseconds: Long)
postInvalidateOnAnimation
open fun postInvalidateOnAnimation()
postOnAnimation
open fun postOnAnimation(action: Runnable)
postOnAnimationDelayed
open fun postOnAnimationDelayed(action: Runnable, delayMillis: Long)
queueEvent
open fun queueEvent(r: Runnable)
Queue a runnable to be run on the GL rendering thread.
refreshDrawableState
open fun refreshDrawableState()
releasePointerCapture
open fun releasePointerCapture()
removeCallbacks
open fun removeCallbacks(action: Runnable): Boolean
removeOnAttachStateChangeListener
open fun removeOnAttachStateChangeListener(listener: View.OnAttachStateChangeListener)
removeOnLayoutChangeListener
open fun removeOnLayoutChangeListener(listener: View.OnLayoutChangeListener)
removeOnUnhandledKeyEventListener
open fun removeOnUnhandledKeyEventListener(listener: View.OnUnhandledKeyEventListener)
requestApplyInsets
open fun requestApplyInsets()
requestFitSystemWindows
open fun requestFitSystemWindows()
requestFocus
fun requestFocus(): Boolean
requestFocusFromTouch
fun requestFocusFromTouch(): Boolean
requestLayout
open fun requestLayout()
requestPointerCapture
open fun requestPointerCapture()
requestRectangleOnScreen
open fun requestRectangleOnScreen(rectangle: Rect): Boolean
requestRender
open fun requestRender()
Request that the renderer render a frame.This method is typically used when the render mode has been set toRENDERMODE_WHEN_DIRTY, so that frames are only rendered on demand.May be calledfrom any thread.
requestUnbufferedDispatch
fun requestUnbufferedDispatch(event: MotionEvent)
requireViewById
fun <T : View?> requireViewById(id: Int): T
resetPivot
open fun resetPivot()
resolveSize
open fun resolveSize(size: Int, measureSpec: Int): Int
resolveSizeAndState
open fun resolveSizeAndState(size: Int, measureSpec: Int, childMeasuredState: Int): Int
restoreDefaultFocus
open fun restoreDefaultFocus(): Boolean
restoreHierarchyState
open fun restoreHierarchyState(container: SparseArray)
saveHierarchyState
open fun saveHierarchyState(container: SparseArray)
scheduleDrawable
open fun scheduleDrawable(who: Drawable, what: Runnable, when: Long)
scrollBy
open fun scrollBy(x: Int, y: Int)
scrollTo
open fun scrollTo(x: Int, y: Int)
sendAccessibilityEvent
open fun sendAccessibilityEvent(eventType: Int)
sendAccessibilityEventUnchecked
open fun sendAccessibilityEventUnchecked(event: AccessibilityEvent)
setAccessibilityDelegate
open fun setAccessibilityDelegate(delegate: View.AccessibilityDelegate)
setAccessibilityHeading
open fun setAccessibilityHeading(isHeading: Boolean)
setAccessibilityLiveRegion
open fun setAccessibilityLiveRegion(mode: Int)
setAccessibilityPaneTitle
open fun setAccessibilityPaneTitle(accessibilityPaneTitle: CharSequence)
setAccessibilityTraversalAfter
open fun setAccessibilityTraversalAfter(afterId: Int)
setAccessibilityTraversalBefore
open fun setAccessibilityTraversalBefore(beforeId: Int)
setActivated
open fun setActivated(activated: Boolean)
setAlpha
open fun setAlpha(alpha: Float)
setAnimation
open fun setAnimation(animation: Animation)
setAutofillHints
open fun setAutofillHints(autofillHints: Array)
setAutofillId
open fun setAutofillId(id: AutofillId)
setBackground
open fun setBackground(background: Drawable)
setBackgroundColor
open fun setBackgroundColor(color: Int)
setBackgroundDrawable
open fun setBackgroundDrawable(background: Drawable)
setBackgroundResource
open fun setBackgroundResource(resid: Int)
setBackgroundTintList
open fun setBackgroundTintList(tint: ColorStateList)
setBackgroundTintMode
open fun setBackgroundTintMode(tintMode: PorterDuff.Mode)
setBottom
fun setBottom(bottom: Int)
setCameraDistance
open fun setCameraDistance(distance: Float)
setClickable
open fun setClickable(clickable: Boolean)
setClipBounds
open fun setClipBounds(clipBounds: Rect)
setClipToOutline
open fun setClipToOutline(clipToOutline: Boolean)
setContentDescription
open fun setContentDescription(contentDescription: CharSequence)
setContextClickable
open fun setContextClickable(contextClickable: Boolean)
setDefaultFocusHighlightEnabled
open fun setDefaultFocusHighlightEnabled(defaultFocusHighlightEnabled: Boolean)
setDrawingCacheBackgroundColor
open fun setDrawingCacheBackgroundColor(color: Int)
setDrawingCacheEnabled
open fun setDrawingCacheEnabled(enabled: Boolean)
setDrawingCacheQuality
open fun setDrawingCacheQuality(quality: Int)
setDuplicateParentStateEnabled
open fun setDuplicateParentStateEnabled(enabled: Boolean)
setElevation
open fun setElevation(elevation: Float)
setEnabled
open fun setEnabled(enabled: Boolean)
setFadingEdgeLength
open fun setFadingEdgeLength(length: Int)
setFilterTouchesWhenObscured
open fun setFilterTouchesWhenObscured(enabled: Boolean)
setFitsSystemWindows
open fun setFitsSystemWindows(fitSystemWindows: Boolean)
setFocusable
open fun setFocusable(focusable: Boolean)
setFocusableInTouchMode
open fun setFocusableInTouchMode(focusableInTouchMode: Boolean)
setFocusedByDefault
open fun setFocusedByDefault(isFocusedByDefault: Boolean)
setForeground
open fun setForeground(foreground: Drawable)
setForegroundGravity
open fun setForegroundGravity(gravity: Int)
setForegroundTintList
open fun setForegroundTintList(tint: ColorStateList)
setForegroundTintMode
open fun setForegroundTintMode(tintMode: PorterDuff.Mode)
setHapticFeedbackEnabled
open fun setHapticFeedbackEnabled(hapticFeedbackEnabled: Boolean)
setHasTransientState
open fun setHasTransientState(hasTransientState: Boolean)
setHorizontalFadingEdgeEnabled
open fun setHorizontalFadingEdgeEnabled(horizontalFadingEdgeEnabled: Boolean)
setHorizontalScrollBarEnabled
open fun setHorizontalScrollBarEnabled(horizontalScrollBarEnabled: Boolean)
setHovered
open fun setHovered(hovered: Boolean)
setId
open fun setId(id: Int)
setImportantForAccessibility
open fun setImportantForAccessibility(mode: Int)
setImportantForAutofill
open fun setImportantForAutofill(mode: Int)
setKeepScreenOn
open fun setKeepScreenOn(keepScreenOn: Boolean)
setKeyboardNavigationCluster
open fun setKeyboardNavigationCluster(isCluster: Boolean)
setLabelFor
open fun setLabelFor(id: Int)
setLayerPaint
open fun setLayerPaint(paint: Paint)
setLayerType
open fun setLayerType(layerType: Int, paint: Paint)
setLayoutDirection
open fun setLayoutDirection(layoutDirection: Int)
setLayoutParams
open fun setLayoutParams(params: ViewGroup.LayoutParams)
setLeft
fun setLeft(left: Int)
setLongClickable
open fun setLongClickable(longClickable: Boolean)
setMeasuredDimension
fun setMeasuredDimension(measuredWidth: Int, measuredHeight: Int)
setMinimumHeight
open fun setMinimumHeight(minHeight: Int)
setMinimumWidth
open fun setMinimumWidth(minWidth: Int)
setNestedScrollingEnabled
open fun setNestedScrollingEnabled(enabled: Boolean)
setNextClusterForwardId
open fun setNextClusterForwardId(nextClusterForwardId: Int)
setNextFocusDownId
open fun setNextFocusDownId(nextFocusDownId: Int)
setNextFocusForwardId
open fun setNextFocusForwardId(nextFocusForwardId: Int)
setNextFocusLeftId
open fun setNextFocusLeftId(nextFocusLeftId: Int)
setNextFocusRightId
open fun setNextFocusRightId(nextFocusRightId: Int)
setNextFocusUpId
open fun setNextFocusUpId(nextFocusUpId: Int)
setOnApplyWindowInsetsListener
open fun setOnApplyWindowInsetsListener(listener: View.OnApplyWindowInsetsListener)
setOnCapturedPointerListener
open fun setOnCapturedPointerListener(l: View.OnCapturedPointerListener)
setOnClickListener
open fun setOnClickListener(l: View.OnClickListener)
setOnContextClickListener
open fun setOnContextClickListener(l: View.OnContextClickListener)
setOnCreateContextMenuListener
open fun setOnCreateContextMenuListener(l: View.OnCreateContextMenuListener)
setOnDragListener
open fun setOnDragListener(l: View.OnDragListener)
setOnFocusChangeListener
open fun setOnFocusChangeListener(l: View.OnFocusChangeListener)
setOnGenericMotionListener
open fun setOnGenericMotionListener(l: View.OnGenericMotionListener)
setOnHoverListener
open fun setOnHoverListener(l: View.OnHoverListener)
setOnKeyListener
open fun setOnKeyListener(l: View.OnKeyListener)
setOnLongClickListener
open fun setOnLongClickListener(l: View.OnLongClickListener)
setOnScrollChangeListener
open fun setOnScrollChangeListener(l: View.OnScrollChangeListener)
setOnSystemUiVisibilityChangeListener
open fun setOnSystemUiVisibilityChangeListener(l: View.OnSystemUiVisibilityChangeListener)
setOnTouchListener
open fun setOnTouchListener(l: View.OnTouchListener)
setOutlineAmbientShadowColor
open fun setOutlineAmbientShadowColor(color: Int)
setOutlineProvider
open fun setOutlineProvider(provider: ViewOutlineProvider)
setOutlineSpotShadowColor
open fun setOutlineSpotShadowColor(color: Int)
setOverScrollMode
open fun setOverScrollMode(overScrollMode: Int)
setPadding
open fun setPadding(left: Int, top: Int, right: Int, bottom: Int)
setPaddingRelative
open fun setPaddingRelative(start: Int, top: Int, end: Int, bottom: Int)
setPivotX
open fun setPivotX(pivotX: Float)
setPivotY
open fun setPivotY(pivotY: Float)
setPointerIcon
open fun setPointerIcon(pointerIcon: PointerIcon)
setPressed
open fun setPressed(pressed: Boolean)
setRenderMode
open fun setRenderMode(renderMode: Int)
Set the rendering mode.
setRevealOnFocusHint
fun setRevealOnFocusHint(revealOnFocus: Boolean)
setRight
fun setRight(right: Int)
setRotation
open fun setRotation(rotation: Float)
setRotationX
open fun setRotationX(rotationX: Float)
setRotationY
open fun setRotationY(rotationY: Float)
setSaveEnabled
open fun setSaveEnabled(enabled: Boolean)
setSaveFromParentEnabled
open fun setSaveFromParentEnabled(enabled: Boolean)
setScaleX
open fun setScaleX(scaleX: Float)
setScaleY
open fun setScaleY(scaleY: Float)
setScreenReaderFocusable
open fun setScreenReaderFocusable(screenReaderFocusable: Boolean)
setScrollBarDefaultDelayBeforeFade
open fun setScrollBarDefaultDelayBeforeFade(scrollBarDefaultDelayBeforeFade: Int)
setScrollBarFadeDuration
open fun setScrollBarFadeDuration(scrollBarFadeDuration: Int)
setScrollbarFadingEnabled
open fun setScrollbarFadingEnabled(fadeScrollbars: Boolean)
setScrollBarSize
open fun setScrollBarSize(scrollBarSize: Int)
setScrollBarStyle
open fun setScrollBarStyle(style: Int)
setScrollContainer
open fun setScrollContainer(isScrollContainer: Boolean)
setScrollIndicators
open fun setScrollIndicators(indicators: Int)
setScrollX
open fun setScrollX(value: Int)
setScrollY
open fun setScrollY(value: Int)
setSecure
open fun setSecure(isSecure: Boolean)
setSelected
open fun setSelected(selected: Boolean)
setSoundEffectsEnabled
open fun setSoundEffectsEnabled(soundEffectsEnabled: Boolean)
setStateListAnimator
open fun setStateListAnimator(stateListAnimator: StateListAnimator)
setSystemUiVisibility
open fun setSystemUiVisibility(visibility: Int)
setTag
open fun setTag(tag: Any)
setTextAlignment
open fun setTextAlignment(textAlignment: Int)
setTextDirection
open fun setTextDirection(textDirection: Int)
setTooltipText
open fun setTooltipText(tooltipText: CharSequence)
setTop
fun setTop(top: Int)
setTouchDelegate
open fun setTouchDelegate(delegate: TouchDelegate)
setTransitionName
fun setTransitionName(transitionName: String)
setTranslationX
open fun setTranslationX(translationX: Float)
setTranslationY
open fun setTranslationY(translationY: Float)
setTranslationZ
open fun setTranslationZ(translationZ: Float)
setVerticalFadingEdgeEnabled
open fun setVerticalFadingEdgeEnabled(verticalFadingEdgeEnabled: Boolean)
setVerticalScrollBarEnabled
open fun setVerticalScrollBarEnabled(verticalScrollBarEnabled: Boolean)
setVerticalScrollbarPosition
open fun setVerticalScrollbarPosition(position: Int)
setVisibility
open fun setVisibility(visibility: Int)
setWillNotCacheDrawing
open fun setWillNotCacheDrawing(willNotCacheDrawing: Boolean)
setWillNotDraw
open fun setWillNotDraw(willNotDraw: Boolean)
setX
open fun setX(x: Float)
setY
open fun setY(y: Float)
setZ
open fun setZ(z: Float)
setZOrderMediaOverlay
open fun setZOrderMediaOverlay(isMediaOverlay: Boolean)
setZOrderOnTop
open fun setZOrderOnTop(onTop: Boolean)
showContextMenu
open fun showContextMenu(): Boolean
startActionMode
open fun startActionMode(callback: ActionMode.Callback): ActionMode
startAnimation
open fun startAnimation(animation: Animation)
startDrag
fun startDrag(data: ClipData, shadowBuilder: View.DragShadowBuilder, myLocalState: Any, flags: Int): Boolean
startDragAndDrop
fun startDragAndDrop(data: ClipData, shadowBuilder: View.DragShadowBuilder, myLocalState: Any, flags: Int): Boolean
startNestedScroll
open fun startNestedScroll(axes: Int): Boolean
stopNestedScroll
open fun stopNestedScroll()
surfaceChanged
abstract fun surfaceChanged(p: SurfaceHolder, p1: Int, p2: Int, p3: Int)
open fun surfaceChanged(holder: SurfaceHolder, format: Int, w: Int, h: Int)
This method is part of the SurfaceHolder.Callback interface, and isnot normally called or subclassed by clients of GLSurfaceView.
surfaceCreated
abstract fun surfaceCreated(p: SurfaceHolder)
open fun surfaceCreated(holder: SurfaceHolder)
This method is part of the SurfaceHolder.Callback interface, and isnot normally called or subclassed by clients of GLSurfaceView.
surfaceDestroyed
abstract fun surfaceDestroyed(p: SurfaceHolder)
open fun surfaceDestroyed(holder: SurfaceHolder)
This method is part of the SurfaceHolder.Callback interface, and isnot normally called or subclassed by clients of GLSurfaceView.
surfaceRedrawNeeded
abstract fun surfaceRedrawNeeded(p: SurfaceHolder)
surfaceRedrawNeededAsync
open fun surfaceRedrawNeededAsync(holder: SurfaceHolder, drawingFinished: Runnable)
open fun surfaceRedrawNeededAsync(holder: SurfaceHolder, finishDrawing: Runnable)
This method is part of the SurfaceHolder.Callback2 interface, and isnot normally called or subclassed by clients of GLSurfaceView.
toString
open fun toString(): String
unscheduleDrawable
open fun unscheduleDrawable(who: Drawable, what: Runnable)
updateDragShadow
fun updateDragShadow(shadowBuilder: View.DragShadowBuilder)
verifyDrawable
open fun verifyDrawable(who: Drawable): Boolean
willNotCacheDrawing
open fun willNotCacheDrawing(): Boolean
willNotDraw
open fun willNotDraw(): Boolean

Properties

Name Summary
detachedListener private open var detachedListener: MapboxGLSurfaceView.OnGLSurfaceViewDetachedListener
eglConfigChooser private open var eglConfigChooser: GLSurfaceView.EGLConfigChooser
eglContextFactory private open var eglContextFactory: GLSurfaceView.EGLContextFactory
eglWindowSurfaceFactory private open var eglWindowSurfaceFactory: GLSurfaceView.EGLWindowSurfaceFactory
preserveEGLContextOnPause private open var preserveEGLContextOnPause: Boolean
renderer private open var renderer: GLSurfaceView.Renderer

detachedListener

private open var detachedListener: MapboxGLSurfaceView.OnGLSurfaceViewDetachedListener

eglConfigChooser

private open var eglConfigChooser: GLSurfaceView.EGLConfigChooser

eglContextFactory

private open var eglContextFactory: GLSurfaceView.EGLContextFactory

eglWindowSurfaceFactory

private open var eglWindowSurfaceFactory: GLSurfaceView.EGLWindowSurfaceFactory

getRenderMode

open fun getRenderMode(): Int

Get the current rendering mode. May be calledfrom any thread. Must not be called before a renderer has been set.

Return

the current rendering mode.

onPause

open fun onPause()

Pause the rendering thread, optionally tearing down the EGL contextdepending upon the value of setPreserveEGLContextOnPause.

Must not be called before a renderer has been set.

onResume

open fun onResume()

Resumes the rendering thread, re-creating the OpenGL context if necessary. Itis the counterpart to onPause.

Must not be called before a renderer has been set.

preserveEGLContextOnPause

private open var preserveEGLContextOnPause: Boolean

queueEvent

open fun queueEvent(r: Runnable)

Queue a runnable to be run on the GL rendering thread. This can be usedto communicate with the Renderer on the rendering thread.Must not be called before a renderer has been set.

Parameters
Name Summary
r
the runnable to be run on the GL rendering thread.
   
   

renderer

private open var renderer: GLSurfaceView.Renderer

requestRender

open fun requestRender()

Request that the renderer render a frame.This method is typically used when the render mode has been set toRENDERMODE_WHEN_DIRTY, so that frames are only rendered on demand.May be calledfrom any thread. Must not be called before a renderer has been set.

setRenderMode

open fun setRenderMode(renderMode: Int)

Set the rendering mode. When renderMode isRENDERMODE_CONTINUOUSLY, the renderer is calledrepeatedly to re-render the scene. When renderModeis RENDERMODE_WHEN_DIRTY, the renderer only rendered when the surfaceis created, or when requestRender is called. Defaults to RENDERMODE_CONTINUOUSLY.

Using RENDERMODE_WHEN_DIRTY can improve battery life and overall system performanceby allowing the GPU and CPU to idle when the view does not need to be updated.

This method can only be called after setRenderer

Parameters
Name Summary
renderMode
one of the RENDERMODE_X constants
   
   

surfaceChanged

open fun surfaceChanged(holder: SurfaceHolder, format: Int, w: Int, h: Int)

This method is part of the SurfaceHolder.Callback interface, and isnot normally called or subclassed by clients of GLSurfaceView.

surfaceCreated

open fun surfaceCreated(holder: SurfaceHolder)

This method is part of the SurfaceHolder.Callback interface, and isnot normally called or subclassed by clients of GLSurfaceView.

surfaceDestroyed

open fun surfaceDestroyed(holder: SurfaceHolder)

This method is part of the SurfaceHolder.Callback interface, and isnot normally called or subclassed by clients of GLSurfaceView.

surfaceRedrawNeededAsync

open fun surfaceRedrawNeededAsync(holder: SurfaceHolder, finishDrawing: Runnable)

This method is part of the SurfaceHolder.Callback2 interface, and isnot normally called or subclassed by clients of GLSurfaceView.

GLThread

open class GLThread : Thread

A generic GL Thread. Takes care of initializing EGL and GL. Delegatesto a Renderer instance to do the actual drawing. Can be configured torender continuously or on request.

All potentially blocking synchronization is done through thesGLThreadManager object. This avoids multiple-lock ordering issues.

Constructors

Name Summary
GLThread open fun GLThread(glSurfaceViewWeakRef: WeakReference<MapboxGLSurfaceView>)

Functions

Name Summary
ableToDraw
open fun ableToDraw(): Boolean
activeCount
open fun activeCount(): Int
checkAccess
fun checkAccess()
clone
open fun clone(): Any
countStackFrames
open fun countStackFrames(): Int
currentThread
open fun currentThread(): Thread
destroy
open fun destroy()
dumpStack
open fun dumpStack()
enumerate
open fun enumerate(tarray: Array): Int
getAllStackTraces
open fun getAllStackTraces(): Map<Thread, Array>
getContextClassLoader
open fun getContextClassLoader(): ClassLoader
getDefaultUncaughtExceptionHandler
open fun getDefaultUncaughtExceptionHandler(): Thread.UncaughtExceptionHandler
getId
open fun getId(): Long
getName
fun getName(): String
getPriority
fun getPriority(): Int
getStackTrace
open fun getStackTrace(): Array
getState
open fun getState(): Thread.State
getThreadGroup
fun getThreadGroup(): ThreadGroup
getUncaughtExceptionHandler
open fun getUncaughtExceptionHandler(): Thread.UncaughtExceptionHandler
holdsLock
open fun holdsLock(obj: Any): Boolean
interrupt
open fun interrupt()
interrupted
open fun interrupted(): Boolean
isAlive
fun isAlive(): Boolean
isDaemon
fun isDaemon(): Boolean
isInterrupted
open fun isInterrupted(): Boolean
join
fun join(millis: Long)
onPause
open fun onPause()
onResume
open fun onResume()
onWindowResize
open fun onWindowResize(w: Int, h: Int)
queueEvent
open fun queueEvent(r: Runnable)
Queue an “event” to be run on the GL rendering thread.
requestExitAndWait
open fun requestExitAndWait()
requestReleaseEglContextLocked
open fun requestReleaseEglContextLocked()
requestRender
open fun requestRender()
requestRenderAndNotify
open fun requestRenderAndNotify(finishDrawing: Runnable)
resume
fun resume()
run
open fun run()
open fun run()
setContextClassLoader
open fun setContextClassLoader(cl: ClassLoader)
setDaemon
fun setDaemon(on: Boolean)
setDefaultUncaughtExceptionHandler
open fun setDefaultUncaughtExceptionHandler(eh: Thread.UncaughtExceptionHandler)
setName
fun setName(name: String)
setPriority
fun setPriority(newPriority: Int)
setUncaughtExceptionHandler
open fun setUncaughtExceptionHandler(eh: Thread.UncaughtExceptionHandler)
sleep
open fun sleep(millis: Long)
start
open fun start()
stop
fun stop()
surfaceCreated
open fun surfaceCreated()
surfaceDestroyed
open fun surfaceDestroyed()
suspend
fun suspend()
toString
open fun toString(): String
yield
open fun yield()

Properties

Name Summary
renderMode private open var renderMode: Int

ableToDraw

open fun ableToDraw(): Boolean

onPause

open fun onPause()

onResume

open fun onResume()

onWindowResize

open fun onWindowResize(w: Int, h: Int)

queueEvent

open fun queueEvent(r: Runnable)

Queue an “event” to be run on the GL rendering thread.

Parameters
Name Summary
r
the runnable to be run on the GL rendering thread.
   
   

renderMode

private open var renderMode: Int

requestExitAndWait

open fun requestExitAndWait()

requestReleaseEglContextLocked

open fun requestReleaseEglContextLocked()

requestRenderAndNotify

open fun requestRenderAndNotify(finishDrawing: Runnable)

requestRender

open fun requestRender()

run

open fun run()

surfaceCreated

open fun surfaceCreated()

surfaceDestroyed

open fun surfaceDestroyed()

LogWriter

open class LogWriter : Writer

Functions

Name Summary
append
open fun append(csq: CharSequence): Writer
abstract fun append(p: CharSequence): Appendable
close
open fun close()
abstract fun close()
flush
open fun flush()
abstract fun flush()
write
open fun write(c: Int)
open fun write(buf: Array, offset: Int, count: Int)

close

open fun close()

flush

open fun flush()

write

open fun write(buf: Array, offset: Int, count: Int)

OnGLSurfaceViewDetachedListener

interface OnGLSurfaceViewDetachedListener

Listener interface that notifies when a MapboxGLSurfaceView is detached from window.

Functions

Name Summary
onGLSurfaceViewDetached
abstract fun onGLSurfaceViewDetached()
Called when a MapboxGLSurfaceView is detached from window.

onGLSurfaceViewDetached

abstract fun onGLSurfaceViewDetached()

Called when a MapboxGLSurfaceView is detached from window.