I have a class file name funcs, and there is a code like this
and i defined it to main activity in process_globall
when i call it from any activity not working
B4X:
Public Sub statusBarColor(color As Int)
If ph.SdkVersion >= 21 Then
Dim jObj As JavaObject
jObj.InitializeContext
Dim window As JavaObject = jObj.RunMethodJO("getWindow", Null)
window.RunMethod("addFlags", Array (0x80000000))
window.RunMethod("clearFlags", Array (0x04000000))
window.RunMethod("setStatusBarColor", Array(color))
End If
End Sub
and i defined it to main activity in process_globall
B4X:
Public f As funcs
when i call it from any activity not working