dialog使用自定义布局

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));

你可能感兴趣的:(dialog使用自定义布局)