|
|
@@ -1,6 +1,11 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.event;
|
|
|
|
|
|
+import android.graphics.drawable.StateListDrawable;
|
|
|
import android.view.View;
|
|
|
+import android.widget.CheckBox;
|
|
|
+
|
|
|
+import kr.co.zumo.app.R;
|
|
|
+import kr.co.zumo.app.lifeplus.view.IEventListener;
|
|
|
|
|
|
/**
|
|
|
* EventParticipationAgreeViewHolder
|
|
|
@@ -13,5 +18,28 @@ import android.view.View;
|
|
|
* @since 2019-01-09
|
|
|
*/
|
|
|
class EventParticipationAgreeViewHolder extends EventParticipationView {
|
|
|
- public EventParticipationAgreeViewHolder(View view) {super(view);}
|
|
|
+
|
|
|
+ private CheckBox checkBoxAll;
|
|
|
+ private CheckBox checkBox1;
|
|
|
+
|
|
|
+ public EventParticipationAgreeViewHolder(View view) {
|
|
|
+ super(view);
|
|
|
+ checkBoxAll = view.findViewById(R.id.checkbox_all_agree);
|
|
|
+ checkBox1 = view.findViewById(R.id.checkbox_agree1);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void init(IEventListener listener) {
|
|
|
+ checkBoxAll.setButtonDrawable(getStateListDrawable());
|
|
|
+ checkBox1.setButtonDrawable(getStateListDrawable());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private StateListDrawable getStateListDrawable() {
|
|
|
+ StateListDrawable stateListDrawable = new StateListDrawable();
|
|
|
+ stateListDrawable.addState(new int[]{android.R.attr.state_checked}, itemView.getContext().getResources().getDrawable(R.drawable.ic_checkbox_on));
|
|
|
+ stateListDrawable.addState(new int[]{-android.R.attr.state_checked}, itemView.getContext().getResources().getDrawable(R.drawable.ic_checkbox_off));
|
|
|
+ return stateListDrawable;
|
|
|
+ }
|
|
|
}
|