Android Question StdActionBar AddMenuItem3 icon not appear

Discussion in 'Android Questions' started by ciarli, Feb 2, 2015.

  1. ciarli

    ciarli Member Licensed User

    Hi guys,
    I developed this APP:
    In to second Activity I would like to add an icon to share information with other applications, such as facebook, twitter, etc. I tried with AddMenuItem3 and AddToActionBar = True and the menu appears in the bottom bar. If I put AddToActionBar = False the icon not appear.
    My Android version is 4.1.2.
    Someone can suggest me a solution?
    Best regard.
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you post a screenshot? The menu should never appear at the bottom.
  3. ciarli

    ciarli Member Licensed User

    This is my Create code:

    Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
        bar.Icon = 
    LoadBitmap(File.DirAssets, "logo.png")

        bar.NavigationMode = bar.NAVIGATION_MODE_STANDARD
        Activity.Title = currentSite'"Sannio News"
        bar.Subtitle = currentTipologia
        bar.ShowUpIndicator = True
    Activity.AddMenuItem3("Reload""mnuEdit"LoadBitmap(File.DirAssets, "reload.png"), True)

    End Sub
    In Vertical position:

    and in Horizzontal mode:

    And with this code:
    Activity.AddMenuItem3("Reload""mnuEdit"LoadBitmap(File.DirAssets, "reload.png"), False)
    This is the result:
    and this in Horizzontal:

    My device:
    Samsung GT-I9000
    Android 4.4.2
    Kernel 3.0.101
  4. Erel

    Erel Administrator Staff Member Licensed User

    Remove this line from the manifest editor: SetApplicationAttribute(android:uiOptions, "splitActionBarWhenNarrow")
    Kwame Twum, ciarli and lemonisdead like this.
  5. ciarli

    ciarli Member Licensed User

    :( saved me.
    Thanks a lot. :)
  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