Popupwindow deactivate border
android
Solution
It's been years but I'm putting up the solution for others that might face a similar problem.
- You can add the following but BitmapDrawable is Deprecated and now requires you to pass in a context.
`popUp.setBackgroundDrawable(new BitmapDrawable());`
OR
- I prefer this solution because I pass in null and avoid potential leaks and cleaning up.
`popUp.setBackgroundDrawable(null);`
Problem
I'm trying to create a overlay show notifications if they arrive on the bottom of my app. I'm planing on doing so with a PopupWindow because it's easy to integrate in every activity without the hassle to have a RelativeLayout which has the overlay as last element on the screen. My test code looks like that: ``` popUp = new PopupWindow(this); popUp.setContentView(LayoutInflater.from(this).inflate(R.layout.testwindow, null)); popUp.showAtLocation(layout, Gravity.BOTTOM, 0, 0); popUp.update(0, 0, width, height); ``` where width and height are the size of my device. But the problem is the popup window doesn't doesn't overlay the whole screen, a little border is shown - which isn't in my layout - and some padding. I already tried to set the border in the layout file to 0px and to add an offset and extra width to the measured screen width. But the padding on the left can't be removed. What could I do to stretch the overlay to the whole width of the window? Now it looks like that: