I want to create a dynamic form in my application, the number of forms will be determined at runtime (from 1 to n). To implement this, I create a From class that extends Activity. My application can have multiple instances of this Form class and move from one of them to another.
What is the best way to implement and interact between multiple instances of the same class (from a class).
How to communicate between two forms (using Intent ..?).
OR
Another option is to take one action [as an application] for all forms and display each form in the same activity?
. , TabLayout, FrameLayout .
. FrameLayout, , . TabLayout (, ), ArrayList TabActivity, .
, , , - (, , - , ). if/else .
, ( ) .
- ... , . , .
I think the second solution sounds more like the βright way to do it.β Instead of implementing different actions, I propose that this is the best solution for creating multi-user presentations, such as Widgets, which are presentations of the current form that you need.
In any case, if you want to communicate between Activity, I think the best way is to do it through Handler-Objects. These handlers can process messages in which you can define, and put a lot of data inside.