1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

B4A Class [B4X] [XUI] SD BottoMenu (with source code)

Discussion in 'Additional libraries, classes and official updates' started by Star-Dust, Feb 21, 2019.

  1. Star-Dust

    Star-Dust Expert Licensed User

    (Here for iOS)
    (Here for B4j)

    SD_BottoMenu
    (update)

    Author: Star-Dust
    Version: 1.40
    • BottoMenu
      • Events:
        • Selected (Value As Int)
      • Fields:
        • BackGroundColor As Int
        • Position As Int
          ' get or set Position
      • Functions:
        • AddMenu (CharText As String, FontName As B4XFont) As String
        • Class_Globals As String
        • Clear As String
        • DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
          Base type must be Object
        • Initialize (Callback As Object, EventName As String) As String
        • Invalidate As String
        • IsInitialized As Boolean
          Verifica se l'oggetto sia stato inizializzato.
        • SetValueAt(Position As Int, CharText As String, FontName As B4XFont)
        • TransitionAnimated (Duration As Int, FromBmp As B4XBitmap, ToBmp As B4XBitmap, ImageView As B4XView) As ResumableSub
    Video1.gif IMG_0110.PNG
    Video4.gif
     

    Attached Files:

    Last edited: May 15, 2019
    Jones Hone, hatzisn, Kope and 28 others like this.
  2. Star-Dust

    Star-Dust Expert Licensed User

    Code:
    Sub Activity_Create(FirstTime As Boolean)
        
    'Do not forget to load the layout file created with the visual designer. For example:
        Activity.LoadLayout("Layout1")
        BottoMenu1.AddMenu(
    Chr(0xF009),xui.CreateFontAwesome(18))
        BottoMenu1.AddMenu(
    Chr(0xF0CA),xui.CreateFontAwesome(18))
        BottoMenu1.AddMenu(
    Chr(0xF0EC),xui.CreateFontAwesome(18))
        BottoMenu1.AddMenu(
    Chr(0xF096),xui.CreateFontAwesome(18))
        BottoMenu1.AddMenu(
    Chr(0xF2C0),xui.CreateFontAwesome(18))
    End Sub

    Sub BottoMenu1_Selected(Value As Int)
        
    Log(Value)
    End Sub
     
  3. itgirl

    itgirl Active Member Licensed User

    WOW Looks very nice shows the power of B4X :) thanks
     
    Claudio Oliveira and Star-Dust like this.
  4. Brandsum

    Brandsum Active Member Licensed User

    The circle animation is flickering.
    ggg.gif
     
  5. Star-Dust

    Star-Dust Expert Licensed User

    It's made on purpose. Find a second animation in the example.
    But you can use others that you find in the forum as BITMAPCREATOR EFFECT

    Code:
    TransitionAnimated(200,GenerateBitmapSelected("",xui.Color_Black,xui.CreateDefaultBoldFont(16)),GenerateBitmapSelected(M.Get("CharText"),xui.Color_Black,M.Get("Font")),Slct)
     
    José J. Aguilar and Filippo like this.
  6. Brandsum

    Brandsum Active Member Licensed User

    Not that icon animation, but the white circle and the curve beside the circle.
     
  7. Star-Dust

    Star-Dust Expert Licensed User

    It makes no flicker for me.
    Show me exactly the defect.

    However I have provided the source, you can see the code yourself and modify it for your device.
    But I saw that you accepted the challenge of creating a menu similar to this ... I suggest you to start from scratch without seeing mine ;)
     
    mcqueccu likes this.
  8. Star-Dust

    Star-Dust Expert Licensed User

    However if you see the grainy circle in your device then you simply need to increase the resolution of the images it creates (sub GenerateBitmap)
     
    Last edited: Feb 22, 2019
  9. Brandsum

    Brandsum Active Member Licensed User

    Sorry! but I haven't accepted any challenge.:) I have already started to work on that menu before you posted your work. That's why I don't want to move my incompleted work to trash.
    Oh sure!! I will not copy your code. :p
     
  10. Star-Dust

    Star-Dust Expert Licensed User

    It is not a problem that others take my code, I have made available the source because I also wish others can take advantage of it, modifying it, improving it or learning some notion.

    In case you had accepted the challenge then the question would have been different, but you explained to me that this is not the case
     
    Jorge M A, DonManfred and itgirl like this.
  11. Star-Dust

    Star-Dust Expert Licensed User

    I improved the code and enlarged the selection sphere. I attach the code
    (Now also for B4J)

    Video3.gif
     

    Attached Files:

    Last edited: Feb 23, 2019
    ocalle, GMan, Kope and 5 others like this.
  12. Kope

    Kope Member Licensed User

    Great Job!!
    Can you please help with how to navigate to another activity or layout?
    thank you
     
  13. Star-Dust

    Star-Dust Expert Licensed User

     

    Attached Files:

    GMan and Kope like this.
  14. Kope

    Kope Member Licensed User

    Wow!! that was quick and amazing
    but wanted to know if it would be possible to navigate between Activities and or Layouts other than Panels on the Same Layout
    Thank You
     
  15. Star-Dust

    Star-Dust Expert Licensed User

    Maybe I did not understand what you want to get. Spice better or show a picture that illustrates it
     
  16. Marlou Fin

    Marlou Fin Member Licensed User

    Hi Star-Dust, what his trying to say is that, how we can navigate or call other layout or form everytime you click the button? and also how can we add another icon in the button?
     
  17. Star-Dust

    Star-Dust Expert Licensed User

    In the example at post#13, each button calls a different Layout.

    The buttons can be changed simply by changing the character FontAwesone, then you can also modify the code and insert images instead of text.

    But you have to develop all of this, otherwise you can not learn and improve your skills :D
     
    Last edited: Feb 28, 2019
    jimmyF likes this.
  18. Marlou Fin

    Marlou Fin Member Licensed User

    Thanks Star-Dust for the tips, just last question, where you can get a table for this one Chr(0xF009)?
     
  19. Star-Dust

    Star-Dust Expert Licensed User

    Click sx Mouse Button
    upload_2019-2-25_17-24-36.png
     

    Attached Files:

  20. Marlou Fin

    Marlou Fin Member Licensed User

    Hayz, sorry for my ignorance Star-Dust, I thought need to get the value from the unicode something! hehehe! anyway I got it. Thanks very much
     
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