public class ViewTools extends Object
| Constructor and Description |
|---|
ViewTools() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends View> |
findView(Activity parent,
int id)
Returns the
View object with the given id from the
Activity object provided by parent. |
static <T extends View> |
findView(Dialog parent,
int id)
Returns the
View object with the given id from the
Dialog object provided by parent. |
static <T extends View> |
findView(View parent,
int id)
Returns the
View object with the given id from the
View object provided by parent. |
public static final <T extends View> T findView(View parent, int id)
Returns the View object with the given id from the
View object provided by parent.
This method is a convenience-method to keep the actual code from being overly cluttered
with castings, as casting into the actual View object is done via Templates.
T - This is the left-hand side of the assignent, and can be any class extending
View.parent - The parent View object containing the requested child View
object.id - The resource-ID of the requested child View object.View object requested by the given id
or null if it could not be found within the parent View object.public static final <T extends View> T findView(Activity parent, int id)
Returns the View object with the given id from the
Activity object provided by parent.
This method is a convenience-method to keep the actual code from being overly cluttered
with castings, as casting into the actual View object is done via Templates.
T - This is the left-hand side of the assignent, and can be any class extending
View.parent - The Activity object containing the requested child View
object.id - The resource-ID of the requested child View object.View object requested by the given id
or null if it could not be found within the Activity object.public static final <T extends View> T findView(Dialog parent, int id)
Returns the View object with the given id from the
Dialog object provided by parent.
This method is a convenience-method to keep the actual code from being overly cluttered
with castings, as casting into the actual View object is done via Templates.
T - This is the left-hand side of the assignent, and can be any class extending
View.parent - The Dialog object containing the requested child View
object.id - The resource-ID of the requested child View object.View object requested by the given id
or null if it could not be found within the Dialog object.