All Downloads are FREE. Search and download functionalities are using the official Maven repository.

butterknife.BindArray Maven / Gradle / Ivy

The newest version!
package butterknife;

import androidx.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.RUNTIME;

/**
 * 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(RUNTIME) @Target(FIELD) public @interface BindArray { /** Array resource ID to which the field will be bound. */ @ArrayRes int value(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy