Skip to main content

IFerroActivity

Trait IFerroActivity 

Source
pub trait IFerroActivity: IActivityResultHandler + IActivityNavigationService {
    // Required methods
    fn content(&self) -> Option<BoxedValue>;
    fn set_content(&self, value: Option<BoxedValue>);
    fn activated(
        &self,
        handler: Rc<dyn Fn(&ActivatedEventArgs)>,
    ) -> Rc<dyn IDisposable>;
    fn deactivated(
        &self,
        handler: Rc<dyn Fn(&ActivatedEventArgs)>,
    ) -> Rc<dyn IDisposable>;

    // Provided methods
    fn move_task_to_back(&self, _non_root: bool) -> bool { ... }
    fn as_ferro_activity_handle(&self) -> Option<i64> { ... }
}
Expand description

An activity that shows content of the framework.

Required Methods§

Source

fn content(&self) -> Option<BoxedValue>

The content of the view of the activity.

Source

fn set_content(&self, value: Option<BoxedValue>)

Sets the content of the view of the activity.

Source

fn activated( &self, handler: Rc<dyn Fn(&ActivatedEventArgs)>, ) -> Rc<dyn IDisposable>

Raised when the activity is started or receives an intent.

Disposing the returned value removes the handler.

Source

fn deactivated( &self, handler: Rc<dyn Fn(&ActivatedEventArgs)>, ) -> Rc<dyn IDisposable>

Raised when the activity is stopped.

Disposing the returned value removes the handler.

Provided Methods§

Source

fn move_task_to_back(&self, _non_root: bool) -> bool

(activity as Activity)?.MoveTaskToBack(nonRoot): moves the task of the activity to the back of the activity stack, when the object behind the contract is an activity of the system.

Source

fn as_ferro_activity_handle(&self) -> Option<i64>

The number of the activity object of this backend, when the object behind the contract is one: what tells two activities apart (the reference compares the objects).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§