use of com.lingtuan.firefly.util.MyViewDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class BindEmailUI method sendVerificationCode.
/**
* Send verification code
*/
private void sendVerificationCode() {
String phoneNumber = emailEt.getText().toString().trim();
if (TextUtils.isEmpty(phoneNumber)) {
showToast(getString(R.string.enter_email_number));
return;
}
MyViewDialogFragment mdf = new MyViewDialogFragment();
mdf.setTitleAndContentText(getString(R.string.confirm_email_number), getString(R.string.send_verification_warning, phoneNumber));
mdf.setOkCallback(new MyViewDialogFragment.OkCallback() {
@Override
public void okBtn() {
sendSmsc();
}
});
mdf.show(getSupportFragmentManager(), "mdf");
}
use of com.lingtuan.firefly.util.MyViewDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class BindMobileUI method sendVerificationCode.
/**
* Send verification code
*/
private void sendVerificationCode() {
String phoneNumber = phoneEt.getText().toString().trim();
if (TextUtils.isEmpty(phoneNumber)) {
showToast(getString(R.string.enter_phone_number));
return;
}
MyViewDialogFragment mdf = new MyViewDialogFragment();
mdf.setTitleAndContentText(getString(R.string.confirm_phone_number), getString(R.string.send_verification_warning, phoneNumber));
mdf.setOkCallback(new MyViewDialogFragment.OkCallback() {
@Override
public void okBtn() {
sendSmsc();
}
});
mdf.show(getSupportFragmentManager(), "mdf");
}
use of com.lingtuan.firefly.util.MyViewDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class BlackListUI method onItemLongClick.
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view, final int position, long id) {
MyViewDialogFragment mdf = new MyViewDialogFragment();
mdf.setTitleAndContentText(getString(R.string.black_list_remove_title), getString(R.string.black_list_remove));
mdf.setOkCallback(new MyViewDialogFragment.OkCallback() {
@Override
public void okBtn() {
removeBlackListMethod(position);
}
});
mdf.show(getSupportFragmentManager(), "mdf");
return true;
}
use of com.lingtuan.firefly.util.MyViewDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class SettingUI method checkLogOut.
/**
* check logout
*/
private void checkLogOut() {
if (NextApplication.myInfo != null && TextUtils.isEmpty(NextApplication.myInfo.getMid()) && TextUtils.isEmpty(NextApplication.myInfo.getMobile()) && TextUtils.isEmpty(NextApplication.myInfo.getEmail())) {
MyViewDialogFragment mdf = new MyViewDialogFragment(MyViewDialogFragment.DIALOG_CHECK_LOGOUT);
mdf.setTitleAndContentText(getString(R.string.account_logout_mid_warn), getString(R.string.account_logout_mid_hint));
mdf.setOkCallback(new MyViewDialogFragment.OkCallback() {
@Override
public void okBtn() {
checkLogOutAgain();
}
});
mdf.setCancelCallback(new MyViewDialogFragment.CancelCallback() {
@Override
public void cancelBtn() {
startActivity(new Intent(SettingUI.this, SecurityUI.class));
Utils.openNewActivityAnim(SettingUI.this, false);
}
});
mdf.show(getSupportFragmentManager(), "mdf");
} else {
MyViewDialogFragment mdf = new MyViewDialogFragment();
mdf.setTitleAndContentText(getString(R.string.account_logout_warn), getString(R.string.account_logout_hint));
mdf.setOkCallback(new MyViewDialogFragment.OkCallback() {
@Override
public void okBtn() {
if (TextUtils.isEmpty(NextApplication.myInfo.getToken())) {
exitApp();
} else {
logOutMethod();
}
}
});
mdf.show(getSupportFragmentManager(), "mdf");
}
}
use of com.lingtuan.firefly.util.MyViewDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class SettingUI method checkLogOutAgain.
/**
* check logout again
*/
private void checkLogOutAgain() {
MyViewDialogFragment mdf = new MyViewDialogFragment(MyViewDialogFragment.DIALOG_CHECK_LOGOUT_AGAIBN);
mdf.setTitleAndContentText(getString(R.string.account_logout_mid_warn), getString(R.string.account_logout_mid_hint_again));
mdf.setOkCallback(new MyViewDialogFragment.OkCallback() {
@Override
public void okBtn() {
if (TextUtils.isEmpty(NextApplication.myInfo.getToken())) {
exitApp();
} else {
logOutMethod();
}
}
});
mdf.setCancelCallback(new MyViewDialogFragment.CancelCallback() {
@Override
public void cancelBtn() {
finish();
}
});
mdf.show(getSupportFragmentManager(), "mdf");
}
Aggregations