美文网首页
PopupWindow 边距设置

PopupWindow 边距设置

作者: 阳光下的美好_6e13 | 来源:发表于2019-07-25 10:16 被阅读0次

pop.png

左右留边距的弹窗,总结注意点
1.布局用
android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10"

2.宽度撑满,设置背景色透明
this.setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
//设置SelectPicPopupWindow弹出窗体的高
this.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);

    this.setBackgroundDrawable(new ColorDrawable(0x0Dffffff));

相关文章

网友评论

      本文标题:PopupWindow 边距设置

      本文链接:https://www.haomeiwen.com/subject/ndecrctx.html