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: https://play.google.com/store/apps/details?id=com.thingsthinking.news
    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:


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

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


    End Sub
    In Vertical position:

    reload_bottom_bar_vertical.png
    and in Horizzontal mode:
    reload_bottom_bar_horizzontal.png

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

    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

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