B4A Library SD: Menu (with Animation)

(No WRAP, No Java Only B4A)

Guillotine
is just a swivel guillotine panel that could accommodate a menu but also a panel with all sorts of views.
The RollOut Menu and Side Menu are instead menus as you see in the Third Example. There is also a video in post # 6
TreeMenu (Tree ListView): This class allows you to enter a ListView type menu and clicking each item opens a submenu with its entries (if any) and raises the click event

SD_Menu

Author:
Star-Dust
Version: 0.07
  • GhigliottinaPanel
    • Fields:
      • Panel As Panel
      • View As View
    • Functions:
      • Class_Globals As String
      • Close (Animation As Boolean) As String
      • GetPanelBase As Panel
      • GetPanelMenu As Panel
      • Initialize (EventName As String, Me_CallBack As Object) As String
        Initializes the object. You can add parameters to this method if needed.
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
      • IsOpen As Boolean
      • Open (Animation As Boolean) As String
      • SetMenuButtonDark As String
      • SetMenuButtonLight As String
      • SetPanelColor (Color As Int) As String
      • SetTextMenu (Message As String) As String
      • SetTextMenuColor (Color As Int) As String
  • GhigliottinaView
    • Events:
      • Click
      • LongClick
    • Fields:
      • Panel As Panel
    • Functions:
      • AddPanel (MyPanel As Panel) As String
      • Class_Globals As String
      • Close (Animation As Boolean) As String
      • DesignerCreateView (Base As Panel, Lbl As Label, Props As Map) As String
      • GetPanelBase As Panel
      • GetPanelMenu As Panel
      • Initialize (vCallback As Object, vEventName As String) As String
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
      • IsOpen As Boolean
      • Open (Animation As Boolean) As String
      • SetMenuButtonDark As String
      • SetMenuButtonLight As String
      • SetPanelColor (Color As Int) As String
      • SetTextMenu (Message As String) As String
      • SetTextMenuColor (Color As Int) As String
  • MenuTree
    • Events:
      • Click (MenuName As String, ID As String)
    • Fields:
      • BackGroundColor As Int
      • ExpandableList As List
      • ImageCloseMenu As Bitmap
      • ImageOpenMenu As Bitmap
      • LeafColor As Int
      • OpenOneOnlyMenu As Boolean
      • TextColor As Int
      • TreeColor As Int
    • Functions:
      • AddMenuVoice (Name As String, ID As String, Expanded As Boolean) As String
      • AddRoot (Name As String) As String
      • AddSubMenuVoice (Name As String, ID As String, IDMenuVoice As Int) As String
      • Class_Globals As String
      • ClearMenu As String
      • DesignerCreateView (Base As Panel, Lbl As Label, Props As Map) As String
      • GetBase As Panel
      • Initialize (vCallback As Object, vEventName As String) As String
      • Invalidate As String
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
  • RollOutMenu
    • Events:
      • Click (ID As String)
    • Fields:
      • IsOpen As Boolean
      • TimeAnimation As Int
    • Functions:
      • AddImageButton (Bitmap As Bitmap, ID As String) As String
      • Class_Globals As String
      • Close (Animation As Boolean)
      • GetPanel As Panel
        If you want Add into Panel USE After Initialize
      • Initialize (EventaName As String, Me_CallBack As Object, LeftStick As Boolean, HightWidh As Int) As String
        Initializes the object. You can add parameters to this method if needed.
        RollOut.Initialize("Roll",Me,Activity,True,60dip)
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
      • Open (Animation As Boolean)
  • SideMenu
    • Events:
      • Click (ID As String)
    • Fields:
      • IsOpen As Boolean
      • TimeAnimation As Int
    • Functions:
      • AddImageButton (Bitmap As Bitmap, ID As String) As String
      • Class_Globals As String
      • Close (Animation As Boolean)
      • GetPanel As Panel
      • Initialize (EventaName As String, Me_CallBack As Object, LeftStick As Boolean, HightWidh As Int) As String
        Initializes the object. You can add parameters to this method if needed.
        RollOut.Initialize("Roll",Me,Activity,True,60dip)
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
      • Open (Animation As Boolean)
  • Versione02
    Code module
    Subs in this code module will be accessible from all modules.
    • Fields:
      • Demo As Boolean
    • Functions:
      • Process_Globals As String


3.gif 4.png 5.png1.gif 2.gif
 

