InlineSuggestion.Inflate(Context, Size, IExecutor, IConsumer) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Inflates a view with the content of this suggestion at a specific size.
[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
Parameters
- context
- Context
Context in which to inflate the view.
- size
- Size
The size at which to inflate the suggestion. For each dimension, it maybe an
exact value or ViewGroup.LayoutParams#WRAP_CONTENT
.
- callbackExecutor
- IExecutor
- callback
- IConsumer
Callback for receiving the inflated view, where the ViewGroup.LayoutParams
of the view is set as the actual size of the
underlying remote view.
- Attributes
Remarks
Inflates a view with the content of this suggestion at a specific size.
Each dimension of the size must satisfy one of the following conditions:
<ol> <li>between android.widget.inline.InlinePresentationSpec#getMinSize()
and android.widget.inline.InlinePresentationSpec#getMaxSize()
of the presentation spec from mInfo
<li>ViewGroup.LayoutParams#WRAP_CONTENT
</ol>
If the size is set to ViewGroup.LayoutParams#WRAP_CONTENT
, then the size of the inflated view will be just large enough to fit the content, while still conforming to the min / max size specified by the android.widget.inline.InlinePresentationSpec
.
The caller can attach an android.view.View.OnClickListener
and/or an android.view.View.OnLongClickListener
to the view in the callback
to receive click and long click events on the view.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.