Mar 21, 2017 Replies: 25 Hello all, it's been a while since i've posted anything, i've created a few libraries small libraries for personal use and have not had so much time to share them. Well, today is the day, this library is a wrapper from this library https://android-arsenal.com/details/1/5361 which i wrapped many months ago, i've cleaned it up a little and sharing it with you guys today, is nothing too fancy but it would give a very nice touch to any app in my humble opinion. attached is the xml and jar files along with a B4A example on how to use it. Also i'am including the resources folder which needs to be included using the #AdditionalRes Click to expand... Please note that the AppCompat library is needed and the AppCompatActivity needs to be extended from the Main Activity. Updated 10/10/2017 Version 1.01, Added OpenMenu method. B4ACircleMenu Author: Walter Flores Version: 1 CircleMenu Events: MenuSelected (index as Int As ) OnMenuClosed OnMenuOpened Methods: BringToFront Initialize (eventname As String, color As Int, openicon As String, closeicon As String) initialize library Example <code> Dim menu as CircleMenu menu.Initialize("menu1", Colors.Blue, "open_menu", "close_menu") </code> Invalidate Invalidate2 (arg0 As Rect) Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) IsInitialized As Boolean RemoveView RequestFocus As Boolean SendToBack SetBackgroundImage (arg0 As Bitmap) SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int) SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int) SetVisibleAnimated (arg0 As Int, arg1 As Boolean) OpenMenu addSubMenu (colors() As Int, icons() As String) adds submenu icons to main menu receives an array or colors and an array of strings whcih point to the icon resources <code> Dim rescolors() as int = Array As Int(Colors.red, Colors.blue, Colors.Green,Colors.Magenta) Dim icons() as String = Array As String ("camera_2","icon_setting","save_48","blank_file") menu.addSubMenu(rescolors, icons) Activity.AddView(menu, 0, 0, 100%x, 100%y) </code> Properties: Background As Drawable Color As Int [write only] Enabled As Boolean Height As Int Left As Int Padding()() As Int Parent As Object [read only] Tag As Object Top As Int Visible As Boolean Width As Int Hope you guys enjoy it, any questions please feel free to ask, Regards, Walter Attachments CircleMenu_1.0.0.zip CircleMenu_1.0.0.zip 18.6 KB · Views: 907 res.zip res.zip 58.5 KB · Views: 1,025 B4ACircle Menu Example.zip B4ACircle Menu Example.zip 16.9 KB · Views: 992 B4ACircleMenu_1.01.zip B4ACircleMenu_1.01.zip 19 KB · Views: 921 Last edited: Oct 11, 2017 Click to expand...
Hello all, it's been a while since i've posted anything, i've created a few libraries small libraries for personal use and have not had so much time to share them. Well, today is the day, this library is a wrapper from this library https://android-arsenal.com/details/1/5361 which i wrapped many months ago, i've cleaned it up a little and sharing it with you guys today, is nothing too fancy but it would give a very nice touch to any app in my humble opinion. attached is the xml and jar files along with a B4A example on how to use it. Also i'am including the resources folder which needs to be included using the #AdditionalRes Click to expand... Please note that the AppCompat library is needed and the AppCompatActivity needs to be extended from the Main Activity. Updated 10/10/2017 Version 1.01, Added OpenMenu method. B4ACircleMenu Author: Walter Flores Version: 1 CircleMenu Events: MenuSelected (index as Int As ) OnMenuClosed OnMenuOpened Methods: BringToFront Initialize (eventname As String, color As Int, openicon As String, closeicon As String) initialize library Example <code> Dim menu as CircleMenu menu.Initialize("menu1", Colors.Blue, "open_menu", "close_menu") </code> Invalidate Invalidate2 (arg0 As Rect) Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) IsInitialized As Boolean RemoveView RequestFocus As Boolean SendToBack SetBackgroundImage (arg0 As Bitmap) SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int) SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int) SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int) SetVisibleAnimated (arg0 As Int, arg1 As Boolean) OpenMenu addSubMenu (colors() As Int, icons() As String) adds submenu icons to main menu receives an array or colors and an array of strings whcih point to the icon resources <code> Dim rescolors() as int = Array As Int(Colors.red, Colors.blue, Colors.Green,Colors.Magenta) Dim icons() as String = Array As String ("camera_2","icon_setting","save_48","blank_file") menu.addSubMenu(rescolors, icons) Activity.AddView(menu, 0, 0, 100%x, 100%y) </code> Properties: Background As Drawable Color As Int [write only] Enabled As Boolean Height As Int Left As Int Padding()() As Int Parent As Object [read only] Tag As Object Top As Int Visible As Boolean Width As Int Hope you guys enjoy it, any questions please feel free to ask, Regards, Walter
DonManfred Expert Licensed User Longtime User Oct 11, 2017 #21 walterf25 said: The OnMenuOpened event should fire up automatically when you open the menu. Click to expand... True But he want´s to open the Menu programatically
walterf25 said: The OnMenuOpened event should fire up automatically when you open the menu. Click to expand... True But he want´s to open the Menu programatically
walterf25 Expert Licensed User Longtime User Oct 11, 2017 #22 G-ShadoW said: How to programaticly call OnMenuOpened? Click to expand... I have uploaded version 1.01 on the first post, i've added the OpenMenu method, you can now call it to open the menu programatically. Regards, Walter
G-ShadoW said: How to programaticly call OnMenuOpened? Click to expand... I have uploaded version 1.01 on the first post, i've added the OpenMenu method, you can now call it to open the menu programatically. Regards, Walter
NJDude Expert Licensed User Longtime User Oct 14, 2017 #23 Yo Walt!, I still have the same issue with those "ghost" buttons I reported on post #14.
walterf25 Expert Licensed User Longtime User Oct 15, 2017 #24 NJDude said: Yo Walt!, I still have the same issue with those "ghost" buttons I reported on post #14. Click to expand... @NJDude I know man, nothing i can do, i only wrapped the library, I will try to find out why that is when i get some free time, LOL, like that's gonna happen Good to see you're still around man. Walter
NJDude said: Yo Walt!, I still have the same issue with those "ghost" buttons I reported on post #14. Click to expand... @NJDude I know man, nothing i can do, i only wrapped the library, I will try to find out why that is when i get some free time, LOL, like that's gonna happen Good to see you're still around man. Walter
NJDude Expert Licensed User Longtime User Oct 15, 2017 #25 walterf25 said: @NJDude I know man, nothing i can do, i only wrapped the library, I will try to find out why that is when i get some free time, LOL, like that's gonna happen Walter Click to expand... Thanks! I feel much better now
walterf25 said: @NJDude I know man, nothing i can do, i only wrapped the library, I will try to find out why that is when i get some free time, LOL, like that's gonna happen Walter Click to expand... Thanks! I feel much better now
walterf25 Expert Licensed User Longtime User Oct 15, 2017 #26 NJDude said: Thanks! I feel much better now Click to expand... Lol, Mr NJDude the super OCD freak