|
|
@@ -6,6 +6,7 @@ package kr.co.zumo.app.lifeplus.view.custom.auth;
|
|
|
import android.content.Context;
|
|
|
import android.support.annotation.StringRes;
|
|
|
import android.support.constraint.ConstraintLayout;
|
|
|
+import android.graphics.drawable.StateListDrawable;
|
|
|
import android.text.Editable;
|
|
|
import android.text.TextWatcher;
|
|
|
import android.util.AttributeSet;
|
|
|
@@ -147,6 +148,12 @@ public class MobileAuthView extends ConstraintLayout implements IMobileAuthContr
|
|
|
viewFirstNumberBar = findViewById(R.id.spinner_first_phone_number_bar);
|
|
|
viewAgreeBar = findViewById(R.id.checkbox_all_agree_bar);
|
|
|
|
|
|
+
|
|
|
+ StateListDrawable stateListDrawable = new StateListDrawable();
|
|
|
+ stateListDrawable.addState(new int[]{android.R.attr.state_checked}, context.getResources().getDrawable(R.drawable.ic_checkbox_on));
|
|
|
+ stateListDrawable.addState(new int[]{-android.R.attr.state_checked}, context.getResources().getDrawable(R.drawable.ic_checkbox_off));
|
|
|
+ ((CheckBox) checkBoxAllAgree).setButtonDrawable(stateListDrawable);
|
|
|
+
|
|
|
checkBoxAllDriver = new CheckBoxAllDriver(checkBoxAllAgree);
|
|
|
|
|
|
// 전체 약관 동의
|
|
|
@@ -165,6 +172,12 @@ public class MobileAuthView extends ConstraintLayout implements IMobileAuthContr
|
|
|
int index = i;
|
|
|
|
|
|
checkBox = findViewById(ResourceUtil.getId("checkbox_agree" + (i + 1)));
|
|
|
+
|
|
|
+ StateListDrawable stateListDrawable2 = new StateListDrawable();
|
|
|
+ stateListDrawable.addState(new int[]{android.R.attr.state_checked}, context.getResources().getDrawable(R.drawable.ic_checkbox_on));
|
|
|
+ stateListDrawable.addState(new int[]{-android.R.attr.state_checked}, context.getResources().getDrawable(R.drawable.ic_checkbox_off));
|
|
|
+ ((CheckBox) checkBox).setButtonDrawable(stateListDrawable);
|
|
|
+
|
|
|
checkBoxAllDriver.addChildBox(checkBox);
|
|
|
checkBox.setOnCheckedChangeListener((compoundButton, b) -> {
|
|
|
checkBoxAllDriver.check();
|
|
|
@@ -251,15 +264,19 @@ public class MobileAuthView extends ConstraintLayout implements IMobileAuthContr
|
|
|
});
|
|
|
|
|
|
// gender
|
|
|
+ ((RadioButton) radioSelectMale).setButtonDrawable(new StateListDrawable());
|
|
|
+ ((RadioButton) radioSelectFemale).setButtonDrawable(new StateListDrawable());
|
|
|
radioSelectMale.setOnCheckedChangeListener((compoundButton, b) -> presenter.setOnGenderCheckedChanged(b));
|
|
|
|
|
|
// nationality
|
|
|
+ ((RadioButton) radioSelectLocal).setButtonDrawable(new StateListDrawable());
|
|
|
+ ((RadioButton) radioSelectForeign).setButtonDrawable(new StateListDrawable());
|
|
|
radioSelectLocal.setOnCheckedChangeListener((compoundButton, b) -> presenter.onNationalCheckedChanged(b));
|
|
|
|
|
|
// 폰 국번
|
|
|
spinnerFirstPhoneNumber.setSpinnerEventsListener(new CustomSpinner.OnSpinnerEventsListener() {
|
|
|
|
|
|
- public void setGenderMargin(boolean isMale){
|
|
|
+ public void setGenderMargin(boolean isMale) {
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -452,11 +469,12 @@ public class MobileAuthView extends ConstraintLayout implements IMobileAuthContr
|
|
|
|
|
|
@Override
|
|
|
public void setGenderMargin(boolean isMale) {
|
|
|
- RadioGroup.LayoutParams params = new RadioGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
|
|
- if(isMale){
|
|
|
- params.setMarginStart(ResourceUtil.dpToPx(-23));
|
|
|
- radioSelectFemale.setLayoutParams(params);
|
|
|
- }else{
|
|
|
+ RadioGroup.LayoutParams params = new RadioGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
|
|
+ if (isMale) {
|
|
|
+ params.setMarginStart(ResourceUtil.dpToPx(-23));
|
|
|
+ radioSelectFemale.setLayoutParams(params);
|
|
|
+ }
|
|
|
+ else {
|
|
|
params.setMarginStart(-10);
|
|
|
radioSelectFemale.setLayoutParams(params);
|
|
|
}
|
|
|
@@ -468,11 +486,13 @@ public class MobileAuthView extends ConstraintLayout implements IMobileAuthContr
|
|
|
if (isLocal) {
|
|
|
params.setMarginStart(ResourceUtil.dpToPx(-25));
|
|
|
radioSelectForeign.setLayoutParams(params);
|
|
|
- }else {
|
|
|
+ }
|
|
|
+ else {
|
|
|
params.setMarginStart(-10);
|
|
|
radioSelectForeign.setLayoutParams(params);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 모든 UI disabled
|
|
|
*/
|