折腾半天,自定义全屏dialog,单对话框式。
存一下,日后不用再写了。
/** * 基础语音对话框 * @author make * */ public class BaseVoiceDialog { private Context context; private boolean show = false; private int height; private int width; //初始化 private ListView listView; private Dialog dialog;//弹出的dialog private ImageView imageView_animate; //private LayoutParams lay = dialog; private ArrayAdapter adapter; /** * 初始化传参。 * @param context * @param height * @param width */ public BaseVoiceDialog(Context context,int height,int width){ this.height = height; this.width = width; this.context = context; dialog = new Dialog(context,R.style.CustomDialog); dialog.setContentView(R.layout.dialog_communicate); dia