自定义对话框背景不透明角落

时间:2017-01-23 18:11:58

标签: android image dialog custom-view

我正在使用自定义对话框,图片作为背景。问题是图像有圆角,当它们出现时(在运行时)它们是白色的。

我试过了:

dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));

这是我的代码。

            Context context = Deck_Creator.this;
            Dialog dialog = new Dialog(context);
            dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
            dialog.setContentView(R.layout.content_deck_view);
            Deck_Big_Screen_Adapter deck_big_screen_adapter = new Deck_Big_Screen_Adapter(Deck_Creator.this, android.R.layout.simple_list_item_1, _Custom_Hash.getHash_Table(), Image_Loader);
            GridView Deck_Cards = (GridView) dialog.findViewById(R.id.dv_grid_cards);
            Deck_Cards.setAdapter(deck_big_screen_adapter);
            dialog.show();

以下是现在的样子:

image here

0 个答案:

没有答案
相关问题