public class ContextUtils
extends java.lang.Object
Constructor and Description |
---|
ContextUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
findContextOfType(android.content.Context context,
java.lang.Class<? extends T> clazz)
Returns the nearest context in the chain (as defined by ContextWrapper.getBaseContext()) which
is an instance of the specified type, or null if one could not be found
|
public static <T> T findContextOfType(android.content.Context context, java.lang.Class<? extends T> clazz)
T
- context
- Initial contextclazz
- Class instance to look for