Newbie Q: Activity, Views, code mods

chuckyegg

Member
Licensed User
Longtime User
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?
 

chuckyegg

Member
Licensed User
Longtime User
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…