Java Code Examples for com.qmuiteam.qmui.widget.dialog.QMUIDialog#CheckableDialogBuilder
The following examples show how to use
com.qmuiteam.qmui.widget.dialog.QMUIDialog#CheckableDialogBuilder .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AddAndEditPoetryActivity.java From PoetryWeather with Apache License 2.0 | 6 votes |
/** * 清婉秀丽单选框 */ private void showQWXLSingleChoiceDialog(){ final String[] items = new String[]{"否", "是"}; QMUIDialog.CheckableDialogBuilder checkableDialogBuilder = new QMUIDialog.CheckableDialogBuilder(AddAndEditPoetryActivity.this); if (qwxl >= 0) { checkableDialogBuilder.setCheckedIndex(qwxl); } checkableDialogBuilder.addItems(items, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { qwxl = which; isqwxlPoetryListView.setDetailText(items[qwxl]); dialog.dismiss(); } }).create().show(); }
Example 2
Source File: AddAndEditPoetryActivity.java From PoetryWeather with Apache License 2.0 | 6 votes |
/** * 激越高亢单选框 */ private void showJYGKSingleChoiceDialog(){ final String[] items = new String[]{"否", "是"}; QMUIDialog.CheckableDialogBuilder checkableDialogBuilder = new QMUIDialog.CheckableDialogBuilder(AddAndEditPoetryActivity.this); if (jygk >= 0) { checkableDialogBuilder.setCheckedIndex(jygk); } checkableDialogBuilder.addItems(items, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { jygk = which; isjygkPoetryListView.setDetailText(items[jygk]); dialog.dismiss(); } }).create().show(); }
Example 3
Source File: AddAndEditPoetryActivity.java From PoetryWeather with Apache License 2.0 | 6 votes |
/** * 语言绮丽单选框 */ private void showYYQLSingleChoiceDialog(){ final String[] items = new String[]{"否", "是"}; QMUIDialog.CheckableDialogBuilder checkableDialogBuilder = new QMUIDialog.CheckableDialogBuilder(AddAndEditPoetryActivity.this); if (yyql >= 0) { checkableDialogBuilder.setCheckedIndex(yyql); } checkableDialogBuilder.addItems(items, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { yyql = which; isyyqlPoetryListView.setDetailText(items[yyql]); dialog.dismiss(); } }).create().show(); }
Example 4
Source File: PoetryActivity.java From PoetryWeather with Apache License 2.0 | 6 votes |
private void showCheckPriorDialog() { final String[] check = new String[1]; final String[] items = {"低", "标准", "高"}; QMUIDialog.CheckableDialogBuilder checkableDialogBuilder = new QMUIDialog.CheckableDialogBuilder(PoetryActivity.this); checkableDialogBuilder.addItems(items, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { check[0] = items[i]; priorOwnPoetry.setDetailText(items[i]); switch (items[i]) { case "低": PrefUtils.putInt("priorPoetry", 1, PoetryActivity.this); break; case "标准": PrefUtils.putInt("priorPoetry", 2, PoetryActivity.this); break; case "高": PrefUtils.putInt("priorPoetry", 4, PoetryActivity.this); break; default: break; } dialogInterface.dismiss(); } }).create().show(); }