Android Question StatusBarColor Gradiant

zavaree

Active Member
Licensed User
hello I Have this Function To Change My head Of My Activity But as Color
And Its works Perfect

Sub SetStatusBarColor(color As Int)
Dim p As Phone
If p.SdkVersion >= 21 Then
Dim jo As JavaObject
jo.InitializeContext
Dim window As JavaObject = jo.RunMethodJO("getWindow", Null)
window.RunMethod("addFlags", Array (0x80000000))
window.RunMethod("clearFlags", Array (0x04000000))
window.RunMethod("setStatusBarColor", Array(color))
End If
End Sub

But I Want to Use Gradiant Color In StatusBarColor I See it In Some Application How I Should i do This?

Thanks
 

Erel

Administrator
Staff member
Licensed User
Please use [code]code here...[/code] tags when posting code.
 

zavaree

Active Member
Licensed User
hello I Have this Function To Change My head Of My Activity But as Color
And Its works Perfect



B4X:
Sub SetStatusBarColor(color As Int)
Dim p As Phone
If p.SdkVersion >= 21 Then
Dim jo As JavaObject
jo.InitializeContext
Dim window As JavaObject = jo.RunMethodJO("getWindow", Null)
window.RunMethod("addFlags", Array (0x80000000))
window.RunMethod("clearFlags", Array (0x04000000))
window.RunMethod("setStatusBarColor", Array(color))
End If
End Sub
But I Want to Use Gradiant Color In StatusBarColor I See it In Some Application How I Should i do This?

Thanks
 
Top