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?
1.png
2.png
 
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
Top