Table of Contents

Class ReactiveAppCompatActivity

Namespace
ReactiveUI.AndroidX
Assembly
ReactiveUI.AndroidX.dll

This is an Activity that is both an Activity and has ReactiveObject powers (i.e. you can call RaiseAndSetIfChanged).

[RequiresDynamicCode("ReactiveAppCompatActivity inherits from ReactiveObject which uses extension methods that require dynamic code generation")]
[RequiresUnreferencedCode("ReactiveAppCompatActivity inherits from ReactiveObject which uses extension methods that may require unreferenced code")]
public class ReactiveAppCompatActivity : AppCompatActivity, IReactiveObject, INotifyPropertyChanged, INotifyPropertyChanging, IEnableLogger, IReactiveNotifyPropertyChanged<ReactiveAppCompatActivity>, IHandleObservableErrors
Inheritance
ReactiveAppCompatActivity
Implements
IEnableLogger
Derived
Extension Methods
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>, bool)

Constructors

ReactiveAppCompatActivity()

Initializes a new instance of the ReactiveAppCompatActivity class.

protected ReactiveAppCompatActivity()

ReactiveAppCompatActivity(in nint, JniHandleOwnership)

Initializes a new instance of the ReactiveAppCompatActivity class.

protected ReactiveAppCompatActivity(in nint handle, JniHandleOwnership ownership)

Parameters

handle nint

The handle.

ownership JniHandleOwnership

The ownership.

Properties

Activated

Gets a signal when activated.

public IObservable<Unit> Activated { get; }

Property Value

IObservable<Unit>

The activated.

ActivityResult

Gets the activity result.

public IObservable<(int requestCode, Result result, Intent intent)> ActivityResult { get; }

Property Value

IObservable<(int requestCode, Result result, Intent intent)>

The activity result.

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.

public IObservable<IReactivePropertyChangedEventArgs<ReactiveAppCompatActivity>> Changed { get; }

Property Value

IObservable<IReactivePropertyChangedEventArgs<ReactiveAppCompatActivity>>

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.

public IObservable<IReactivePropertyChangedEventArgs<ReactiveAppCompatActivity>> Changing { get; }

Property Value

IObservable<IReactivePropertyChangedEventArgs<ReactiveAppCompatActivity>>

Deactivated

Gets a signal when deactivated.

public IObservable<Unit> Deactivated { get; }

Property Value

IObservable<Unit>

The deactivated.

ThrownExceptions

Gets a observable which will fire whenever an exception would normally terminate ReactiveUI internal state.

public IObservable<Exception> ThrownExceptions { get; }

Property Value

IObservable<Exception>

Methods

Dispose(bool)

protected override void Dispose(bool disposing)

Parameters

disposing bool

OnActivityResult(int, Result?, Intent?)

protected override void OnActivityResult(int requestCode, Result? resultCode, Intent? data)

Parameters

requestCode int
resultCode Result
data Intent

OnPause()

protected override void OnPause()

OnResume()

protected override void OnResume()

StartActivityForResultAsync(Intent, int)

Starts the activity for result asynchronously.

public Task<(Result result, Intent intent)> StartActivityForResultAsync(Intent intent, int requestCode)

Parameters

intent Intent

The intent.

requestCode int

The request code.

Returns

Task<(Result result, Intent intent)>

A task with the result and intent.

StartActivityForResultAsync(Type, int)

Starts the activity for result asynchronously.

public Task<(Result result, Intent intent)> StartActivityForResultAsync(Type type, int requestCode)

Parameters

type Type

The type.

requestCode int

The request code.

Returns

Task<(Result result, Intent intent)>

A task with the result and intent.

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

PropertyChangedEventHandler

PropertyChanging

public event PropertyChangingEventHandler? PropertyChanging

Event Type

PropertyChangingEventHandler