|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbutterknife.Views
public class Views
View injection utilities.
| Nested Class Summary | |
|---|---|
static class |
Views.Finder
|
static class |
Views.InjectViewProcessor
|
static class |
Views.UnableToInjectException
|
static class |
Views.UnableToResetException
|
| Method Summary | ||
|---|---|---|
static
|
findById(android.app.Activity activity,
int id)
Simpler version of Activity.findViewById(int) which infers the target type. |
|
static
|
findById(android.view.View view,
int id)
Simpler version of View.findViewById(int) which infers the target type. |
|
static void |
inject(android.app.Activity target)
Inject fields annotated with InjectView in the specified Activity. |
|
static void |
inject(Object target,
android.app.Activity source)
Inject fields annotated with InjectView in the specified source using the
target Activity as the view root. |
|
static void |
inject(Object target,
android.view.View source)
Inject fields annotated with InjectView in the specified source using the
target View as the view root. |
|
static void |
inject(android.view.View target)
Inject fields annotated with InjectView in the specified View. |
|
static void |
reset(Object target)
Reset fields annotated with InjectView to null. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void inject(android.app.Activity target)
InjectView in the specified Activity. The current
content view is used as the view root.
target - Target activity for field injection.
Views.UnableToInjectException - if injection could not be performed.public static void inject(android.view.View target)
InjectView in the specified View. The view and
its children are used as the view root.
target - Target view for field injection.
Views.UnableToInjectException - if injection could not be performed.
public static void inject(Object target,
android.app.Activity source)
InjectView in the specified source using the
target Activity as the view root.
target - Target class for field injection.source - Activity on which IDs will be looked up.
Views.UnableToInjectException - if injection could not be performed.
public static void inject(Object target,
android.view.View source)
InjectView in the specified source using the
target View as the view root.
target - Target class for field injection.source - View root on which IDs will be looked up.
Views.UnableToInjectException - if injection could not be performed.public static void reset(Object target)
InjectView to null.
This should only be used in the onDestroyView method of a fragment in practice.
target - Target class for field reset.
Views.UnableToResetException - if views could not be reset.
public static <T extends android.view.View> T findById(android.view.View view,
int id)
View.findViewById(int) which infers the target type.
public static <T extends android.view.View> T findById(android.app.Activity activity,
int id)
Activity.findViewById(int) which infers the target type.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||