#IF CSS
.green-body {
background-color: green !important;
}
#End If
Dim body As BANanoElement
body.Initialize("body")
body.AddClass("green-body")
#IF CSS
.green-body {
background-color: green !important;
}
#End If
Dim body As BANanoElement
body.Initialize("body")
body.AddClass("green-body")
You will have to overrule the theme with CSS:
B4X:#IF CSS .green-body { background-color: green !important; } #End If Dim body As BANanoElement body.Initialize("body") body.AddClass("green-body")
Alwaysbusy
Public Sub ChangeBackgroundColor
Dim body As BANanoElement
body.Initialize("body")
If IsThemeLight Then
If body.HasClass("theme-dark-body") Then
body.RemoveClass(("theme-dark-body"))
End If
#IF CSS
.theme-light-body {
background-color: lightgray !important;
}
#End If
body.AddClass("theme-light-body")
Else
If body.HasClass("theme-light-body") Then
body.RemoveClass(("theme-light-body"))
End If
#IF CSS
.theme-dark-body {
background-color: black !important;
}
#End If
body.AddClass("theme-dark-body")
End If
End Sub