Android Question Activity.AddMenuItem2

Devv

Active Member
Licensed User
Longtime User
why it does not view an icon in the menu ?

B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("main")
    x = 0
    If FirstTime = True Then
        speedtest.Initialize("speedtest")
        speedtest.FileName = "speedtest.jpg"
        speedtest.Directory = File.DirInternalCache
        speedtest.Download("http://download.linnrecords.com/test/mp3/recit.aspx")
    End If
    job1.Initialize("Job1", Me)
    enter = False
    feature = False
    Activity.AddMenuItem2("test","about",LoadBitmap(File.DirAssets,"actions-help-about-icon.png"))
End Sub

i included the png in the attached files, it is 36*36
any ideas ?
 

Attachments

  • actions-help-about-icon.png
    actions-help-about-icon.png
    16.7 KB · Views: 401

Devv

Active Member
Licensed User
Longtime User
i have 6 items but non of them is displayed any icon
i tried single items alone without success
it seems like a bug?
 
Upvote 0

Devv

Active Member
Licensed User
Longtime User
It depends on the Android version. Starting from Android 4 (holo theme) there are no menu icons. You should use AddMenuItem3 instead and the icons will be added to the action bar.
even the following is not working for me

B4X:
Activity.AddMenuItem3("test","about",LoadBitmap(File.DirAssets,"about.png"),true)
 
Upvote 0
Top