use of com.lingtuan.firefly.util.MyViewDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class LoginUtil method showRegistDialog.
// According to the registered bounced
public void showRegistDialog(final TextView uploadRegisterInfo) {
MyViewDialogFragment mdf = new MyViewDialogFragment(MyViewDialogFragment.DIALOG_SINGLE_EDIT, mContext.getString(R.string.account_update_mid), mContext.getString(R.string.account_input_mid), null);
mdf.setEditOkCallback(new MyViewDialogFragment.EditOkCallback() {
@Override
public void okBtn(String edittext) {
if (isNumeric(edittext)) {
MyToast.showToast(mContext, mContext.getString(R.string.mid_content_warning));
return;
}
uploadRegister(edittext, uploadRegisterInfo);
}
});
mdf.show(((AppCompatActivity) mContext).getSupportFragmentManager(), "mdf");
}
use of com.lingtuan.firefly.util.MyViewDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class WalletCopyActivity method showPwdDialog.
/**
* password authentication
* @ param type 0 for the private key, 1 for keyStore, 2 to delete the wallet
*/
private void showPwdDialog(final int type) {
MyViewDialogFragment mdf = new MyViewDialogFragment(MyViewDialogFragment.DIALOG_INPUT_PWD, new MyViewDialogFragment.EditCallback() {
@Override
public void getEditText(String editText) {
switch(type) {
case 0:
getWalletPrivateKey(editText, 0);
break;
case 1:
getWalletKeyStore(editText);
break;
case 2:
getWalletPrivateKey(editText, 2);
break;
}
}
});
if (type == 2) {
mdf.setTitleAndContentText(null, getString(R.string.wallet_scan_del_hint));
}
mdf.show(this.getSupportFragmentManager(), "mdf");
}
use of com.lingtuan.firefly.util.MyViewDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class AddFriendsUI method onClick.
@Override
public void onClick(View v) {
super.onClick(v);
switch(v.getId()) {
case // And search contacts < nickname MainContactFragmentUI. Java onClick in search?>
R.id.searchRel:
startActivity(new Intent(AddFriendsUI.this, ContactSearchNickUI.class));
Utils.openNewActivityAnim(AddFriendsUI.this, false);
break;
case // Contacts to add
R.id.byContactLinear:
final String tempGxb = "tempGxb";
boolean flag = MySharedPrefs.readBooleanNormal(AddFriendsUI.this, MySharedPrefs.FILE_USER, tempGxb);
if (flag) {
// Has been suggested before (directory permissions have been authorized)
startActivity(new Intent(AddFriendsUI.this, AddContactFriendsNewUI.class));
Utils.openNewActivityAnim(AddFriendsUI.this, false);
} else {
// Do not prompt
MyViewDialogFragment mdf = new MyViewDialogFragment();
mdf.setTitleAndContentText(getString(R.string.notif), getString(R.string.contact_smt_accect));
mdf.setOkCallback(new MyViewDialogFragment.OkCallback() {
@Override
public void okBtn() {
MySharedPrefs.writeBoolean(AddFriendsUI.this, MySharedPrefs.FILE_USER, tempGxb, true);
/**
*Send the address book to monitor radio
*/
Intent intent = new Intent(LoadDataService.ACTION_START_CONTACT_LISTENER);
Utils.sendBroadcastReceiver(AddFriendsUI.this, intent, false);
startActivity(new Intent(AddFriendsUI.this, AddContactFriendsNewUI.class));
Utils.openNewActivityAnim(AddFriendsUI.this, false);
}
});
mdf.show(getSupportFragmentManager(), "mdf");
}
break;
case // scan
R.id.byScanLinear:
startActivity(new Intent(this, CaptureActivity.class));
Utils.openNewActivityAnim(this, false);
break;
default:
break;
}
}
use of com.lingtuan.firefly.util.MyViewDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class ContactSelectedUI method showDialogFormat.
/**
* Forwarding operation box
*/
private void showDialogFormat(final String chatId, final String username, final String avatarUrl, final String gender, final boolean isNewGroup, List<UserBaseVo> members) {
MyViewDialogFragment mdf = new MyViewDialogFragment(MyViewDialogFragment.DIALOG_FORWOED, chatId, getString(R.string.chat_send_to), username, linkTitle, members);
FragmentManager manager = getSupportFragmentManager();
mdf.setLeaveMsgCallBack(new MyViewDialogFragment.LeaveMsgCallBack() {
@Override
public void leaveMsgMethod(String content) {
if (msgList != null && msgList.size() > 0) {
if (!TextUtils.isEmpty(content)) {
ChatMsg chatmsg = new ChatMsg();
chatmsg.setType(0);
chatmsg.setContent(content);
chatmsg.setCreateTime(System.currentTimeMillis() / 1000);
chatmsg.parseUserBaseVo(NextApplication.myInfo);
msgList.add(chatmsg);
}
new SendMsgThread(ContactSelectedUI.this, msgList, chatId, username, avatarUrl, gender, false, false, isNewGroup);
}
}
});
if (manager != null && !isFinishing()) {
try {
mdf.show(manager, "mdf");
} catch (Exception e) {
e.printStackTrace();
}
}
}
use of com.lingtuan.firefly.util.MyViewDialogFragment in project SmartMesh_Android by SmartMeshFoundation.
the class DiscussGroupSettingUI method showRename_Dialog.
private void showRename_Dialog(Context context) {
MyViewDialogFragment mdf = new MyViewDialogFragment(MyViewDialogFragment.DIALOG_TEXT_ENTRY, getString(R.string.discuss_modify_name), null, nameEdit.getText().toString());
mdf.setEditOkCallback(new MyViewDialogFragment.EditOkCallback() {
@Override
public void okBtn(String edittext) {
renameDicsuss(edittext);
}
});
mdf.show(getSupportFragmentManager(), "mdf");
}
Aggregations