First of all I would like to say, that I want to say "Hello in here".
Requirements:
I should make it possible to create a client application which gets metadata about controls from a database. This application should be able to switch from one view (with subviews, like buttons for example ) to another view.
Status:
I created a relatively huge development oo model, using interfaces, and subclasses (of button, for example), which all implement special own interfaces in order to react properly to my demands. I read about fragment, fragmentactivity and fragments, i must use v4 compatibility classes, so my activity inherits from FragmentActivity and implements some special own interfaces. I am now at the point, where a controller class, which is the only reference in my FragmentActivity class, does many things and finally should make the fragment visible.
I also have already collected those subviews(buttons, labels, textviews ) in a collection, and each runtime created fragment should now "place its subviews" onto the screen. Remember, my custom view "Fragment" inherits from Fragment and implements some special things.
My fragment is getting created at runtime, so I do not have any xml which defines any layout.
Questions:
a) is it possible for me working without an xml-layout and apply any layout to the fragment programatically and at runtime ? My first attempts using an Layout declared globally in my custom fragment class did not succeed because I wanted to call getView() during several states BUT always got null. Therefore I must ask
b) question b ( only when a == true ) when and how can I receive the correct view from getView in order to set the layout programatically ?
THX in advance.