Skip to content

)}

LayoutViewHost() constructor

Defined in

Type: LayoutViewHost Namespace: ReactiveUI.Reactive Assembly: ReactiveUI.Reactive.dll

Applies to

net10.0-android36.0

Overloads

  • 1. protected LayoutViewHost()
  • 2. protected LayoutViewHost(Context context, int layoutId, ViewGroup parent, bool attachToRoot)
  • 3. protected LayoutViewHost(Context context, int layoutId, ViewGroup parent, bool attachToRoot, Action<LayoutViewHost, View> bind)
  • 4. protected LayoutViewHost(Context context, int layoutId, ViewGroup parent, bool attachToRoot, bool performAutoWireup, ControlFetcherMixins.ResolveStrategy resolveStrategy)

1. Overload

protected LayoutViewHost()

View source

Summary: Initializes a new instance of the LayoutViewHost class.

Remarks

        This constructor performs no inflation or wiring and exists to support
        derived types that manage view creation manually.
        

2. Overload

protected LayoutViewHost(Context context, int layoutId, ViewGroup parent, bool attachToRoot)

View source

Summary: Initializes a new instance of the LayoutViewHost class by inflating a layout resource.

Parameters

NameTypeDescription
contextContextThe Android context.
layoutIdintThe layout resource identifier.
parentViewGroupThe parent view group.
attachToRootboolWhether to attach the inflated view to the parent.

Remarks

This constructor is fully AOT- and trimming-safe.

No automatic control wiring is performed. Consumers are expected to wire controls explicitly.

3. Overload

protected LayoutViewHost(Context context, int layoutId, ViewGroup parent, bool attachToRoot, Action<LayoutViewHost, View> bind)

View source

Summary: Initializes a new instance of the LayoutViewHost class by inflating a layout resource and invoking an explicit, AOT-safe binder.

Parameters

NameTypeDescription
contextContextThe Android context.
layoutIdintThe layout resource identifier.
parentViewGroupThe parent view group.
attachToRootboolWhether to attach the inflated view to the parent.
bindActionA callback responsible for explicitly wiring child views to the host.

Remarks

This constructor is fully AOT-safe and avoids reflection entirely.

The bind callback is invoked only after View has been assigned.

4. Overload

Attributes: [RequiresUnreferencedCode("Auto wire-up uses reflection and member discovery.")] [RequiresDynamicCode("Auto wire-up relies on runtime type inspection.")]

protected LayoutViewHost(Context context, int layoutId, ViewGroup parent, bool attachToRoot, bool performAutoWireup, ControlFetcherMixins.ResolveStrategy resolveStrategy)

View source

Summary: Initializes a new instance of the LayoutViewHost class by inflating a layout resource and optionally performing reflection-based auto-wireup.

Parameters

NameTypeDescription
contextContextThe Android context.
layoutIdintThe layout resource identifier.
parentViewGroupThe parent view group.
attachToRootboolWhether to attach the inflated view to the parent.
performAutoWireupboolIf true, performs automatic wiring using reflection.
resolveStrategy[ResolveStrategy](#The member resolution strategy used during auto-wireup.

Remarks

This constructor is not trimming- or AOT-safe when auto-wireup is enabled.

It exists for backward compatibility and should be avoided in new code.