wdev
wdev

Reputation: 19

Creating Custom Panel Container for Flex Mobile Application

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

Answers (1)

merv
merv

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:

  • Jason SJ has a three part tutorial: Flex Mobile Skins
  • Chapter on Skinning in the official reference Developing Mobile Applications with Flex

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

Related Questions