Class ReactiveRecyclerViewViewHolder<TViewModel>
- Namespace
- ReactiveUI.AndroidSupport
- Assembly
- ReactiveUI.AndroidSupport.dll
A Android.Support.V7.Widget.RecyclerView.ViewHolder implementation that binds to a reactive view model.
public class ReactiveRecyclerViewViewHolder<TViewModel> : RecyclerView.ViewHolder, ILayoutViewHost, IViewFor<TViewModel>, IViewFor, IActivatableView, IReactiveNotifyPropertyChanged<ReactiveRecyclerViewViewHolder<TViewModel>>, IReactiveObject, INotifyPropertyChanged, INotifyPropertyChanging, IEnableLogger, ICanActivate where TViewModel : class, IReactiveObject
Type Parameters
TViewModel
The type of the view model.
- Inheritance
-
RecyclerView.ViewHolderReactiveRecyclerViewViewHolder<TViewModel>
- Implements
-
IViewFor<TViewModel>
- Inherited Members
-
RecyclerView.ViewHolder.ItemViewRecyclerView.ViewHolder.JniPeerMembersRecyclerView.ViewHolder.ThresholdClassRecyclerView.ViewHolder.ThresholdTypeRecyclerView.ViewHolder.AdapterPositionRecyclerView.ViewHolder.IsRecyclableRecyclerView.ViewHolder.ItemIdRecyclerView.ViewHolder.ItemViewTypeRecyclerView.ViewHolder.LayoutPositionRecyclerView.ViewHolder.OldPositionRecyclerView.ViewHolder.Position
- Extension Methods
Constructors
ReactiveRecyclerViewViewHolder(View)
Initializes a new instance of the ReactiveRecyclerViewViewHolder<TViewModel> class.
protected ReactiveRecyclerViewViewHolder(View view)
Parameters
view
ViewThe view.
Fields
AllPublicProperties
Gets all public accessible properties.
[JsonIgnore]
protected Lazy<PropertyInfo[]> AllPublicProperties
Field Value
- Lazy<PropertyInfo[]>
Properties
Activated
Gets a observable which is triggered when the ViewModel is activated.
public IObservable<Unit> Activated { get; }
Property Value
- IObservable<Unit>
Changed
Gets an Observable that fires after a property has changed. Note that this should not fire duplicate change notifications if a property is set to the same value multiple times.
[JsonIgnore]
public IObservable<IReactivePropertyChangedEventArgs<ReactiveRecyclerViewViewHolder<TViewModel>>> Changed { get; }
Property Value
Changing
Gets an observable that fires before a property is about to be changed. Note that this should not fire duplicate change notifications if a property is set to the same value multiple times.
[JsonIgnore]
public IObservable<IReactivePropertyChangedEventArgs<ReactiveRecyclerViewViewHolder<TViewModel>>> Changing { get; }
Property Value
Deactivated
Gets a observable which is triggered when the ViewModel is deactivated.
public IObservable<Unit> Deactivated { get; }
Property Value
- IObservable<Unit>
LongClicked
Gets an observable that signals that this ViewHolder has been long-clicked.
The int is the position of this ViewHolder in the Android.Support.V7.Widget.RecyclerView and corresponds to the Android.Support.V7.Widget.RecyclerView.ViewHolder.AdapterPosition property.
public IObservable<int> LongClicked { get; }
Property Value
LongClickedWithViewModel
Gets an observable that signals that this ViewHolder has been long-clicked.
The IObservable<T> is the ViewModel of this ViewHolder in the Android.Support.V7.Widget.RecyclerView.
public IObservable<TViewModel?> LongClickedWithViewModel { get; }
Property Value
- IObservable<TViewModel>
Selected
Gets an observable that signals that this ViewHolder has been selected.
The int is the position of this ViewHolder in the Android.Support.V7.Widget.RecyclerView and corresponds to the Android.Support.V7.Widget.RecyclerView.ViewHolder.AdapterPosition property.
public IObservable<int> Selected { get; }
Property Value
SelectedWithViewModel
Gets an observable that signals that this ViewHolder has been selected.
The IObservable<T> is the ViewModel of this ViewHolder in the Android.Support.V7.Widget.RecyclerView.
public IObservable<TViewModel?> SelectedWithViewModel { get; }
Property Value
- IObservable<TViewModel>
ThrownExceptions
Gets an observable which signals when exceptions are thrown.
[JsonIgnore]
public IObservable<Exception> ThrownExceptions { get; }
Property Value
View
Gets the current view being shown.
public View View { get; }
Property Value
- View
ViewModel
Gets or sets the ViewModel corresponding to this specific View. This should be a DependencyProperty if you're using XAML.
public TViewModel? ViewModel { get; set; }
Property Value
- TViewModel
Methods
AreChangeNotificationsEnabled()
Gets if change notifications via the INotifyPropertyChanged interface are being sent.
public bool AreChangeNotificationsEnabled()
Returns
- bool
A value indicating whether change notifications are enabled or not.
Dispose(bool)
protected override void Dispose(bool disposing)
Parameters
disposing
bool
SuppressChangeNotifications()
When this method is called, an object will not fire change notifications (neither traditional nor Observable notifications) until the return value is disposed.
public IDisposable SuppressChangeNotifications()
Returns
- IDisposable
An object that, when disposed, reenables change notifications.
Events
PropertyChanged
public event PropertyChangedEventHandler? PropertyChanged
Event Type
PropertyChanging
public event PropertyChangingEventHandler? PropertyChanging