Added in API level 36

TvAdView


open class TvAdView : ViewGroup
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.media.tv.ad.TvAdView

Displays contents of TV advertisement services.

Summary

Nested classes
abstract

Interface definition for a callback to be invoked when the unhandled input event is received.

abstract

Callback used to receive various status updates on the TvAdView.

Inherited XML attributes
Constants
static String

The error code of an error.

static String

The name of the method where the error happened, if applicable.

Inherited constants
Public constructors
TvAdView(context: Context)

TvAdView(context: Context, attrs: AttributeSet?)

TvAdView(context: Context, attrs: AttributeSet?, defStyleAttr: Int)

Public methods
open Unit

Clears the callback.

open Unit

Clears the OnUnhandledInputEventListener.

open Boolean

Dispatch a key event to the next view on the focus path.

open Boolean

Dispatches an unhandled input event to the next receiver.

open TvAdView.OnUnhandledInputEventListener?

Gets the OnUnhandledInputEventListener.

open Unit
notifyError(errMsg: String, params: Bundle)

Notifies the corresponding TvAdService when there is an error.

open Unit
notifyTvMessage(type: Int, data: Bundle)

This is called to notify the corresponding TV AD service when a new TV message is received.

open Unit

open Unit

open Unit
onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int)

open Unit
onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)

open Boolean

Called when an unhandled input event also has not been handled by the user provided callback.

open Unit
onVisibilityChanged(changedView: View, visibility: Int)

Called when the visibility of the view or an ancestor of the view has changed.

open Unit
prepareAdService(serviceId: String, type: String)

Prepares the AD service of corresponding TvAdService.

open Unit

Resets this TvAdView to release its resources.

open Unit

Resets the AD service.

open Unit
sendCurrentChannelUri(channelUri: Uri?)

Sends current channel URI to related TV AD service.

open Unit

Sends current TV input ID to related TV AD service.

open Unit

Sends current video bounds to related TV AD service.

open Unit
sendSigningResult(signingId: String, result: ByteArray)

Sends signing result to related TV AD service.

open Unit

Sends track info list to related TV AD service.

open Unit

Sets the callback to be invoked when an event is dispatched to this TvAdView.

open Unit

Sets a listener to be invoked when an input event is not handled by the TV AD service.

open Boolean
setTvView(tvView: TvView?)

Sets the TvAdView to receive events from TvInputService.

open Unit
setZOrderMediaOverlay(isMediaOverlay: Boolean)

Controls whether the TvAdView's surface is placed on top of other regular surface views in the window (but still behind the window itself).

open Unit

Controls whether the TvAdView's surface is placed on top of its window.

open Unit

Starts the AD service.

open Unit

Stops the AD service.

Inherited functions