Sub Activity_Create(FirstTime As Boolean)
'I have also set Activity color to transparent in Visual Designer
Activity.LoadLayout("Layout1")
' MakeViewBackgroundTransparent(Activity, 25) ' does not help
' MakeViewBackgroundTransparent("", 25) ' does not help
Activity.Color = Colors.Transparent ' not working, black background
End Sub
Private Sub MakeViewBackgroundTransparent(View As B4XView, Alpha As Int)
Dim clr As Int = View.Color
If clr = 0 Then
Log("Cannot get background color")
Return
End If
View.Color = Bit.Or(Bit.And(0x00ffffff, clr), Bit.ShiftLeft(Alpha, 24))
End Sub
Sub Activity_Resume
' Activity.Color = Colors.Transparent ' not working, black background
End Sub