Dec 22, 2019 Replies: 35 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 Attachments HexMenu.zip HexMenu.zip 11 KB · Views: 1,339 Last edited: Dec 23, 2019 Click to expand...
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
LucaMs Expert Licensed User Longtime User Dec 22, 2019 #2 Erel said: Can show up to 7 items. Click to expand... Note that in your project you "try" to add 10 items (For i = 1 To 10) I think that they should be always 7 (or 19), to look nice. Now it is needed to add images inside the hexagons; who will do it? Last edited: Dec 22, 2019
Erel said: Can show up to 7 items. Click to expand... Note that in your project you "try" to add 10 items (For i = 1 To 10) I think that they should be always 7 (or 19), to look nice. Now it is needed to add images inside the hexagons; who will do it?
Erel B4X founder Staff member Licensed User Longtime User Dec 23, 2019 #3 LucaMs said: Note that in your project you "try" to add 10 items (For i = 1 To 10) Click to expand... True. I added more items as a test. It ignores the 8th and above items. LucaMs said: Now it is needed to add images inside the hexagons; who will do it? Click to expand... 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 said: Note that in your project you "try" to add 10 items (For i = 1 To 10) Click to expand... True. I added more items as a test. It ignores the 8th and above items. LucaMs said: Now it is needed to add images inside the hexagons; who will do it? Click to expand... 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 Longtime User Dec 23, 2019 #4 Erel said: 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. Click to expand... As you know, I'm lazy , 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 HexMenu2.zip HexMenu2.zip 16 KB · Views: 839
Erel said: 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. Click to expand... As you know, I'm lazy , 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).
LucaMs Expert Licensed User Longtime User Dec 23, 2019 #5 LucaMs said: As you know, I'm lazy , 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). Click to expand... I rested sufficiently Now you can choose the "menu item type": image, text or both (it's a property). Attachments HexMenu2_1.zip HexMenu2_1.zip 16.4 KB · Views: 901
LucaMs said: As you know, I'm lazy , 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). Click to expand... I rested sufficiently Now you can choose the "menu item type": image, text or both (it's a property).
ThePuiu Active Member Licensed User Longtime User Dec 23, 2019 #6 It is possible to add to the text and an image (FontAwesome)? Something like the attached image Attachments but.png 25.2 KB · Views: 823
LucaMs Expert Licensed User Longtime User Dec 23, 2019 #7 ThePuiu said: It is possible to add to the text and an image (FontAwesome)? Something like the attached image Click to expand... The list of labels is public. You can write what and how you want In version 2.1 I changed the labels' text color (project code).
ThePuiu said: It is possible to add to the text and an image (FontAwesome)? Something like the attached image Click to expand... The list of labels is public. You can write what and how you want In version 2.1 I changed the labels' text color (project code).
LucaMs Expert Licensed User Longtime User Dec 23, 2019 #8 Anyway to get a similar image you should change the HexMenu custom view.
Erel B4X founder Staff member Licensed User Longtime User Dec 23, 2019 #9 Example with gradient stroke and font awesome icons: Attachments HexMenu.zip HexMenu.zip 11 KB · Views: 913
LucaMs Expert Licensed User Longtime User Dec 23, 2019 #10 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 (italian)
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 (italian)
ThePuiu Active Member Licensed User Longtime User Dec 23, 2019 #11 Thanks Erel! In B4I a number appears instead of the icon. Attachments IMG_2314.PNG 196.9 KB · Views: 782
Erel B4X founder Staff member Licensed User Longtime User Dec 23, 2019 #12 Change: Code: ${Chr(0xF17B)} To: Code: ${"" & Chr(0xF17B)}
LucaMs Expert Licensed User Longtime User Dec 23, 2019 #13 LucaMs said: Now I shoud mix your last example (gradient), also adding properties for the 2 colors, with my version (images)! Click to expand... Done. Added also a property for the stroke gradient orientation. Attachments HexMenu2_21.zip HexMenu2_21.zip 16.7 KB · Views: 790 Last edited: Dec 23, 2019
LucaMs said: Now I shoud mix your last example (gradient), also adding properties for the 2 colors, with my version (images)! Click to expand... Done. Added also a property for the stroke gradient orientation.
amidgeha Active Member Licensed User Longtime User Dec 29, 2019 #14 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: Dec 29, 2019
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.
amidgeha Active Member Licensed User Longtime User Dec 29, 2019 #15 Erel said: 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 Click to expand... 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.
Erel said: 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 Click to expand... 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.
Erel B4X founder Staff member Licensed User Longtime User Dec 29, 2019 #16 Add Sleep(120) before you call StartActivity. It will allow it to finish the state transition.
watesoft Active Member Licensed User Longtime User Jan 14, 2020 #17 Erel said: Add Sleep(120) before you call StartActivity. It will allow it to finish the state transition. Click to expand... How to hide one or more cells?
Erel said: Add Sleep(120) before you call StartActivity. It will allow it to finish the state transition. Click to expand... How to hide one or more cells?
LucaMs Expert Licensed User Longtime User Jan 14, 2020 #18 watesoft said: How to hide one or more cells? Click to expand... I'm not sure (I don't remember the code) but I fear that you have to "rebuild" all
watesoft said: How to hide one or more cells? Click to expand... I'm not sure (I don't remember the code) but I fear that you have to "rebuild" all
RUNO Active Member Licensed User Longtime User Mar 14, 2020 #19 Can I put image for hexmenu like background not for items , how?
Peter Simpson Expert Licensed User Longtime User Mar 15, 2020 #20 This is absolutely excellent @Erel, If I can ever use this in any future client projects as a legitimate startup menu screen then you can be rest assured that I will Thank you...
This is absolutely excellent @Erel, If I can ever use this in any future client projects as a legitimate startup menu screen then you can be rest assured that I will Thank you...