{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
abstract class SingleActivityFactory<T : Activity?>
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) |
Class<T> |
This method can be used to get the Class of activity being instantiated by this factory. |
Boolean |
shouldIntercept( |
fun getActivityClassToIntercept(): Class<T>
This method can be used to get the Class of activity being instantiated by this factory.
| Returns | |
|---|---|
Class<T> |
Class of the activity object being instantiated |
fun shouldIntercept(
classLoader: ClassLoader,
className: String,
intent: Intent
): Boolean