Title problem AHActionBar

SCIS

Active Member
Licensed User
Longtime User
Hey guys,

I recently got into a problem with corwin42's AHActionBar library. The title is not showing up in portrait mode, but it's showing in landscape, although on the wrong place.

Portrait mode:
b919edbc1c9779c57c94e24a1b299d2e.png


Landscape mode:
33d4ae6df05f5eaeb2d5356c4c644f15.png


Code:
B4X:
   'ACTIONBAR
   AB.Initialize("AB") 'Initializes the actionbar.
   AB.Background = ABBackground 'Sets the background of the actionbar.
   AB.ActionWidth = 42dip 'You can change the width of an action item. 42dip is default.
   AB.AddHomeAction(ID_ACTION_HOME,ABHome) 'Adds the home button to the actionbar.
   AB.AddAction(ID_ACTION_MENU,ABMenu) 'Adds an action button to the actionbar.
   Activity.AddView(AB, 0, 0, 100%x, 42dip) 'Adds the actionbar to the activity.

What's wrong?

Sincerely,
SCIS.
 

SCIS

Active Member
Licensed User
Longtime User
72x72 is fine. You even set the ActionWidth properly. I expect it to work fine!
If you could upload your project (or barebones) that would be helpful, I cannot think of anything else (you can check SetActionPadding maybe)

Can you explain me what it does? Also perhaps if I try 48x48, like the ic_menu_home.png file in my Android folder on my pc, would it work then?

Edit:
Wow, that was so stupid, the problem was in the background, if you see good at landscape mode, the background starts a second time, there is the title displayed.
When I removed
B4X:
AB.background = ABBackground
and changed it to
B4X:
AB.Initialize2("AB",ABBackground)
it worked perfect and the title is now showing correctly. Very weird, but yes, it works now.
 
Last edited:
Upvote 0
Top