B4A Library [Lib] Compact ActionBar

Wolfgang Trageiser

Member
Licensed User
Longtime User
the library is very good.

the .BringToFront works fine for the bar itself, but still the drop-down menu does not come to the foreground with the bar.
so the toolbar is not to use whitout the drop-down-menu coming in foreground.
do you have a solution?
 

LucianoB

Member
Licensed User
Longtime User
Hello.
First of all thanks for this great job!!
Anyway I'm having a small problem loading a background image to the action bar.
I have this code:
B4X:
Sub Activity_Create(FirstTime As Boolean)

  'The images can be taken from resources or load your own
   
  mIcon1 = p.GetResourceDrawable(17301583)
  mIcon2 = p.GetResourceDrawable(17301586)
  mIcon3 = p.GetResourceDrawable(17301582)
  mIcon4 = p.GetResourceDrawable(17301577)
   
  Dim bb As Bitmap
  bb.Initialize(File.DirAssets,"actionbarbackground.jpg")
  ActionBar.Initialize(Activity, Me, "Manager", bb, Colors.ARGB(255, 20, 20, 20), Colors.ARGB(255, 160, 160, 160), True, True, True)
  ' THE ABOVE LINE GIVES ME AN ERROR LOADING THE BITMAP

  ActionBar.AddBarIcon(mIcon1.Bitmap, 1)
  ActionBar.AddBarIcon(mIcon2.Bitmap, 2)
  ActionBar.AddBarIcon(mIcon3.Bitmap, 3)
  ActionBar.AddBarIcon(mIcon4.Bitmap, 4)
   
  ActionBar.SetMenu(200dip, 200dip, Null, Colors.DarkGray)

  For I = 1 To 10

  ActionBar.AddMenuItem(LoadBitmap(File.DirAssets, "ActionBarLogo.png"), "Item " & I, Colors.White, I)

  Next

End Sub

The ActionBar.Initialize gives me an error:
java.io.FileNotFoundException: /storage/emulated/0/Android/data/njdude.compact.actionbar/files/virtual_assets/(bitmap): 679 x 198: open failed: ENOENT (No such file or directory)
even if the image is in the files folder and synced.
What am I doing wrong?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…