OK / Cancel 버튼 대화상자
String title = getString(R.string.action_push_message); String msg = String.format("▶수신: %s(%d) / %s\n▶담당자: %s\n▶답변 내용\n%s", userinfo.getName(), userinfo.getCode(), userinfo.getPhone(), etCrew.getText(), etAnswer.getText()); CAlertDialogMultiLine dialog = new CAlertDialogMultiLine(this); dialog.setAlertTitle(title) .setAlertMsg(msg) .showCancelButton() .setOnOkBtnListener(view -> { switchIsResolved.setChecked(true); dialog.dismiss(); updateContactUs(true, userinfo.getName(), userinfo.getPhone()); Toast.makeText(this, R.string.action_push_complete, Toast.LENGTH_SHORT).show(); }) .show();
선택 리스트 다이얼로그, 목록 대화상자
// 지점 선택 리스트 다이얼로그 목록 대화상자 AlertDialog.Builder builder = new AlertDialog.Builder(MainMenuActivity.this); builder.setTitle(R.string.branch_select); String[]items = new String[branches.size()]; for (int i = 0; i < branches.size(); i++) { GetCrewResult.Branch b = branches.get(i); items[i] = String.format("%s (%s)", b.getName(), b.getCode()); } builder.setItems(items, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { CPreferences.setIntPref(Config.PREF_UIVALUE, Config.PREF_KEY_MMNENU_BRANCHIDX, which); GetCrewResult.Branch b = branches.get(which); Toast.makeText(getApplication(), "SET: " + items[which], Toast.LENGTH_SHORT).show(); onBtnRefreshClicked(); } }); builder.setNegativeButton("취소", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); AlertDialog dialog = builder.create(); dialog.show();
Designed by sketchbooks.co.kr / sketchbook5 board skin
Sketchbook5, 스케치북5
Sketchbook5, 스케치북5
Sketchbook5, 스케치북5
Sketchbook5, 스케치북5