public final class ViewUtils extends Object
| Constructor and Description |
|---|
ViewUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
generateViewId(int fallbackId)
Generates a view id.
|
static Activity |
getActivity(Context context)
|
public static Activity getActivity(Context context)
Activity from a given Context.
This method will recursively traverse up the context chain if it is a ContextWrapper
until it finds the first instance of the base context that is an Activity.
public static int generateViewId(int fallbackId)
In API level 17 and above, this ID is unique. Below 17, the fallback id is used instead.
fallbackId - the fallback id.