B4A Library StdActionBar - Another ActionBar library

Discussion in 'Additional libraries, classes and official updates' started by Erel, Jan 16, 2014.

  1. bluedude

    bluedude Well-Known Member Licensed User

    Here the screenshot of the problem.
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

  3. corwin42

    corwin42 Expert Licensed User

    Erel likes this.
  4. bluedude

    bluedude Well-Known Member Licensed 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 :)
     
  5. corwin42

    corwin42 Expert Licensed User

    Try AHViewPager with fixed Tab indicator or use a manually added tabhost
     
  6. sule

    sule Member Licensed User

    Is it possible to use this library(AHQuickAction3D) with Erels StdActionBar to popup menu from StdActionBar menu
     
  7. bluedude

    bluedude Well-Known Member Licensed 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.
     
  8. corwin42

    corwin42 Expert Licensed User

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

    bluedude Well-Known Member Licensed 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.
     
  10. bluedude

    bluedude Well-Known Member Licensed User

    After a lot of fiddling I have it working, finally a good UI :)
     
  11. yappa

    yappa Member Licensed User

    Is it possible to display android circle spinner (progressbar with "indeterminate") instead of icon to indicate progress?
    Thanks!
     
  12. Erel

    Erel Administrator Staff Member Licensed User

  13. woniol

    woniol Active Member Licensed 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.
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    It is not possible to disable the swiping. You can switch back to the previous page though it will not look nice.

    Another option is to only add ViewPager when you want the swiping to be enabled.
     
  15. Inman

    Inman Well-Known Member Licensed 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?

    [​IMG]
     
  16. Erel

    Erel Administrator Staff Member Licensed User

  17. Penguin

    Penguin Member Licensed User

    The Library returns "java.lang.NoSuchFieldException:mActionView" in the L Developer Preview

    Is there any way to fix it?
     
  18. Erel

    Erel Administrator Staff Member Licensed User

    You will need to remove the ButtonClick event. This issue will be fixed. It seems like there is a problem in Android L Preview where the action bar icon doesn't appear at all. I wasn't able to find any documentation about it. So I don't know whether they removed it on purpose or it is a bug.
     
  19. rwblinn

    rwblinn Well-Known Member Licensed 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: Aug 8, 2014
    jparraga and Erel like this.
  20. Bryan

    Bryan Member Licensed 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

    Code:
    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

    Code:
    ** 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
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice