Android Question B4XPages on different Android versions

Sergey_New

Well-Known Member
Licensed User
Longtime User
Why does ThreePagesExample show the app icon on one device but not on the other?
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Anrdoid 5+ = material theme. The icon isn't supposed to appear in the material theme.

Add to B4XPage_Created of B4XMainPage:
B4X:
#if B4A
    Dim p As Phone
    If p.SdkVersion >= 21 Then
        Dim ActionBar As JavaObject = B4XPages.GetManager.ActionBar
        ActionBar.RunMethod("setDisplayUseLogoEnabled", Array(True))
        ActionBar.RunMethod("setDisplayShowHomeEnabled", Array(True))
        Dim bd As BitmapDrawable
        bd.Initialize(xui.LoadBitmapResize(File.DirAssets, "logo.png", 32dip, 32dip, True))
        ActionBar.RunMethod("setLogo", Array(bd))
    End If
    #End If
 
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
Erel, thanks!
And how to make sure that there is an icon on the B4XMainPage, but not on other pages?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…