-
public class ContextUtils
Class containing static methods involving manipulations of Contexts and their related subclasses.
-
-
Method Summary
-
-
Method Detail
-
findContextOfType
@Nullable() static <T> T findContextOfType(@Nullable() Context context, Class<out T> clazz)
Returns the nearest context in the chain (as defined by ContextWrapper.getBaseContext()) whichis an instance of the specified type, or null if one could not be found
- Parameters:
context
- Initial contextclazz
- Class instance to look for
-
-
-
-