Android Question [SOLVED] StdActionBar Color

Discussion in 'Android Questions' started by eurojam, Feb 29, 2016.

  1. eurojam

    eurojam Well-Known Member Licensed User

    Hi all,
    may be I don't see the wood for the trees: is it possible to change the color of the stdActionBar for different activities - I know how to change the color theme in general - but activity main should have a blue and activity two should have a red actionbar...?

    Thanks in advance
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can use this sub:
    Sub SetActionBarColor(Color As Int)
    Dim jo As JavaObject
    Dim cd As ColorDrawable
    End Sub
    If you are targeting Android 2.x devices then you should first check the SDK version with the phone library.

    You can also use other types of drawables:

  3. eelias

    eelias Active Member Licensed User

    I am still using B4A 3.82, is it possible to have this same solution for it?
  4. DonManfred

    DonManfred Expert Licensed User

    Time to update B4A :D
    eurojam likes this.
  5. ZenWhisk

    ZenWhisk Member Licensed User

    This function works fine, but in Material Design, I lose the 'elevation' shadow, is there any way to avoid that?
  6. Erel

    Erel Administrator Staff Member Licensed User

  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