SoundPool.Builder.SetContext(Context) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置 SoundPool 所属的上下文。
[Android.Runtime.Register("setContext", "(Landroid/content/Context;)Landroid/media/SoundPool$Builder;", "GetSetContext_Landroid_content_Context_Handler", ApiSince=34)]
public virtual Android.Media.SoundPool.Builder SetContext(Android.Content.Context context);
[<Android.Runtime.Register("setContext", "(Landroid/content/Context;)Landroid/media/SoundPool$Builder;", "GetSetContext_Landroid_content_Context_Handler", ApiSince=34)>]
abstract member SetContext : Android.Content.Context -> Android.Media.SoundPool.Builder
override this.SetContext : Android.Content.Context -> Android.Media.SoundPool.Builder
参数
- context
- Context
非 null 上下文实例
返回
同一个 Builder 实例。 此值不能为 null。
- 特性
注解
设置 SoundPool 所属的上下文。 上下文将用于拉取信息,例如 AttributionSource 和设备特定的音频会话 ID,这些 ID 将与 SoundPool 相关联。 但是,初始化后,SoundPool 实例不会保留上下文本身。
Android 参考。android.media.SoundPool.Builder.setContext
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。