2017-10-16 107 views
0

我想在线性布局中制作透明背景,我想在地图中显示圆形对话框,但我的背景显示为白色。如何使LinearLayout透明背景?

Image

任何机构有这方面的任何建议。

+0

请出示你的代码。 –

+0

<?xml version =“1.0”encoding =“utf-8”?> <固体 机器人:颜色=” #000000" > <行程 机器人:宽度= “2DP” 机器人:颜色= “#C4CDE0”> <填充 机器人:左=“5dp” android:top =“5dp” android:right =“5dp” android:bottom =“5dp”> <拐角 机器人:半径= “11DP”>

回答

0

可以将背景设置为Dialog例如像这样:

View dialogView = LayoutInflater.From(this).Inflate(Resource.Layout.layout1, null); 

Dialog dialog = new Dialog(this); 
dialog.SetContentView(dialogView); 
dialog.Window.SetBackgroundDrawable(new ColorDrawable(Color.Transparent)); 
dialog.Show();