Android Question Activity.AddMenuItem2

Discussion in 'Android Questions' started by Devv, May 11, 2015.

  1. Devv

    Devv Active Member Licensed User

    why it does not view an icon in the menu ?

    Code:
    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 ?
     

    Attached Files:

  2. DonManfred

    DonManfred Expert Licensed User

    Is this the only menuitem or do you have more than this one?
    Maybe more than 5 (or 6 if there are 6 total)

    From the documentation:
    Only the first five (or six if there are six total) menu items display icons.
     
  3. Devv

    Devv Active Member Licensed 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?
     
  4. Erel

    Erel Administrator Staff Member Licensed 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.
     
    Devv likes this.
  5. Devv

    Devv Active Member Licensed User

    what theme i could use to make the icons appear ?
     
  6. Devv

    Devv Active Member Licensed User

    even the following is not working for me

    Code:
    Activity.AddMenuItem3("test","about",LoadBitmap(File.DirAssets,"about.png"),true)
     
  7. DonManfred

    DonManfred Expert Licensed User

    And you are using WHICH actionbar?
     
    Devv likes this.
  8. Devv

    Devv Active Member Licensed User

    I'am not using an action bar :D , how could i use an action bar ?
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    Please upload your project (Export as zip), or a simple project that demonstrates the issue.
     
Loading...
  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