Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android remove PopupWindow background

Tags:

android

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?

Please see picture

enter image description here

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);
like image 616
Jovan Avatar asked Jun 13 '11 20:06

Jovan


1 Answers

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

like image 179
jkhouw1 Avatar answered Oct 16 '22 19:10

jkhouw1