Hi
I am producing an App that has a small icon to slide a menu in from the side on different sections. This contains multiple elements such as a search box, buttons, images and labels etc so I have decided to create a layout file and load it into a dynamically created panel. I have created a function in a code module to do this that uses the following:
PosX being set to two thirds of the screen width. This works great up to now, however I want to run functions when buttons are being clicked on this layout and a few other things such as setting a custom font from a ttf so the menu is similar to an activity.
I can have the click subs in each activity module that I run the menu from although this is copying code and doesn't seem like the best solution. It almost seems like I need 2 activities running at the same time taking up different parts of the screen although this doesn't seem to be possible.
Can anyone tell me what the best way to produce this will be?
Thanks for any help.
I am producing an App that has a small icon to slide a menu in from the side on different sections. This contains multiple elements such as a search box, buttons, images and labels etc so I have decided to create a layout file and load it into a dynamically created panel. I have created a function in a code module to do this that uses the following:
B4X:
Dim Panel1 As Panel
Panel1.Initialize("LeftMenuPanel")
Activity.AddView(Panel1, 0, 0, PosX, 100%y)
Panel1.LoadLayout("SlideNav")
PosX being set to two thirds of the screen width. This works great up to now, however I want to run functions when buttons are being clicked on this layout and a few other things such as setting a custom font from a ttf so the menu is similar to an activity.
I can have the click subs in each activity module that I run the menu from although this is copying code and doesn't seem like the best solution. It almost seems like I need 2 activities running at the same time taking up different parts of the screen although this doesn't seem to be possible.
Can anyone tell me what the best way to produce this will be?
Thanks for any help.