Skip to content

Commit 62daabd

Browse files
committed
Update javadoc for resource injection and prefs annotations
1 parent a499220 commit 62daabd

25 files changed

Lines changed: 176 additions & 56 deletions

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/res/AnimationRes.java‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
import org.androidannotations.annotations.ResId;
2424

2525
/**
26-
* Use on fields in activity classes that should be injected with this specific
27-
* resource
26+
* Use on {@link android.content.res.XmlResourceParser} fields in any enhanced
27+
* classes that should be injected with this specific animation resource.
28+
* <p/>
29+
* The annotation value must be one of R.anim.* fields. If the value is not set,
30+
* the field name will be used as the R.anim.* field name.
2831
*/
2932
@Retention(RetentionPolicy.CLASS)
3033
@Target(ElementType.FIELD)

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/res/BooleanRes.java‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
import org.androidannotations.annotations.ResId;
2424

2525
/**
26-
* Use on fields in activity classes that should be injected with this specific
27-
* resource
26+
* Use on {@link java.lang.Boolean} or <code>boolean</code> fields in any
27+
* enhanced classes that should be injected with this specific boolean resource.
28+
* <p/>
29+
* The annotation value must be one of R.bool.* fields. If the value is not set,
30+
* the field name will be used as the R.bool.* field name.
2831
*/
2932
@Retention(RetentionPolicy.CLASS)
3033
@Target(ElementType.FIELD)

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/res/ColorRes.java‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@
2323
import org.androidannotations.annotations.ResId;
2424

2525
/**
26-
* Use on fields in activity classes that should be injected with values from
27-
* R.color.*
28-
*
29-
* The annotated field must be an int or an Integer
30-
*
26+
* Use on {@link java.lang.Integer} or <code>int</code> fields in any enhanced
27+
* classes that should be injected with this specific color resource.
28+
* <p/>
3129
* The annotation value must be one of R.color.* fields. If the value is not
3230
* set, the field name will be used as the R.color.* field name.
33-
*
3431
*/
3532
@Retention(RetentionPolicy.CLASS)
3633
@Target(ElementType.FIELD)

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/res/ColorStateListRes.java‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
import org.androidannotations.annotations.ResId;
2424

2525
/**
26-
* Use on fields in activity classes that should be injected with this specific
27-
* resource
26+
* Use on {@link android.content.res.ColorStateList} fields in any enhanced
27+
* classes that should be injected with this specific color state list resource.
28+
* <p/>
29+
* The annotation value must be one of R.color.* fields. If the value is not
30+
* set, the field name will be used as the R.color.* field name.
2831
*/
2932
@Retention(RetentionPolicy.CLASS)
3033
@Target(ElementType.FIELD)

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/res/DimensionPixelOffsetRes.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@
2323
import org.androidannotations.annotations.ResId;
2424

2525
/**
26-
* Use on fields in activity classes that should be injected with this specific
27-
* resource
26+
* Use on {@link java.lang.Integer} or <code>int</code> fields in any enhanced
27+
* classes that should be injected with this specific dimension pixel offset
28+
* resource.
29+
* <p/>
30+
* The annotation value must be one of R.dimen.* fields. If the value is not
31+
* set, the field name will be used as the R.dimen.* field name.
2832
*/
2933
@Retention(RetentionPolicy.CLASS)
3034
@Target(ElementType.FIELD)

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/res/DimensionPixelSizeRes.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@
2323
import org.androidannotations.annotations.ResId;
2424

2525
/**
26-
* Use on fields in activity classes that should be injected with this specific
27-
* resource
26+
* Use on {@link java.lang.Integer} or <code>int</code> fields in any enhanced
27+
* classes that should be injected with this specific dimension pixel size
28+
* resource.
29+
* <p/>
30+
* The annotation value must be one of R.dimen.* fields. If the value is not
31+
* set, the field name will be used as the R.dimen.* field name.
2832
*/
2933
@Retention(RetentionPolicy.CLASS)
3034
@Target(ElementType.FIELD)

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/res/DimensionRes.java‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
import org.androidannotations.annotations.ResId;
2424

2525
/**
26-
* Use on fields in activity classes that should be injected with this specific
27-
* resource
26+
* Use on {@link java.lang.Float} or <code>float</code> fields in any enhanced
27+
* classes that should be injected with this specific dimension resource.
28+
* <p/>
29+
* The annotation value must be one of R.dimen.* fields. If the value is not
30+
* set, the field name will be used as the R.dimen.* field name.
2831
*/
2932
@Retention(RetentionPolicy.CLASS)
3033
@Target(ElementType.FIELD)

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/res/DrawableRes.java‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
import org.androidannotations.annotations.ResId;
2424

2525
/**
26-
* Use on fields in activity classes that should be injected with this specific
27-
* resource
26+
* Use on {@link android.graphics.drawable.Drawable} fields in any enhanced
27+
* classes that should be injected with this specific drawable resource.
28+
* <p/>
29+
* The annotation value must be one of R.drawable.* fields. If the value is not
30+
* set, the field name will be used as the R.drawable.* field name.
2831
*/
2932
@Retention(RetentionPolicy.CLASS)
3033
@Target(ElementType.FIELD)

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/res/HtmlRes.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222

2323
import org.androidannotations.annotations.ResId;
2424

25+
/**
26+
* Use on {@link java.lang.CharSequence} or {@link android.text.Spanned} fields
27+
* in any enhanced classes that should be injected with this specific string
28+
* resource as HTML.
29+
* <p/>
30+
* The annotation value must be one of R.string.* fields. If the value is not
31+
* set, the field name will be used as the R.string.* field name.
32+
*/
2533
@Retention(RetentionPolicy.CLASS)
2634
@Target(ElementType.FIELD)
2735
public @interface HtmlRes {

‎AndroidAnnotations/androidannotations-api/src/main/java/org/androidannotations/annotations/res/IntArrayRes.java‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@
2323
import org.androidannotations.annotations.ResId;
2424

2525
/**
26-
* Use on fields in activity classes that should be injected with this specific
27-
* resource
26+
* Use on {@link java.lang.Integer} or <code>int</code> array fields in any
27+
* enhanced classes that should be injected with this specific color resource.
28+
* <p/>
29+
* The annotation value must be one of R.array.* fields. If the value is not
30+
* set, the field name will be used as the R.array.* field name.
2831
*/
2932
@Retention(RetentionPolicy.CLASS)
3033
@Target(ElementType.FIELD)

0 commit comments

Comments
 (0)