mathparent 无效不能全屏显示
在onstart中加入
if (getDialog() != null) {
Window window = getDialog().getWindow();
if (window != null) {
//最主要市下边这一句,只加MATCH_PARENT 无效
window.getDecorView().setPadding(0, 0, 0, 0);
WindowManager.LayoutParams params = window.getAttributes();
params.width = WindowManager.LayoutParams.MATCH_PARENT;
params.height = WindowManager.LayoutParams.MATCH_PARENT;
params.gravity = Gravity.BOTTOM;
window.setAttributes(params);
}
}
#oncreateview
//no title
getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
//背景透明,没有白边
getDialog().getWindow().setBackgroundDrawableResource(R.color.transparent);
//显示dialog的位置
getDialog().getWindow().setGravity(Gravity.TOP);
布局显示//
图片显示到框的外边,
<Fragment>
<Line...1/>
<Line...2/>
1和2 使用marginTop显示吧,其他的没找到好的办法
</Fragment>