{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

SingleActivityFactory

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.

Summary

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(
    classLoader: ClassLoader!,
    className: String!,
    intent: Intent!
)

Public constructors

SingleActivityFactory

SingleActivityFactory(activityClassToIntercept: Class<T!>!)

Public functions

create

fun create(classLoader: ClassLoader!, className: String!, intent: Intent!): Activity!

getActivityClassToIntercept

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

shouldIntercept

fun shouldIntercept(
    classLoader: ClassLoader!,
    className: String!,
    intent: Intent!
): Boolean