File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
java/com/skydoves/colorpickerview Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 2222import android .content .DialogInterface ;
2323import android .view .LayoutInflater ;
2424import android .view .View ;
25-
2625import com .skydoves .colorpickerview .flag .FlagView ;
2726import com .skydoves .colorpickerview .listeners .ColorEnvelopeListener ;
2827import com .skydoves .colorpickerview .listeners .ColorListener ;
Original file line number Diff line number Diff line change @@ -99,6 +99,11 @@ private void getAttrs(AttributeSet attrs) {
9999 a .getFloat (R .styleable .ColorPickerView_alpha_selector , alpha_selector );
100100 if (a .hasValue (R .styleable .ColorPickerView_alpha_flag ))
101101 alpha_flag = a .getFloat (R .styleable .ColorPickerView_alpha_flag , alpha_flag );
102+ if (a .hasValue (R .styleable .ColorPickerView_actionMode )) {
103+ int actionMode = a .getInteger (R .styleable .ColorPickerView_actionMode , 0 );
104+ if (actionMode == 0 ) this .actionMode = ActionMode .ALWAYS ;
105+ else if (actionMode == 1 ) this .actionMode = ActionMode .LAST ;
106+ }
102107 } finally {
103108 a .recycle ();
104109 }
Original file line number Diff line number Diff line change 55 <attr name =" selector" format =" reference" />
66 <attr name =" alpha_selector" format =" float" />
77 <attr name =" alpha_flag" format =" float" />
8+ <attr name =" actionMode" format =" enum" >
9+ <enum name =" always" value =" 0" />
10+ <enum name =" last" value =" 1" />
11+ </attr >
812 </declare-styleable >
913 <declare-styleable name =" MultiColorPickerView" >
1014 <attr name =" palette2" format =" reference" />
You can’t perform that action at this time.
0 commit comments