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

SingleActivityFactory

public abstract class SingleActivityFactory<T extends 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(Class<T> activityClassToIntercept)

Public methods

final Activity
create(ClassLoader classLoader, String className, Intent intent)
final Class<T>

This method can be used to get the Class of activity being instantiated by this factory.

final boolean
shouldIntercept(
    ClassLoader classLoader,
    String className,
    Intent intent
)

Public constructors

SingleActivityFactory

public SingleActivityFactory(Class<T> activityClassToIntercept)

Public methods

create

public final Activity create(ClassLoader classLoader, String className, Intent intent)

getActivityClassToIntercept

public final Class<T> getActivityClassToIntercept()

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

public final boolean shouldIntercept(
    ClassLoader classLoader,
    String className,
    Intent intent
)