您的位置:首页 > 移动开发 > Android开发

Android DialogFragment fullscreen 解决方法

2014-12-03 17:33 525 查看
关键代码

@Override

public Dialog onCreateDialog( Bundle savedInstanceState ) {

final Dialog dialog = new Dialog( getActivity() );

dialog.requestWindowFeature( Window.FEATURE_NO_TITLE );

dialog.setContentView( rootView );

dialog.getWindow().setBackgroundDrawable( new ColorDrawable( Color.YELLOW ) );

dialog.getWindow().setLayout( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT );

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: