Blackberry 如何去除黑莓手机弹出窗口的黑色
您好,我有一个带有背景图像的弹出式屏幕。图像显示为黑色边框。那么我如何删除弹出式屏幕的额外黑色?尝试以下操作:Blackberry 如何去除黑莓手机弹出窗口的黑色,blackberry,popupwindow,Blackberry,Popupwindow,您好,我有一个带有背景图像的弹出式屏幕。图像显示为黑色边框。那么我如何删除弹出式屏幕的额外黑色?尝试以下操作: PopupScreen scr = new PopupScreen() { protected void paintBackground(Graphics g) { int color = 0xff0000; g.setColor(color); g.fillRect(0, 0, Display.getWidth(), Display.getH
PopupScreen scr = new PopupScreen() {
protected void paintBackground(Graphics g) {
int color = 0xff0000;
g.setColor(color);
g.fillRect(0, 0, Display.getWidth(), Display.getHeight());
}
}
这应将背景色设置为红色(ff0000)
编辑: 试试这个:
PopupScreen scr = new PopupScreen() {
protected void paintBackground(Graphics g) {
int color = 0xff0000;
g.setColor(color);
g.fillRect(0, 0, Display.getWidth(), Display.getHeight());
}
}
这应将背景色设置为红色(ff0000)
编辑:
尝试创建自己的自定义popscreen和重写方法 您可以使用paint方法创建自己的自定义背景 试一试——肯定会这样
要创建自定义popscreen,您只需创建一个类,然后扩展popscreen尝试创建自己的自定义popscreen并重写方法 您可以使用paint方法创建自己的自定义背景 试一试——肯定会这样
要创建自定义的popscreen,您只需创建一个类,然后扩展popscreen,您需要覆盖applyTheme并使其不做任何操作,以避免弹出窗口上出现黑色边框:
protected void applyTheme(){}
您需要覆盖applyTheme并使其不起任何作用,以避免弹出窗口上出现黑色边框:
protected void applyTheme(){}
尝试@Mugur给出的上述代码,但仍然会导致弹出屏幕的边框起伏。要删除边框,请使用以下代码
Border border = BorderFactory.createSimpleBorder( new XYEdges(), Border.STYLE_TRANSPARENT);
this.setBorder(border);
尝试@Mugur给出的上述代码,但仍然会导致弹出屏幕的边框起伏。要删除边框,请使用以下代码
Border border = BorderFactory.createSimpleBorder( new XYEdges(), Border.STYLE_TRANSPARENT);
this.setBorder(border);
试试这个
// Clear the default translucent background
PopupWindow popup = new PopupWindow(context);
popupWindow.setBackgroundDrawable(new BitmapDrawable());
popupWindow.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
或者试试这个
// Clear the default translucent background
PopupWindow popup = new PopupWindow(context);
popupWindow.setBackgroundDrawable(new BitmapDrawable());
popupWindow.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
试试这个
// Clear the default translucent background
PopupWindow popup = new PopupWindow(context);
popupWindow.setBackgroundDrawable(new BitmapDrawable());
popupWindow.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
或者试试这个
// Clear the default translucent background
PopupWindow popup = new PopupWindow(context);
popupWindow.setBackgroundDrawable(new BitmapDrawable());
popupWindow.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
塔克斯·穆格尔。此代码无法帮助我..如果你有其他解决方案,请帮助我。我正在使用setBackground(BackgroundFactory.createSolidTransparentBackground(Color.WHITE,0));但我还是得到了一个小小的黑边界。此代码无法帮助我..如果你有其他解决方案,请帮助我。我正在使用setBackground(BackgroundFactory.createSolidTransparentBackground(Color.WHITE,0));但我还是有点黑边。这是黑莓Java吗?这是黑莓Java吗?这是什么?真的是安卓?这是什么?真的是安卓?