marcel Active Member Licensed User Longtime User Nov 19, 2012 #1 Hi, I have for screens. My initial thought was I use 4 activities to keep things clean. But I have a top bar and a actionbar. This makes things complicated because I need similar code in all the 4 activities for catching the button events and top bar events. So i end up having one activity and replaces the content part when switching from actions. Would be nice if you could included the top bar and bottom bar to different layout files. this way I need to design them once. Also the code would be nice to include to use them once. Is this possible? Do I make design failures?
Hi, I have for screens. My initial thought was I use 4 activities to keep things clean. But I have a top bar and a actionbar. This makes things complicated because I need similar code in all the 4 activities for catching the button events and top bar events. So i end up having one activity and replaces the content part when switching from actions. Would be nice if you could included the top bar and bottom bar to different layout files. this way I need to design them once. Also the code would be nice to include to use them once. Is this possible? Do I make design failures?
Erel B4X founder Staff member Licensed User Longtime User Nov 20, 2012 #2 Is this possible? Click to expand... Yes. Use a class for this bar. It will allow you to easily add such bar to each activity. Upvote 0
Is this possible? Click to expand... Yes. Use a class for this bar. It will allow you to easily add such bar to each activity.
Erel B4X founder Staff member Licensed User Longtime User Nov 21, 2012 #4 There are several examples of UI objects made with classes: Basic4android Search: Class Upvote 0
marcel Active Member Licensed User Longtime User Nov 21, 2012 #5 Erel said: There are several examples of UI objects made with classes: Basic4android Search: Class Click to expand... Ok. Now I get it. You mean buidling your UI with code instead of the designer? Is there also a way to use the cloud service for testing the layout? Upvote 0
Erel said: There are several examples of UI objects made with classes: Basic4android Search: Class Click to expand... Ok. Now I get it. You mean buidling your UI with code instead of the designer? Is there also a way to use the cloud service for testing the layout?
Erel B4X founder Staff member Licensed User Longtime User Nov 22, 2012 #6 You can use the designer to create the layout and then load it from the class and add the required functionality. Upvote 0
You can use the designer to create the layout and then load it from the class and add the required functionality.
marcel Active Member Licensed User Longtime User Nov 25, 2012 #7 Erel said: You can use the designer to create the layout and then load it from the class and add the required functionality. Click to expand... Thanks Upvote 0
Erel said: You can use the designer to create the layout and then load it from the class and add the required functionality. Click to expand... Thanks