B4A Library StdActionBar - Another ActionBar library

Roberto P.

Well-Known Member
Licensed User
Longtime User
it works! also with Android 4.x
thanks Erel
 

MaFu

Well-Known Member
Licensed User
Longtime User
Search for the file "android-support-v4.jar" in your android sdk directory (normally in ..\sdk_dir\extras\android\compatibility\v4\) and copy it to your additional libraries folder.
 

jarda

Member
Licensed User
Longtime User
Hi All

How to use StdActionBar when FullScreen mode: True and IncludeTitle: False ?


------------------- start code --------------------
Dim height As Int = CalculateHeight(True, True)
vp.Initialize("vp", 3, 100%x, height)
Activity.AddView(vp.AsView, 0, 0, 100%x, height)
'load the pages layouts
vp.Panels(0).LoadLayout("0")
vp.Panels(1).LoadLayout("1")
vp.Panels(2).LoadLayout("2")
bar.Initialize("bar")
'bar.Icon = LoadBitmap(File.DirAssets, "ic_action_user.png")

bar.NavigationMode = bar.NAVIGATION_MODE_TABS


bar.AddTab("Tab 1")
bar.AddTab("Tab 2")
bar.AddTab("Tab 3")
bar.ShowUpIndicator = True
bar.SelectedIndex = currentPage
Activity.Title = "This is the title"
bar.Subtitle = "This is the subtitle"
Activity.AddMenuItem3("", "mnuEdit", LoadBitmap(File.DirAssets, "ic_action_edit.png"), True)
Activity.AddMenuItem3("", "mnuNew", LoadBitmap(File.DirAssets, "ic_action_new.png"), True)
Activity.AddMenuItem3("", "mnuUndo", LoadBitmap(File.DirAssets, "ic_action_undo.png"), True)

------------------------- end code -------------------------

In this mode, after starting the application ends java.lang.NullPointerException error ... (red text)


Thanks for advice
 
Last edited:

trueboss323

Active Member
Licensed User
Longtime User
Is it possible to make the tab indicator bar slide as you swipe? A good example of this would be in the Google play store app.
 

Jeboiii

Member
Licensed User
Longtime User
Where to put the button_click code on this sample screenshot? Do I need to make new module for that loaded layout in tab3? Please enlighten me

I think I need a conversion of this code:

Module_parent:
Sub loadModuleChild_Click
StartActivity("Module_child")
End Sub

Module_child:
Sub Activity_Create()
Activity.LoadLayout("Layout_child")
End Sub

Sub Button_Click
msgbox("Hello","Message")
End Sub

 

ivanomonti

Expert
Licensed User
Longtime User
hi, Erel,,,, I do not find this library even on sdk manager, there is no link :-(
 

MaFu

Well-Known Member
Licensed User
Longtime User
In SDK Manager check the node "Extras", the item "Android Support Library" must be installed. If not set the checkmark and push the install button.
If you put the mouse over the text "Android Support Library" then the path to the support libraries will be shown as hint. You find "android-support-v4.jar" in the subdir "v4" of this path. Copy this file to your additional libraries folder.
 

Bryanne Vega

Member
Licensed User
Longtime User
I can't seem to find a way to disable a menu button while im at a specific tab (or atleast change it's visibility status).
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…