Android Question [Solved] Change color of the CustomLayoutDialog

Erel

B4X founder
Staff member
Licensed User
Longtime User
SS-2017-11-16_17.43.52.png



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))
 
Upvote 0
Top