dialog使用自定义布局

2016-09-26  本文已影响0人  程序员文艺范

LayoutInflater inflaterDl = LayoutInflater.from(getActivity());

LinearLayout layout = (LinearLayout)inflaterDl.inflate(R.layout.apply_sponsor_dialog_layout, null);

finalDialog dialog =newAlertDialog.Builder(getActivity()).create();

dialog.show();

dialog.setCanceledOnTouchOutside(true);

dialog.getWindow().setContentView(layout,newWindowManager.LayoutParams(

ViewGroup.LayoutParams.MATCH_PARENT

,ViewGroup.LayoutParams.MATCH_PARENT));

上一篇 下一篇

猜你喜欢

热点阅读