This commit is contained in:
chenjuntao
2018-12-10 16:17:24 +08:00
parent f43c9e5d67
commit 1244efd015
8 changed files with 440 additions and 129 deletions

View File

@ -780,6 +780,19 @@ public class DialogUtils {
dialog.show();
}
public static void showListDialog(Context context,
List<String> selectionList,
DialogInterface.OnClickListener onClickListener) {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
String[] selectionArray = new String[selectionList.size()];
selectionArray = selectionList.toArray(selectionArray);
builder.setItems(selectionArray, onClickListener);
AlertDialog dialog = builder.create();
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.show();
}
public interface ConfirmListener {
void onConfirm();
}