{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
abstract class SingleActivityFactory<T : Activity?> : InterceptingActivityFactory
Abstract implementation of InterceptingActivityFactory which allows to intercept only one activity at a time. Child classes are responsible for creating activity object.
Public constructors |
|
|---|---|
SingleActivityFactory(activityClassToIntercept: Class<T!>!) |
|
Public functions |
|
|---|---|
Activity! |
create(classLoader: ClassLoader!, className: String!, intent: Intent!) |
Boolean |
shouldIntercept( |
Protected functions |
|
|---|---|
abstract T! |
This method needs to be implemented by child class to create activity object for the given intent that specified the activity class being instantiated. |
Public properties |
|
|---|---|
Class<T!>! |
|
fun shouldIntercept(
classLoader: ClassLoader!,
className: String!,
intent: Intent!
): Boolean
protected abstract fun create(intent: Intent!): T!
This method needs to be implemented by child class to create activity object for the given intent that specified the activity class being instantiated.
| Parameters | |
|---|---|
intent: Intent! |
The Intent object that specified the activity class being instantiated. |
| Returns | |
|---|---|
T! |
The newly instantiated Activity object. |