在弹出的窗口Android的透明图像不是透明 [英] Android transparent image in popup window is not transparent
问题描述
我想显示tranparent图像弹出窗口。对于我已经定制了popupwindow根据我的需要和膨胀在popupwindow initview一个相对布局()。
I am trying to display a tranparent image as popup window. For that I have customized the popupwindow as per my need and inflating a relative layout in that popupwindow initview().
在这相对布局我添加了一个透明的形象,但是当我运行应用程序,它的矩形框内部的椭圆形图像,所以不是transparancy我可以看到周围的椭圆形图像灰色。
In that relative layout I have added a transparent image, but when I run the app, its a oval image inside the rectangular box, so instead of transparancy i could see gray color around that oval image.
我没有比任何popupwindow的选择,因为我应在背景屏幕使用的控件。
I dont have any option than popupwindow, because I should use the controls in the background screen.
我已经尝试设置透明样式此相对布局,eventhough它不工作。
I have tried setting the transparent style for this relative layout, eventhough its not working.
任何一个可以告诉我如何做到这一点。
Can any one tell me how to do this
或
有没有在android系统popupwindow的错误。
is there a bug in android popupwindow.
先谢谢了。
推荐答案
我们找到了一个解决方案 - 尽管我们定制必须设置背景为空的弹出窗口。 setBackgroundDrawable(NULL);然后它的工作。
We found a solution for this - While customizing the popup window we have to set the background as null. setBackgroundDrawable(null); Then it worked.
这篇关于在弹出的窗口Android的透明图像不是透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!