Android Question [Closed] Reusing layout, how to reuse/factor related code?

Alexis Martial

Member
Licensed User
Layout and their scripts are fantastic!

In my current application, I have such a layout that is actually for an overlay/dialog and I'm reusing it in 2 activities.

However, I can't find a way to reuse the code that handle them (filling the fields, handling the events, etc).

I could write a dedicated module but can't use Designer to declare the different views into this module.
I could pass the enclosing panel to each of this module routine, but that means I would have to manually find each child view [which I guess is what B4A is doing behind the scene].
Issue is this make it very difficult to maintain.

Any suggestion for those that have done similar things?
 

MarkusR

Well-Known Member
Licensed User
Longtime User
yes it just load a new layout at runtime.
after usage the view can removed.
 
Upvote 0
Top