All posts by ssh

Enable Scrolling in the tab bar of a TabbedViewNavigator

The default tab bar in a TabbedViewNavigator sizes its buttons to fit them all into the screen at once truncating where necessary. This post demonstrates how to create a custom skin that doesn’t truncate buttons, but instead allows horizontal scrolling to reveal buttons offscreen.
Continue reading Enable Scrolling in the tab bar of a TabbedViewNavigator

Adding multiline text support to LabelItemRenderer

LabelItemRenderer is the default base class for mobile optimized item renderers. It has a single StyleableTextField for a labelDisplay that truncates its text with an ellipsis mark when the text is too large to fit on one line. This post demonstrates how to change that behavior to reflow text onto multiple lines rather than truncate.
Continue reading Adding multiline text support to LabelItemRenderer

Controlling scroll bar visibility in a mobile Scroller

The default behavior of scroll bars in a mobile Scroller is to always hide the scrollbars unless a touch scrolling operation is in effect. This post demonstrates how to customize this behavior so that the scroll bars are always visible. It also demonstrates how to have scrollbars automatically appear at startup then fade away after a short period of time.
Continue reading Controlling scroll bar visibility in a mobile Scroller

Using drag and drop with a spark List in a mobile Flex application

In a mobile Flex project the default interactionMode is touch. When in this mode drag and drop functionality on the spark List is not supported. This post demonstrates a workaround for adding drag and drop support to your mobile Lists by subclassing IconItemRenderer and dynamically changing the interactionMode on the fly.
Continue reading Using drag and drop with a spark List in a mobile Flex application

Simulating an Android window shade in a mobile Flex application

If you drag down from the top of an Android phone, you will get a pull down menu that exposes a set of buttons and options. This is sometimes referred to as a “window shade”, see this video for an example. This post demonstrates how to extend a spark SkinnableContainer to simulate this functionality in a mobile Flex application.
Continue reading Simulating an Android window shade in a mobile Flex application

Saving scroll position between views in a mobile Flex Application

In a mobile Flex application when you navigate to a new view the old view is destroyed. If you then go back to that first view then it is re-instantiated. If you have a List in that initial view then any scroll position changes the user may have done will be lost. This post demonstrates how to save and restore that scroll position when navigating between views.
Continue reading Saving scroll position between views in a mobile Flex Application