我想多次使用我的警报框在android中输入数据?

我想多次使用我的警报框在android中输入数据?,android,Android,这是代码,我已经创建了警报框ok按钮,但我想得到它多次 点击弹出窗口上的OK按钮,然后再次调用(显示)AlertDialog。在循环中调用alert dialog。。。。 adMedcenter.setPositiveButton(R.string.Ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface,

这是代码,我已经创建了警报框ok按钮,但我想得到它多次

点击弹出窗口上的OK按钮,然后再次调用(显示)AlertDialog。

在循环中调用alert dialog。。。。
  adMedcenter.setPositiveButton(R.string.Ok, new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            edtMedname=(EditText)adAlert.findViewById(R.id.tvMed);
            edtMedid=(EditText)adAlert.findViewById(R.id.tvId);
            edtMedad=(EditText)adAlert.findViewById(R.id.tvaddrs);
            details=new Detail(edtMedname.getText().toString(),edtMedid.getText().toString(),edtMedad.getText().toString());
            detailsInflater=getLayoutInflater();
            inflaterView=detailsInflater.inflate(R.layout.inflate_add,null);
            ivIcon=(ImageView)inflaterView.findViewById(R.id.ivMedicon);
            txtMedName=(TextView)inflaterView.findViewById(R.id.tvMedname);
            txtMedId=(TextView)inflaterView.findViewById(R.id.tvMedid);
            txtMedAd=(TextView)inflaterView.findViewById(R.id.tvMedAddress);
            ivIcon.setImageDrawable(ResourcesCompat.getDrawable(getResources(),R.drawable.ivicon,null));
            txtMedName.setText(details.getStrMedname());
            txtMedId.setText(insert+details.getStrId());
            txtMedAd.setText(details.getStrAddress());
            rlContain.addView(inflaterView);
        }
    });