Android Question Start and Stop activity from a inside a Class

stevew

Member
Licensed User
Longtime User
I would like to make a standard class (and not a CustomView class) that once initialized starts an actitity that loads a layout designed in the designer and after getting a user input from the activity, 'closes' the activity and then returns the results from the class object.

I want to create a reusable 'black box' that receives info, maipulates that inf, included getting user input from an activity, then returns various info through subs (functions) from the class object.

I can't seem to find an example.

I am ok at creating and using classes. I'm Ok at creating activities using Designer layouts. I cant figure out how to load an activity from inside the class and see it, and then have the class kill it. I do not want to have to pass an activuty to the class. I want it to load automatically whent he class is instantiated.

Is this possilbe?

Tnak you.
 

stevew

Member
Licensed User
Longtime User
Thanks Erel! I've already done a couple of 'Black Box' libraries using a custom view, so I may stay with that technique; though I'm going to look at passing in the Activity.

FYI - I know you've heard this a thousand times - but after trying numerous 'mainstream' alternatives I've come back to B4a to develop for tablets and phones. It is by far the easiest I've used and it is truly a RAD tool. You are to be congratulated.
 
Upvote 0
Top