代码改变世界

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

2013-11-18 09:02  默契.  阅读(260)  评论(0编辑  收藏  举报
        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);