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:
Anrdoid 5+ = material theme. The icon isn't supposed to appear in the material theme.

Add to B4XPage_Created of B4XMainPage:
Code: Copy
#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
Erel, thanks!
And how to make sure that there is an icon on the B4XMainPage, but not on other pages?
 
Upvote 0

Similar Threads

Replies
8
Views
17K
Replies
2
Views
13K
Replies
22
Views
42K
  • Locked
  • Article Article
Replies
4
Views
23K
Back
Top