こんにちはすべて私は背景画像のポップアップ画面を持っています。画像は黒い境界線で表示されます。ポップアップ画面の追加の黒い色を削除するにはどうすればよいですか?
2618 次
5 に答える
2
@Mugur から提供された上記のコードを試してみてください。境界線を削除するには、以下のコードを使用します
Border border = BorderFactory.createSimpleBorder( new XYEdges(), Border.STYLE_TRANSPARENT);
this.setBorder(border);
于 2012-05-09T08:54:22.533 に答える
1
これを試して...
// Clear the default translucent background
PopupWindow popup = new PopupWindow(context);
popupWindow.setBackgroundDrawable(new BitmapDrawable());
またはこれを試してください...
popupWindow.setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
于 2014-02-13T07:09:02.023 に答える
0
これを試して:
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(new VerticalFieldManager() {
protected void paint(Graphics g) {
int color = g.getColor();
g.setColor(0xff0000);
g.fillRect(0, 0, Display.getWidth(), Display.getHeight());
g.setColor(color);
super.paint(g);
}
});
于 2011-03-28T07:04:15.623 に答える
0
try creating your own custom popscreen and override methods you can create your own custom background using paint method
try trial and error it will surely work this way
To create a custom popscreen all you need to do is create a class and then extend popScreen
于 2011-03-28T12:23:26.187 に答える