|
|
@@ -21,6 +21,7 @@ import android.widget.Spinner;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
+import kr.co.zumo.app.lifeplus.view.CheckBoxAllDriver;
|
|
|
|
|
|
/**
|
|
|
* MobileAuthorizationDialog
|
|
|
@@ -55,6 +56,7 @@ public class MobileAuthorizationDialog extends DialogBase implements View.OnClic
|
|
|
private TextView textViewPhoneIdentifyTime;
|
|
|
|
|
|
private MobileAuthorizationPresenter presenter;
|
|
|
+ CheckBoxAllDriver checkBoxAllDriver;
|
|
|
|
|
|
|
|
|
public MobileAuthorizationDialog() {
|
|
|
@@ -70,7 +72,7 @@ public class MobileAuthorizationDialog extends DialogBase implements View.OnClic
|
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
|
setStyle(DialogFragment.STYLE_NORMAL, R.style.CustomDialog);
|
|
|
presenter = new MobileAuthorizationPresenter(this);
|
|
|
- if(null != resultListener) {
|
|
|
+ if (null != resultListener) {
|
|
|
presenter.setResultListener(resultListener);
|
|
|
}
|
|
|
super.onCreate(savedInstanceState);
|
|
|
@@ -80,7 +82,7 @@ public class MobileAuthorizationDialog extends DialogBase implements View.OnClic
|
|
|
public void setResultListener(IDialogResultListener resultListener) {
|
|
|
super.setResultListener(resultListener);
|
|
|
|
|
|
- if(null != presenter) {
|
|
|
+ if (null != presenter) {
|
|
|
presenter.setResultListener(resultListener);
|
|
|
}
|
|
|
}
|
|
|
@@ -159,6 +161,12 @@ public class MobileAuthorizationDialog extends DialogBase implements View.OnClic
|
|
|
editTextAuthorizedNumber = view.findViewById(R.id.edit_text_authorized_number);
|
|
|
textViewPhoneIdentifyTime = view.findViewById(R.id.text_view_phone_identify_time);
|
|
|
|
|
|
+ checkBoxAllDriver = new CheckBoxAllDriver(checkBoxAllAgree);
|
|
|
+ checkBoxAllDriver.addChildBox(checkBoxAgree1);
|
|
|
+ checkBoxAllDriver.addChildBox(checkBoxAgree2);
|
|
|
+ checkBoxAllDriver.addChildBox(checkBoxAgree3);
|
|
|
+ checkBoxAllDriver.addChildBox(checkBoxAgree4);
|
|
|
+
|
|
|
buttonConfirm.setOnClickListener(this);
|
|
|
buttonTimeDelay.setOnClickListener(this);
|
|
|
buttonIdentifyNumberSend.setOnClickListener(this);
|
|
|
@@ -269,17 +277,21 @@ public class MobileAuthorizationDialog extends DialogBase implements View.OnClic
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- checkBoxAllAgree.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
+ checkBoxAllAgree.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
- public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
|
|
+ public void onClick(View v) {
|
|
|
+ boolean b = checkBoxAllAgree.isChecked();
|
|
|
+ checkBoxAllDriver.applyCheckAll(b);
|
|
|
presenter.onAllAgreeCheckedChanged(b);
|
|
|
Log.e("APP# MobileAuthorizationDialog | onCheckedChanged", "|" + b);
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
|
|
|
checkBoxAgree1.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
@Override
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
|
|
+ checkBoxAllDriver.check();
|
|
|
Log.e("APP# MobileAuthorizationDialog | onCheckedChanged", "|" + b);
|
|
|
presenter.onAgree1CheckedChanged(b);
|
|
|
|
|
|
@@ -289,6 +301,7 @@ public class MobileAuthorizationDialog extends DialogBase implements View.OnClic
|
|
|
checkBoxAgree2.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
@Override
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
|
|
+ checkBoxAllDriver.check();
|
|
|
Log.e("APP# MobileAuthorizationDialog | onCheckedChanged", "|" + b);
|
|
|
presenter.onAgree2CheckedChanged(b);
|
|
|
}
|
|
|
@@ -297,6 +310,7 @@ public class MobileAuthorizationDialog extends DialogBase implements View.OnClic
|
|
|
checkBoxAgree3.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
@Override
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
|
|
+ checkBoxAllDriver.check();
|
|
|
Log.e("APP# MobileAuthorizationDialog | onCheckedChanged", "|" + b);
|
|
|
presenter.onAgree3CheckedChanged(b);
|
|
|
}
|
|
|
@@ -305,6 +319,7 @@ public class MobileAuthorizationDialog extends DialogBase implements View.OnClic
|
|
|
checkBoxAgree4.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
@Override
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
|
|
+ checkBoxAllDriver.check();
|
|
|
Log.e("APP# MobileAuthorizationDialog | onCheckedChanged", "|" + b);
|
|
|
presenter.onAgree4CheckedChanged(b);
|
|
|
}
|
|
|
@@ -352,24 +367,6 @@ public class MobileAuthorizationDialog extends DialogBase implements View.OnClic
|
|
|
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public void onAllAgreedCheckBoxChecked(boolean isAllChecked) {
|
|
|
- if (isAllChecked) {
|
|
|
- checkBoxAgree1.setChecked(true);
|
|
|
- checkBoxAgree2.setChecked(true);
|
|
|
- checkBoxAgree3.setChecked(true);
|
|
|
- checkBoxAgree4.setChecked(true);
|
|
|
-
|
|
|
- }
|
|
|
- else {
|
|
|
- checkBoxAgree1.setChecked(false);
|
|
|
- checkBoxAgree2.setChecked(false);
|
|
|
- checkBoxAgree3.setChecked(false);
|
|
|
- checkBoxAgree4.setChecked(false);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
public void doPhoneNumberCheckedValidationMessage(String inputPhoneNumber) {
|
|
|
|