@UiThread void unbind();
/** Apply the action on the {@code view} which is at {@code index} in the list. */ @UiThread void apply(@NonNull T view, int index); }
@UiThread interface Callback { void onCacheHit(int imageType, File image); void onCacheMiss(int imageType, File image); void onStart(); void onProgress(int progress); void onFinish(); void onSuccess(File image); void onFail(Exception error); } }
/** * BindView annotated fields and methods in the specified {@link View}. The view and its children * are used as the view root. * * @param target Target view for view binding. */ @NonNull @UiThread public static Unbinder bind(@NonNull View target) { return bind(target, target); }
/** * BindView annotated fields and methods in the specified {@link View}. The view and its children * are used as the view root. * * @param target Target view for view binding. */ @NonNull @UiThread public static Unbinder bind(@NonNull View target) { return bind(target, target); }
/** Set the {@code value} on the {@code view} which is at {@code index} in the list. */ @UiThread void set(@NonNull T view, @Nullable V value, int index); }
/** * BindView annotated fields and methods in the specified {@code target} using the {@code source} * {@link Dialog} as the view root. * * @param target Target class for view binding. * @param source Dialog on which IDs will be looked up. */ @NonNull @UiThread public static Unbinder bind(@NonNull Object target, @NonNull Dialog source) { View sourceView = source.getWindow().getDecorView(); return bind(target, sourceView); }
/** * BindView annotated fields and methods in the specified {@link Activity}. The current content * view is used as the view root. * * @param target Target activity for view binding. */ @NonNull @UiThread public static Unbinder bind(@NonNull Activity target) { View sourceView = target.getWindow().getDecorView(); return bind(target, sourceView); }
/** * BindView annotated fields and methods in the specified {@code target} using the {@code source} * {@link Activity} as the view root. * * @param target Target class for view binding. * @param source Activity on which IDs will be looked up. */ @NonNull @UiThread public static Unbinder bind(@NonNull Object target, @NonNull Activity source) { View sourceView = source.getWindow().getDecorView(); return bind(target, sourceView); }
/** * BindView annotated fields and methods in the specified {@link Activity}. The current content * view is used as the view root. * * @param target Target activity for view binding. */ @NonNull @UiThread public static Unbinder bind(@NonNull Activity target) { View sourceView = target.getWindow().getDecorView(); return bind(target, sourceView); }
/** * BindView annotated fields and methods in the specified {@link Dialog}. The current content * view is used as the view root. * * @param target Target dialog for view binding. */ @NonNull @UiThread public static Unbinder bind(@NonNull Dialog target) { View sourceView = target.getWindow().getDecorView(); return bind(target, sourceView); }
/** * BindView annotated fields and methods in the specified {@link Dialog}. The current content * view is used as the view root. * * @param target Target dialog for view binding. */ @NonNull @UiThread public static Unbinder bind(@NonNull Dialog target) { View sourceView = target.getWindow().getDecorView(); return bind(target, sourceView); }
/** * BindView annotated fields and methods in the specified {@code target} using the {@code source} * {@link Activity} as the view root. * * @param target Target class for view binding. * @param source Activity on which IDs will be looked up. */ @NonNull @UiThread public static Unbinder bind(@NonNull Object target, @NonNull Activity source) { View sourceView = source.getWindow().getDecorView(); return bind(target, sourceView); }
/** * BindView annotated fields and methods in the specified {@code target} using the {@code source} * {@link Dialog} as the view root. * * @param target Target class for view binding. * @param source Dialog on which IDs will be looked up. */ @NonNull @UiThread public static Unbinder bind(@NonNull Object target, @NonNull Dialog source) { View sourceView = source.getWindow().getDecorView(); return bind(target, sourceView); }
/** Apply {@code actions} to {@code view}. */ @UiThread @SafeVarargs public static <T extends View> void run(@NonNull T view, @NonNull Action<? super T>... actions) { for (Action<? super T> action : actions) { action.apply(view, 0); } }
/** Set the {@code value} using the specified {@code setter} across the {@code array} of views. */ @UiThread public static <T extends View, V> void set(@NonNull T[] array, @NonNull Setter<? super T, V> setter, @Nullable V value) { for (int i = 0, count = array.length; i < count; i++) { setter.set(array[i], value, i); } }
/** * Apply the specified {@code value} across the {@code list} of views using the {@code property}. */ @UiThread public static <T extends View, V> void set(@NonNull List<T> list, @NonNull Property<? super T, V> setter, @Nullable V value) { //noinspection ForLoopReplaceableByForEach for (int i = 0, count = list.size(); i < count; i++) { setter.set(list.get(i), value); } }
/** Apply the specified {@code actions} across the {@code list} of views. */ @UiThread @SafeVarargs public static <T extends View> void run(@NonNull List<T> list, @NonNull Action<? super T>... actions) { for (int i = 0, count = list.size(); i < count; i++) { for (Action<? super T> action : actions) { action.apply(list.get(i), i); } } }
/** Apply the specified {@code actions} across the {@code array} of views. */ @UiThread @SafeVarargs public static <T extends View> void run(@NonNull T[] array, @NonNull Action<? super T>... actions) { for (int i = 0, count = array.length; i < count; i++) { for (Action<? super T> action : actions) { action.apply(array[i], i); } } }
/** Apply the specified {@code action} across the {@code list} of views. */ @UiThread public static <T extends View> void run(@NonNull List<T> list, @NonNull Action<? super T> action) { for (int i = 0, count = list.size(); i < count; i++) { action.apply(list.get(i), i); } }