Feb 21, 2019 Replies: 52 SD_BottoMenu (update) Author: Star-Dust Version: 1.6 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 Attachments SD_BottoMenu.b4xlib SD_BottoMenu.b4xlib 4 KB · Views: 1,351 Last edited: Sep 28, 2022 Click to expand...
SD_BottoMenu (update) Author: Star-Dust Version: 1.6 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
Star-Dust Expert Licensed User Longtime User Feb 21, 2019 #2 Attached are the examples for B4A, B4J, B4i Code: Copy 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 Attachments jSample1.zip jSample1.zip 2.2 KB · Views: 982 iSample1.zip iSample1.zip 110.3 KB · Views: 960 aSample1.zip aSample1.zip 9.6 KB · Views: 1,024 iSample2.zip iSample2.zip 113.1 KB · Views: 758 Last edited: Apr 1, 2020
Attached are the examples for B4A, B4J, B4i Code: Copy 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
itgirl Active Member Licensed User Longtime User Feb 21, 2019 #3 WOW Looks very nice shows the power of B4X thanks
Star-Dust Expert Licensed User Longtime User Feb 22, 2019 #5 Brandsum said: The circle animation is flickering. View attachment 77627 Click to expand... 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: Copy TransitionAnimated(200,GenerateBitmapSelected("",xui.Color_Black,xui.CreateDefaultBoldFont(16)),GenerateBitmapSelected(M.Get("CharText"),xui.Color_Black,M.Get("Font")),Slct)
Brandsum said: The circle animation is flickering. View attachment 77627 Click to expand... 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: Copy TransitionAnimated(200,GenerateBitmapSelected("",xui.Color_Black,xui.CreateDefaultBoldFont(16)),GenerateBitmapSelected(M.Get("CharText"),xui.Color_Black,M.Get("Font")),Slct)
Brandsum Well-Known Member Licensed User Feb 22, 2019 #6 Star-Dust said: 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: Copy TransitionAnimated(200,GenerateBitmapSelected("",xui.Color_Black,xui.CreateDefaultBoldFont(16)),GenerateBitmapSelected(M.Get("CharText"),xui.Color_Black,M.Get("Font")),Slct) Click to expand... Not that icon animation, but the white circle and the curve beside the circle.
Star-Dust said: 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: Copy TransitionAnimated(200,GenerateBitmapSelected("",xui.Color_Black,xui.CreateDefaultBoldFont(16)),GenerateBitmapSelected(M.Get("CharText"),xui.Color_Black,M.Get("Font")),Slct) Click to expand... Not that icon animation, but the white circle and the curve beside the circle.
Star-Dust Expert Licensed User Longtime User Feb 22, 2019 #7 Brandsum said: Not that icon animation, but the white circle and the curve beside the circle. Click to expand... 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
Brandsum said: Not that icon animation, but the white circle and the curve beside the circle. Click to expand... 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
Star-Dust Expert Licensed User Longtime User Feb 22, 2019 #8 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
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)
Brandsum Well-Known Member Licensed User Feb 22, 2019 #9 Star-Dust said: But I saw that you accepted the challenge of creating a menu similar to this Click to expand... 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. Star-Dust said: I suggest you to start from scratch without seeing mine Click to expand... Oh sure!! I will not copy your code.
Star-Dust said: But I saw that you accepted the challenge of creating a menu similar to this Click to expand... 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. Star-Dust said: I suggest you to start from scratch without seeing mine Click to expand... Oh sure!! I will not copy your code.
Star-Dust Expert Licensed User Longtime User Feb 22, 2019 #10 Brandsum said: 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. Click to expand... 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
Brandsum said: 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. Click to expand... 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
Star-Dust Expert Licensed User Longtime User Feb 23, 2019 #11 I improved the code and enlarged the selection sphere. I attach the code (Now also for B4J) Attachments Sample2.zip Sample2.zip 11.8 KB · Views: 1,032 Last edited: Feb 23, 2019
Kope Active Member Licensed User Longtime User Feb 24, 2019 #12 Star-Dust said: Code: Copy 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 Click to expand... Great Job!! Can you please help with how to navigate to another activity or layout? thank you
Star-Dust said: Code: Copy 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 Click to expand... Great Job!! Can you please help with how to navigate to another activity or layout? thank you
Star-Dust Expert Licensed User Longtime User Feb 24, 2019 #13 Kope said: Great Job!! Can you please help with how to navigate to another activity or layout? thank you Click to expand... Attachments SD_BottoMenu 1.1.zip SD_BottoMenu 1.1.zip 12.3 KB · Views: 996
Kope said: Great Job!! Can you please help with how to navigate to another activity or layout? thank you Click to expand...
Kope Active Member Licensed User Longtime User Feb 24, 2019 #14 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
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
Star-Dust Expert Licensed User Longtime User Feb 25, 2019 #15 Kope said: 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 Click to expand... Maybe I did not understand what you want to get. Spice better or show a picture that illustrates it
Kope said: 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 Click to expand... Maybe I did not understand what you want to get. Spice better or show a picture that illustrates it
Marlou Fin Member Licensed User Feb 25, 2019 #16 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?
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?
Star-Dust Expert Licensed User Longtime User Feb 25, 2019 #17 Marlou Fin said: 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? Click to expand... 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 Last edited: Feb 28, 2019
Marlou Fin said: 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? Click to expand... 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
Marlou Fin Member Licensed User Feb 25, 2019 #18 Thanks Star-Dust for the tips, just last question, where you can get a table for this one Chr(0xF009)?
Thanks Star-Dust for the tips, just last question, where you can get a table for this one Chr(0xF009)?
Star-Dust Expert Licensed User Longtime User Feb 25, 2019 #19 Click sx Mouse Button Attachments upload_2019-2-25_17-23-44.png 27 KB · Views: 875
Marlou Fin Member Licensed User Feb 25, 2019 #20 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
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