B4A Library [Class] ActionBar

b4auser1

Well-Known Member
Licensed User
Longtime User
Is it possible to show Title text and Sub-title below the Title like it's done in AHActionBar ?
Is it possible to attach a tag to Button in order to have one OnClickSub for AppButton with two different icons: with and without caret. It will allow to perform different actions in the same OnClickSub, based on this tag ?
 

Informatix

Expert
Licensed User
Longtime User
Yes, all this is possible; you have the full source code so modify it as you wish.
 

CidTek

Active Member
Licensed User
Longtime User
Using the Actionbar in tab mode how do I programatically change the tab_selected and tab_ normal icons on existing buttons to their last state (device rotation for example) without recreating the buttons?

EDIT: Oops I asked too soon and found the ReplaceIcon sub.
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
I have not read all the posts, so maybe I will repeat a question already present in this thread.

In the "Menu" style, every time you add a new button, they are resized; why not scroll through them, as is the case with the "Ribbon" style? Or the Ribbon can be placed on top?
 

Informatix

Expert
Licensed User
Longtime User
These styles are just different settings passed to the class.
If you want to place the "ribbon" at the top, just change the position of the view.
 

LucaMs

Expert
Licensed User
Longtime User
These styles are just different settings passed to the class.
If you want to place the "ribbon" at the top, just change the position of the view.

Ehm, i need to read the code but i guess then i can't obtain "scrolling buttons" just setting something in the activity that uses your class.
(but i can modify the class to do that ).

Thanks, Informatix
 

wizard699

Active Member
Licensed User
Longtime User
Hi.
It's possibile to set textsize for all buttons in one line of code?
Or we make it for each button that we add?
 

RjCl

Member
Licensed User
Longtime User
Hello Informatix,

Is it possible to load a different layout with a button in the main layout ?
B4X:
Sub Button1_Click

    Activity.LoadLayout("webviewlayout.bal")
    Webview1.Initialize("")
    Webview1.LoadUrl("http://www.google.co.uk")

End Sub

It loads but not displaying anything in the WebView? Also in the Button1_Click how to make another Tab as being selected? Say the button is clicked when 'Home' is selected, then loads another layout, but also change Tab selected to 'Favorites' ?
 

Douglas Farias

Expert
Licensed User
Longtime User
Informatix all devices have dark theme?

this class have a os limitation?
 

Informatix

Expert
Licensed User
Longtime User
1) Layout: It's either a problem with WebView or with your programming, but not with the class. What happens after a click does not depend on the class.
2) Tab: In the demo, call the Tab_Click function to change the tab. As I did not memorize the button reference, you will have to declare Dim BtnFavorites As View in Globals and assign the result of AB.AddButton(LoadBitmap(File.DirAssets, "tab_normal.png"), "Favorite"... to it, so you will be able to pass the button reference to Tab_Click.
 

pesquera

Active Member
Licensed User
Longtime User
Hi, I'm trying to use this wonderful class. I'm not using the designer. The panel with the action bar is ok, but is displayed below the activity's
title. How can I do to put the action bar on the place of the activity's title?
B4X:
    pnlAB.Initialize("pnlAB")
    Activity.AddView(pnlAB, 0dip, 0dip, 100%x, 50dip)
    AB.Initialize(pnlAB, True, True, pnlAB.Height, Me)
 

Informatix

Expert
Licensed User
Longtime User
In the Activity Attributes of your activity, set #IncludeTitle to False.
 

Bonzai543

Member
Licensed User
Longtime User
I upgraded to Android 4.4.3 and now I am getting an error in the demo in the "UpdateBackground" sub:
java.lang.IllegalArgumentException: unknown bitmap configuration

It worked fine with Android ver 4.4.2 Any Ideas?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…