Android Question [Solved] Change color of the CustomLayoutDialog

Erel

Administrator
Staff member
Licensed User



Code to change the dialog background:
B4X:
Dim sf As Object = DetailsDialog.ShowAsync("Enter details", "Ok", "Cancel", "", LoadBitmap(File.DirAssets, "form.png"), True)
Dim jo As JavaObject = sf
Dim cd As ColorDrawable
cd.Initialize2(Colors.Red, 4dip, 4dip, Colors.Yellow)
jo.RunMethodJO("getWindow", Null).RunMethod("setBackgroundDrawable", Array(cd))
 
Top