I don't agree. You should implement all of the shared code in a class. In the worst case you will need to duplicate a single line that is called from one of the activities events.
Erel, probably, I didn't understand very well what you mean, but this is my case:
- I have an app with several activities managing database records, each of them is similar to others, but obviuosly data fields could very different
- Each activity has a "find part": a listview and some others (buttons and fields) to filter the data
- Each activity has a "detail part": a panel containing views to view/modify the data searched
- There are some common functions such: activity_keypress, activity_resume, data_loading, data_saving, data_erasing, that have the same code
- Several times I build the detail layout dinamically, to reuse activities that are very similar
- I need (ALWAYS) to navigate between activities: say, from the invoice, I want to open the customer's detail, the product's detail or some other linked documents and then return to the invoice detail: I should use the same activity, but saving context and replacing is quite slow if you have several views to destroy and recreate. So I use one activity for each and need to duplicate a lot of code
Using B4XViews is very similar to using the standard views.
B4X hasn't grown too much.
B4X structure is simple and powerful. A simple structure is a good base for further growth.
Don't agree:
- Create a simple B4XPlusMinus (or other B4x) at runtime, as if they were standard views: quite difficult, there is a workaround (if I remember well from LucaMs, creating a layout). I tried to create AddToParent sub in library, but without luck
- Try to cast a GetAllViewsRecursively result to a B4XView (as in my question, some days ago): the B4XView is hidden in the Tag property. I know there is a reason for this, but using BX4Views is not the same than using standard ones: I lost a lot of time to convert my old Apps...
- Try to change B4XSeekbar bounds at runtime...
Erel, I appreciate your great job: BX4 is a wonderful tool, and love it, but it changes quickly and very often is difficult to follow...