I plan on getting the same functionality as my View Manager Class and more being able to use Straight JAVA to tweak things now. It is a ScrollView containing a Relative Layout you can add views to. It uses B4A's View wrappers, so just Initialize it and add it like a View to your activity. Currently there are 3 functions to add views (AddView adds your own views to the layout then a Label, Textbox/EditText, Button, and Combobox/Spinner View adder).
Like my View Manager, you name your views and you set EventPrefix names to actual B4A views when created that are even returned to you if needed or you can get the view using it's name in the library. I blended in some IME library elements too- Key thing to remember is 3 different EventPrefixes are possible- 1. The Relative Layout itself has events of a View. 2. HandleKeyboardHeightChange has one to notify you of keyboard height changes like IME does. 3. The library also has an imeAction event that is attached to your View's EventPrefix automatically in AddTextbox.
Since it creates B4A Views internally any events for a B4A view created with AddTextbox, AddLabel, or any future methods added will get events through the EventPrefix you specified in the call just as if you created it in B4A.
I have a lot more to add, but wanted to get this out there to see what people thought so far.
Let me know what you think or any suggestions for the future. I plan on making some state management like my View Manager Class had. I will attempt to use the standard spinner this time and I have even added custom skinning (with GetBackgroundResourceID call) so people can keep the standard or use their own 9 Patches and aren't stuck with the Win9x themed skins my other class had.
Like my View Manager, you name your views and you set EventPrefix names to actual B4A views when created that are even returned to you if needed or you can get the view using it's name in the library. I blended in some IME library elements too- Key thing to remember is 3 different EventPrefixes are possible- 1. The Relative Layout itself has events of a View. 2. HandleKeyboardHeightChange has one to notify you of keyboard height changes like IME does. 3. The library also has an imeAction event that is attached to your View's EventPrefix automatically in AddTextbox.
Since it creates B4A Views internally any events for a B4A view created with AddTextbox, AddLabel, or any future methods added will get events through the EventPrefix you specified in the call just as if you created it in B4A.
I have a lot more to add, but wanted to get this out there to see what people thought so far.
Let me know what you think or any suggestions for the future. I plan on making some state management like my View Manager Class had. I will attempt to use the standard spinner this time and I have even added custom skinning (with GetBackgroundResourceID call) so people can keep the standard or use their own 9 Patches and aren't stuck with the Win9x themed skins my other class had.
Attachments
Last edited: