PopupWindow 边距设置

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 边距设置)