butterknife.BindArray Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of butterknife-annotations Show documentation
Show all versions of butterknife-annotations Show documentation
Field and method binding for Android views.
package butterknife;
import android.support.annotation.ArrayRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.CLASS;
/**
* Bind a field to the specified array resource ID. The type of array will be inferred from the
* annotated element.
*
* String array:
*
* {@literal @}BindArray(R.array.countries) String[] countries;
*
*
* Int array:
*
* {@literal @}BindArray(R.array.phones) int[] phones;
*
*
* Text array:
*
* {@literal @}BindArray(R.array.options) CharSequence[] options;
*
*
* {@link android.content.res.TypedArray}:
*
* {@literal @}BindArray(R.array.icons) TypedArray icons;
*
*/
@Retention(CLASS) @Target(FIELD)
public @interface BindArray {
/** Array resource ID to which the field will be bound. */
@ArrayRes int value();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy