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()
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)
Summary: Initializes a new instance of the LayoutViewHost class by inflating a layout resource.
Parameters
| Name | Type | Description |
|---|---|---|
context | Context | The Android context. |
layoutId | int | The layout resource identifier. |
parent | ViewGroup | The parent view group. |
attachToRoot | bool | Whether 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)
Summary: Initializes a new instance of the LayoutViewHost class by inflating a layout resource and invoking an explicit, AOT-safe binder.
Parameters
| Name | Type | Description |
|---|---|---|
context | Context | The Android context. |
layoutId | int | The layout resource identifier. |
parent | ViewGroup | The parent view group. |
attachToRoot | bool | Whether to attach the inflated view to the parent. |
bind | Action | A 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)
Summary: Initializes a new instance of the LayoutViewHost class by inflating a layout resource and optionally performing reflection-based auto-wireup.
Parameters
| Name | Type | Description |
|---|---|---|
context | Context | The Android context. |
layoutId | int | The layout resource identifier. |
parent | ViewGroup | The parent view group. |
attachToRoot | bool | Whether to attach the inflated view to the parent. |
performAutoWireup | bool | If 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.