Android Question StdActionBar AddMenuItem3 icon not appear

ciarli

Member
Licensed User
Longtime 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.
 

ciarli

Member
Licensed User
Longtime User
This is my Create code:


B4X:
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:
B4X:
    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
 
Upvote 0
Top