Android Question StatusBarColor Gradiant

Discussion in 'Android Questions' started by zavaree, Sep 28, 2019.

Tags:
  1. zavaree

    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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Please use [code]code here...[/code] tags when posting code.
     
  3. zavaree

    zavaree Active Member Licensed User

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



    Code:
    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
     
  4. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice