Android Question ACMenuItem - How to put it on the left?

b4xscripter

Member
Licensed User
Longtime User
Hi,

I found this nice code to change the ACMenuItem Icon Color:

https://www.b4x.com/android/forum/threads/change-acmenuitem-icon-color.83618/#content

B4X:
Sub Activity_CreateMenu(Menu As ACMenu)
    Dim bd As BitmapDrawable
    bd.Initialize(LoadBitmapResize(File.DirAssets,"hintsw.png",32dip,32dip,True))
    bd.Gravity = Gravity.CENTER
    Dim jo As JavaObject = bd
    Dim p As JavaObject
    p.InitializeStatic("android.graphics.PorterDuff.Mode")
    jo.RunMethod("setColorFilter",Array(0xffff0000,p.GetField("SRC_IN")))

    Dim item As ACMenuItem = Menu.Add2(0,0,"",bd)
    item.ShowAsAction = item.SHOW_AS_ACTION_ALWAYS  
End Sub


How is it possible to change its position putting it on the left of the screen?

Thanks!
 
Top