語言

InlineSuggestion.Inflate(Context, Size, IExecutor, IConsumer) 方法

定義

將此建議內容放大到特定大小的視圖。

[Android.Runtime.Register("inflate", "(Landroid/content/Context;Landroid/util/Size;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=30)]
public void Inflate(Android.Content.Context context, Android.Util.Size size, Java.Util.Concurrent.IExecutor callbackExecutor, Java.Util.Functions.IConsumer callback);
[<Android.Runtime.Register("inflate", "(Landroid/content/Context;Landroid/util/Size;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=30)>]
member this.Inflate : Android.Content.Context * Android.Util.Size * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

參數

context
Context

要有背景來誇大這個觀點。

size
Size

該如何放大這個暗示。 對每個維度,可能是精確值或 ViewGroup.LayoutParams#WRAP_CONTENT。

callbackExecutor
IExecutor
callback
IConsumer

回調接收膨脹的視圖,視 ViewGroup.LayoutParams 圖的 為底層遙距視圖的實際大小。

屬性

備註

將此建議內容放大到特定大小的視圖。

每個尺寸的維度必須滿足以下一項條件:

<OL><LI>在 android.widget.inline.InlinePresentationSpec#getMinSize()android.widget.inline.InlinePresentationSpec#getMaxSize() LimInfo<>/OL 的 Presentation spec ViewGroup.LayoutParams#WRAP_CONTENT<之間與>

若將大小設定為 ViewGroup.LayoutParams#WRAP_CONTENT,則膨脹後的視圖大小將剛好能容納內容,同時符合 android.widget.inline.InlinePresentationSpec。

來電者可以在觀看圖的「接收點擊」和「長點擊」事件中附加 android.view.View.OnClickListener 一個 and/或a android.view.View.OnLongClickListenercallback 。

Java 文件 android.view.inputmethod.InlineSuggestion.inflate(android.content.Context, android.util.Size, java.util.concurrent.Executor, java.util.function.Consumer<android.widget.inline.InlineContentView>)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於