语言

TvInteractiveAppView.SetCallback 方法

定义

设置将事件调度到此 TvInteractiveAppView 时要调用的回调。

[Android.Runtime.Register("setCallback", "(Ljava/util/concurrent/Executor;Landroid/media/tv/interactive/TvInteractiveAppView$TvInteractiveAppCallback;)V", "GetSetCallback_Ljava_util_concurrent_Executor_Landroid_media_tv_interactive_TvInteractiveAppView_TvInteractiveAppCallback_Handler", ApiSince=33)]
public virtual void SetCallback(Java.Util.Concurrent.IExecutor executor, Android.Media.TV.Interactive.TvInteractiveAppView.TvInteractiveAppCallback callback);
[<Android.Runtime.Register("setCallback", "(Ljava/util/concurrent/Executor;Landroid/media/tv/interactive/TvInteractiveAppView$TvInteractiveAppCallback;)V", "GetSetCallback_Ljava_util_concurrent_Executor_Landroid_media_tv_interactive_TvInteractiveAppView_TvInteractiveAppCallback_Handler", ApiSince=33)>]
abstract member SetCallback : Java.Util.Concurrent.IExecutor * Android.Media.TV.Interactive.TvInteractiveAppView.TvInteractiveAppCallback -> unit
override this.SetCallback : Java.Util.Concurrent.IExecutor * Android.Media.TV.Interactive.TvInteractiveAppView.TvInteractiveAppCallback -> unit

参数

executor
IExecutor

此值不能为 null。 回调和侦听器事件通过此执行程序调度,提供一种控制使用哪个线程的简单方法。 若要通过应用程序的主线程调度事件,可以使用 Context.getMainExecutor()。 否则,请提供调度到相应线程的执行程序。

callback
TvInteractiveAppView.TvInteractiveAppCallback

用于接收事件的回调。 不得为 null。

特性

注解

设置将事件调度到此 TvInteractiveAppView 时要调用的回调。

Android 参考。android.media.tv.interactive.TvInteractiveAppView.setCallback

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于