Reputation: 19
I am trying to create a Component in MXML which will should allow me to add a MXML in it .
Result would look very much like a Panel, only that it would have buttons in the header and the content area would be populated by MXML reference i add .
On a mobile/Tablet, i want to be able to display multiple forms, data or charts in my view.
Kindly guide me how this can be done.
regards. Heramb
Upvotes: 0
Views: 1785
Reputation: 77117
All this can be done by creating a custom skin. From your description it sounds like you're going to want to create a custom skin for a ViewNavigatorApplication or TabbedViewNavigatorApplication, or something else along those lines. There is also the spark.skins.mobile.SkinnableContainerSkin, which can be used to skin the SkinnableContainer class, which is about the most general container you could begin with. But since you say you're targeting mobile, I'm guessing you'll want to skin the application.
Jason SJ has a tutorial on making a custom TabbedViewNavigatorApplicationSkin: Video: How to Skin a TabbedViewNavigatorApplication
Even if you don't want the Tabbed View, skinning for the other Application models should be similar.
For more reference on Skinning for mobile:
Also, if you're totally new to skinning Flex containers, I'd recommend getting to know the Flex 4 skinning architecture first. In which case, check out:
Note
Since you are targeting mobile, make sure that you use the spark.skins.mobile package and not any of the Flex 4.1 or older skins, as most of them are not recommended for mobile. Also, don't use the spark.components.Panel class, since it is also not recommended.
Upvotes: 1