C chuckyegg Member Licensed User Longtime User Oct 21, 2012 #1 Hi guys, I'm making pretty good progress with B4A (I think) but I could do with some help with some basic stuff. I have read the User guide etc but I just don't get this. I have an Activity ("Main") and a Service mod. Most of my code appears in the Service. I want another Activity ("Settings") which will have it's own Views and Code. There'll be quite a lot of both so ideally I don't want any code from "Settings" appearing in "Main". How do I relate a Code Module to an Activity so I can access the Views on it? Or am I doing it the wrong way?
Hi guys, I'm making pretty good progress with B4A (I think) but I could do with some help with some basic stuff. I have read the User guide etc but I just don't get this. I have an Activity ("Main") and a Service mod. Most of my code appears in the Service. I want another Activity ("Settings") which will have it's own Views and Code. There'll be quite a lot of both so ideally I don't want any code from "Settings" appearing in "Main". How do I relate a Code Module to an Activity so I can access the Views on it? Or am I doing it the wrong way?
thedesolatesoul Expert Licensed User Longtime User Oct 21, 2012 #2 When you create a new activity (Settings), the code/views will remain separated from Main. Upvote 0
C chuckyegg Member Licensed User Longtime User Oct 22, 2012 #3 Thanks I know this is really basic but I've been confusing Activity and Layout. Once I realised they're different things I've got my head around it much better. For any other newbies following along behind: Activity = functionality Layout = visual presentation of controls Create a new project "Main" activity is created for you In "Main" activity.loadlayout("layoutOne") Create a new Activity (in v1.8 that's Project - Add new module - Activity module) In new module activity.loadlayout("layoutTwo") Upvote 0
Thanks I know this is really basic but I've been confusing Activity and Layout. Once I realised they're different things I've got my head around it much better. For any other newbies following along behind: Activity = functionality Layout = visual presentation of controls Create a new project "Main" activity is created for you In "Main" activity.loadlayout("layoutOne") Create a new Activity (in v1.8 that's Project - Add new module - Activity module) In new module activity.loadlayout("layoutTwo")