开发者

Android remove PopupWindow background

开发者 https://www.devze.com 2023-03-12 09:32 出处:网络
I use PopupWindow class for creating custom popup window. But when I add layout_margin (in my example 15dp) on main there is transparent gray background.

I use PopupWindow class for creating custom popup window.

But when I add layout_margin (in my example 15dp) on main there is transparent gray background.

How to remove transparent background?

开发者_StackOverflowPlease see picture

Android remove PopupWindow background

EDIT here is my code

    window = new PopupWindow(customTool.getContext());
    window.setWidth(WindowManager.LayoutParams.FILL_PARENT);
    window.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
    window.setTouchable(true);
    window.setFocusable(true);
    window.setOutsideTouchable(true);
    window.setAnimationStyle(R.style.Animations_PopDownMenu_Left);
window.setContentView(customTool);
    window.showAtLocation(customTool, Gravity.NO_GRAVITY, 0, 100);


hmm - try setting on your popup dialog try yourDiag.setBackgroundDrawable(null);

0

精彩评论

暂无评论...
验证码 换一张
取 消