View.OnViewTranslationResponse(ViewTranslationResponse) 方法

定义

当翻译服务翻译的内容 View#onCreateViewTranslationRequest 时调用。

[Android.Runtime.Register("onViewTranslationResponse", "(Landroid/view/translation/ViewTranslationResponse;)V", "GetOnViewTranslationResponse_Landroid_view_translation_ViewTranslationResponse_Handler", ApiSince=31)]
public virtual void OnViewTranslationResponse (Android.Views.Translation.ViewTranslationResponse response);
[<Android.Runtime.Register("onViewTranslationResponse", "(Landroid/view/translation/ViewTranslationResponse;)V", "GetOnViewTranslationResponse_Landroid_view_translation_ViewTranslationResponse_Handler", ApiSince=31)>]
abstract member OnViewTranslationResponse : Android.Views.Translation.ViewTranslationResponse -> unit
override this.OnViewTranslationResponse : Android.Views.Translation.ViewTranslationResponse -> unit

参数

response
ViewTranslationResponse

一个 ViewTranslationResponse ,其中包含可在视图中显示的已翻译信息。

属性

注解

当翻译服务翻译的内容 View#onCreateViewTranslationRequest 时调用。 应在此处保存 ,ViewTranslationResponseViewTranslationResponse以便在系统调用 ViewTranslationCallback#onShowTranslation时可以使用 来显示转换。

默认实现将设置可从 获取 View#getViewTranslationResponse的 ViewTranslationResponse。

android.view.View.onViewTranslationResponse(android.view.translation.ViewTranslationResponse)Java 文档。

此页面的部分内容是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的术语使用。

适用于