Attachments

  • example1.zip
    7 KB · Views: 1,010
  • example2.zip
    8.4 KB · Views: 948
  • Example3.zip
    20.9 KB · Views: 920
  • Example4.zip
    8.2 KB · Views: 644
  • SD_Menu 0.07.zip
    39.3 KB · Views: 728
Last edited:

jemajuca

Member
Licensed User
About the library and the examples, why are the examples a Demo? When I run them they tell me: Demo: Remain 4 DAY.

The library is full operational or a demo?

Thanks for the info.
 

Star-Dust

Expert
Licensed User
Longtime User
Which version of the library do you use?
Up to version 0.05 I released limited version to encourage donations.
Version 0.06 released by about a week is complete. But I still like donations :p
 

Star-Dust

Expert
Licensed User
Longtime User
To be sure which version you are using you should open b4a and look in the libraries click. Next to the name of the library, the version is indicated

Obviously the library must be clicked / selected
 

jemajuca

Member
Licensed User
Today I downloaded again the library thats the reason for the previous image.

This is from the b4a now

upload_2018-2-15_8-16-28.png
 

Star-Dust

Expert
Licensed User
Longtime User
If you are not sure, Comes the person you find attached at the beginning of this thread.

The files that you find inside the compressed folder should be copied to your Library folder

If you still have problems, tell me, in the late morning I can check your problem
 

Star-Dust

Expert
Licensed User
Longtime User
I attacked full version. Bye
 

Carlos marin

Active Member
Licensed User
Longtime User
hello, is it possible to make an animation for a customlistview? For example, change the size in execution time, expand it in the whole screen?
 

Star-Dust

Expert
Licensed User
Longtime User
Yes, is possible.
but you have to ask this question by opening a new thread in the android questions forum
 

hanyelmehy

Active Member
Licensed User
Longtime User
i use SideMenu ,when go to other activity from (Click) event ,menu freeze ,so when go back to first activity ,its still there freezing
Note :use sleep before call other activity solve this issue ,but this solution is not practical
 

UlisesM

New Member
Hi, I'm using the library for the MenuTree, but it doesn't respect the color change in the BackGround. How can I change the background color of the menu and submenu?
 

Star-Dust

Expert
Licensed User
Longtime User
Hi, I'm using the library for the MenuTree, but it doesn't respect the color change in the BackGround. How can I change the background color of the menu and submenu?
BackGroundColor is a variable, not a property. So it only serves to read the work, but when you change it it does not generate a change in the view.

To change the background color you have to do it by design.

Or like this:
B4X:
MenuTree1.GetBase.Background=Colors.Red

Keep in mind that it is the second library that I created when I met B4A. So it has some flaws.

You will find useful changes from version 0.07 onwards
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
i use SideMenu ,when go to other activity from (Click) event ,menu freeze ,so when go back to first activity ,its still there freezing
Note :use sleep before call other activity solve this issue ,but this solution is not practical
I only read your question now.
Give an example of your problem with a short code.

Keep in mind that the bookcase is 3 years old and I didn't use sleeps at the time.

It may be that the activity takes some time to complete the animation. At the moment without an example I cannot study the problem.
 

UlisesM

New Member
BackGroundColor is a variable, not a property. So it only serves to read the work, but when you change it it does not generate a change in the view.

To change the background color you have to do it by design.

Or like this:
B4X:
MenuTree1.GetBase.Background=Colors.Red

Keep in mind that it is the second library that I created when I met B4A. So it has some flaws
Thanks
 

Guenter Becker

Active Member
Licensed User
Hello,
I used the MenuTree and it works fine. Bute the background is always gray and the texcolor is black. If I changed the cust prop in the designer it is ignored?
Any Idea whats going wrong or how to set the tre menu color?

MenuTree1.GetBase.Background=Colors.Red <<<<<<<<<<<<<<<< This is not working because it awaits no integer it awaits a drawable.

Best regards Guenter
 

Star-Dust

Expert
Licensed User
Longtime User
Hello,
I used the MenuTree and it works fine. Bute the background is always gray and the texcolor is black. If I changed the cust prop in the designer it is ignored?
Any Idea whats going wrong or how to set the tre menu color?

MenuTree1.GetBase.Background=Colors.Red <<<<<<<<<<<<<<<< This is not working because it awaits no integer it awaits a drawable.

Best regards Guenter
Hi,
set the colors from the Design. download latest version. Use XUI colors.
 
Top