Skip to content

Commit ab5c416

Browse files
committed
Added annotations to edited method
Removed "unused" annotation from a method used to convert hex string to color integer.
1 parent 090fc68 commit ab5c416

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ColorPickerPreference/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ public ColorPickerPreference(Context context, AttributeSet attrs, int defStyle)
6464
init(context, attrs);
6565
}
6666

67+
/**Method edited by
68+
* @author Anna Berkovitch
69+
* added functionality to accept hex string as defaultValue
70+
* and to properly persist resources reference string, such as @color/someColor
71+
* previously persisted 0*/
6772
@Override
6873
protected Object onGetDefaultValue(TypedArray a, int index) {
6974
int colorInt;
@@ -225,7 +230,8 @@ public static String convertToARGB(int color) {
225230
}
226231

227232
/**
228-
* For custom purposes. Not used by ColorPickerPreference
233+
* Method currently used by onGetDefaultValue method to
234+
* convert hex string provided in android:defaultValue to color integer.
229235
*
230236
* @param color
231237
* @return A string representing the hex value of color,

0 commit comments

Comments
 (0)