Android让Diglog中的元素fill_parent属性生效

        lodingDialog = new Dialog(this,R.style.dialog_noBorder);
        lodingDialog.setContentView(R.layout.file_explore_dialog_loading);
        //让ContentView的fill_parent属性生效
        lodingDialog.getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
原文地址:https://www.cnblogs.com/moqi2013/p/3428707.html