Google is committed to advancing racial equity for Black communities. See how.

InlineSuggestionsHostView

@RequiresApi(29) open class InlineSuggestionsHostView : FrameLayout
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.FrameLayout
   ↳ androidx.autofill.InlineSuggestionsHostView

This class is a container for showing inline suggestions for cases where you want to ensure they appear only in a given area in your app. An example is having a scrollable list of suggestions with an icon on the left and one on the right (think of a suggestion strip with actions on left, right and a scrollable suggestions list in the middle) where scrolling the suggestions should not cover the icons on both sides. Note that without this container the suggestions would cover parts of your app as they are surfaces owned by another process and always appearing on top of your app.

Summary

Public constructors

<init>(@NonNull context: Context)

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?)

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?, @AttrRes defStyleAttr: Int)

Public methods

open Unit
addView(@NonNull child: View, index: Int, @NonNull params: LayoutParams)

open Unit
removeView(@Nullable view: View?)

Public constructors

<init>

InlineSuggestionsHostView(@NonNull context: Context)

<init>

InlineSuggestionsHostView(
    @NonNull context: Context,
    @Nullable attrs: AttributeSet?)

<init>

InlineSuggestionsHostView(
    @NonNull context: Context,
    @Nullable attrs: AttributeSet?,
    @AttrRes defStyleAttr: Int)

Public methods

addView

open fun addView(
    @NonNull child: View,
    index: Int,
    @NonNull params: LayoutParams
): Unit

removeView

open fun removeView(@Nullable view: View?): Unit