When creating a CustomView there are #DesignerProperty lines where you can (scalar) properties for the CustomView. Which is fine. But CustomViews can also contain other views like Button or Panels in code and even initialize other custom views. The problem is there is no easy way to initialize the properties for these other views using the designer. It all has to be done in code. Unless you want to duplicate the other views properties in your custom view which gets messy very quickly.
I could for example create a custom view that has 2 or more buttons on it. If I want to define the properties for these buttons, like color etc., it has to be done in code. The Designer doesn't know these buttons even exist.
1) It would be nice if the Designer could reference these other views, including custom views, so we can define its properties with the designer.
What do you think?
2) The only other (better?) alternative would be to design an activity with all of the necessary views on it, and store it and its code in CustomView class, so an activity could be a CustomView. You could then drop this CustomView onto any Activity and it would be a working view complete with code. This would be the ideal solution I think. (The Designer would have to be able to access the properties of the subviews of this view.)
Anyways. Kick it around and see what you think.
I could for example create a custom view that has 2 or more buttons on it. If I want to define the properties for these buttons, like color etc., it has to be done in code. The Designer doesn't know these buttons even exist.
1) It would be nice if the Designer could reference these other views, including custom views, so we can define its properties with the designer.
B4X:
#DesignerProperty: Key: ButtonUp, DisplayName: Up Button, FieldType: Button, Description: Up Button
#DesignerProperty: Key: ButtonDown, DisplayName: Down Button, FieldType: Button, Description: Down Button
What do you think?
2) The only other (better?) alternative would be to design an activity with all of the necessary views on it, and store it and its code in CustomView class, so an activity could be a CustomView. You could then drop this CustomView onto any Activity and it would be a working view complete with code. This would be the ideal solution I think. (The Designer would have to be able to access the properties of the subviews of this view.)
Anyways. Kick it around and see what you think.