B4A Library StdActionBar - Another ActionBar library

bluedude

Well-Known Member
Licensed User
Longtime User
Here the screenshot of the problem.
 

Attachments

  • drawer.png
    29.8 KB · Views: 504

corwin42

Expert
Licensed User
Longtime User

bluedude

Well-Known Member
Licensed User
Longtime User
It seems to be a problem indeed. Funny thing is, Google uses it in Google Play UI. Thumbs down for them.

So I guess I need to use something else. I like the sliding UI and it makes a lot of sense to move between screens. Even babies know how to use it
 

corwin42

Expert
Licensed User
Longtime User
Try AHViewPager with fixed Tab indicator or use a manually added tabhost
 

sule

Member
Licensed User
Longtime User
Is it possible to use this library(AHQuickAction3D) with Erels StdActionBar to popup menu from StdActionBar menu
 

bluedude

Well-Known Member
Licensed User
Longtime User
corwin,

I actually always used AHViewPager bit wanted to replace it by something more simple. I think we will have the same problem because it is also based on StdViewPager isn't it?

Cheers.
 

corwin42

Expert
Licensed User
Longtime User
corwin,

I actually always used AHViewPager bit wanted to replace it by something more simple. I think we will have the same problem because it is also based on StdViewPager isn't it?

Cheers.

With AHViewpager there is a fixed tab indicator you can use instead of the standard ActionBar tabs.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Tried it, for some reason I cannot get it to work. I also want to use the pagertabs or fixed.

barDrawer.ContentPanel.AddView (pagerView,0,0,100%x,100%y)

PagerView is the AHViewPager, either fixed or not.
 

yappa

Member
Licensed User
Longtime User
Is it possible to display android circle spinner (progressbar with "indeterminate") instead of icon to indicate progress?
Thanks!
 

woniol

Active Member
Licensed User
Longtime User
Is it possible to lock the ability to change tabs with a swipe gesture (ViewPager)?
I load the views from server and would like to keep swipe locket until i get all data to buld the views.
 

Inman

Well-Known Member
Licensed User
Longtime User
Is it possible to update or change the actionbar icon? My app is basically for an online shop. So one of my actionbar icons is the shopping cart icon. I would like to show the normal icon while the cart is empty and a number on top of the icon, based on the number of items in the cart (like the screenshot). Can we do this?

 

Penguin

Member
Licensed User
Longtime User
The Library returns "java.lang.NoSuchFieldException:mActionView" in the L Developer Preview

Is there any way to fix it?
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Very Nice Library.

Have build an B4A Offline Reader for the B4J HowTos based upon this library. Download open source here.
This app makes use of a SQLite database, Json to keep the settings, Dialogs to filter, HTTPUtils2 to update the database from server.

Note: Still some tasks to do (like update menu, preferences) - for the latest version see B4J HowTos.

Enjoy.
 
Last edited:

Bryan

Member
Licensed User
Longtime User
I am too having a similar problem with properties of a spinner on the stdactionbar. Particularly, setting left position of the spinner. Same as in post #56. Width of the spinner sets fine. It's width size adjust to the number of characters correctly. I also tried using a panel with the spinner on it and received the same errors. Should I maybe use reflection to do this or will it give the same result?
Thank you for any help it is greatly appreciated.
Bryan

B4X:
Sub Globals
    Dim bar As StdActionBar
    Dim spin As Spinner
    Dim jo As JavaObject = bar
End Sub

Sub Activity_Create(FirstTime As Boolean)
    bar.Initialize("bar")
    spin.Initialize("")
        spin.AddAll(Array As String("One", "Two", "Three", "Four", "Five" , "Six")) 
   
    jo = jo.GetField("bar")
    jo.RunMethod("setDisplayShowCustomEnabled", Array As Object(True))
    jo.RunMethod("setCustomView", Array As Object(spin))
    spin.Width = -2
    spin.Left = 20dip
 
End Sub


B4X:
** Activity (main) Create, isFirst = true **

java.lang.ClassCastException: android.app.ActionBar$LayoutParams cannot be cast to anywheresoftware.b4a.BALayout$LayoutParams
    at anywheresoftware.b4a.objects.ViewWrapper.setLeft(ViewWrapper.java:158)
    at b4a.example.main._activity_create(main.java:333)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
    at b4a.example.main.afterFirstLayout(main.java:98)
    at b4a.example.main.access$100(main.java:16)
    at b4a.example.main$WaitForLayout.run(main.java:76)
    at android.os.Handler.handleCallback(Handler.java:605)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4424)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
~e:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)


    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:592)
    at dalvik.system.NativeStart.main(Native Method)
java.lang.ClassCastException: android.app.ActionBar$LayoutParams cannot be cast to anywheresoftware.b4a.BALayout$LayoutParams
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…