B4A Library [B4X] [XUI] HexMenu

Erel

Administrator
Staff member
Licensed User

Attachments

Last edited:

Erel

Administrator
Staff member
Licensed User
Note that in your project you "try" to add 10 items (For i = 1 To 10)
True. I added more items as a test. It ignores the 8th and above items.

Now it is needed to add images inside the hexagons; who will do it?
Shouldn't be too difficult to do. There are several ways to add images. If the images are small so you don't need to deal with clipping then the simplest way is to add ImageViews in the same way that the labels are added.

It is also not too complicated to deal with clipping. It can be done by drawing with bc.DrawPath2 and a BCBrush that is based on a BitmapCreator.
 

LucaMs

Expert
Licensed User
Shouldn't be too difficult to do. There are several ways to add images. If the images are small so you don't need to deal with clipping then the simplest way is to add ImageViews in the same way that the labels are added.
Hexagon.png



As you know, I'm lazy :D, so I used a single image and I didn't manage the labels (superimpose them on the ImageViews or set a LabelsOnly property, for example).
 

Attachments

ThePuiu

Active Member
Licensed User
It is possible to add to the text and an image (FontAwesome)? Something like the attached image
 

Attachments

LucaMs

Expert
Licensed User
Now I shoud mix your last example (gradient), also adding properties for the 2 colors, with my version (images)!

Mi piacerebbe ma non mi va :D (italian)
 

amidgeha

Member
Licensed User
I have one of the hexmenu buttons that opens a browser using
B4X:
StartActivity(xph.OpenBrowser("http://mechanicalpowergen.com"))
when I press back the button text disappears when I press any other button in hexmenu.
 
Last edited:

amidgeha

Member
Licensed User
Cross platform hexagons menu implemented as a custom view:



Can show up to 7 items.

B4A project is attached. Class is supported by B4J and B4i as well. Depends on XUI and BitmapCreator libraries.

Example with gradient stroke:


Version with gradient stroke: https://www.b4x.com/android/forum/threads/b4x-xui-hexmenu.112410/#post-700941
I have one of the hexmenu buttons that opens a browser using
B4X:
StartActivity(xph.OpenBrowser("http://mechanicalpowergen.com"))
when I press back the button text disappears when I press any other button in hexmenu.
 
Top