Flex Gumbo中如何创建用bitmap来填充背景色List的例子

接下来的例子演示了Flex Gumbo中如何通过BitmapFill对象和自定义renderer,创建用bitmap来填充背景色List。

让我们先来看一下Demo可以点击这里察看源代码):

下面是完整代码(或点击这里察看):
下面是main.mxml:





The
Quick
Brown
Fox
Jumps
Over
The
Lazy
Dog




下面是skins/CustomListSkin.mxml代码:









/* Define the skin elements that should not be colorized.
For list, the skin itself is colorized but the individual parts are not. */
static private const exclusions:Array = [“scroller”, “background”];

override public function get colorizeExclusions():Array {return exclusions;}

/* Define the content fill items that should be colored by the “contentBackgroundColor” style. */
static private const contentFill:Array = [];

override public function get contentItems():Array {return contentFill};






















下面是skins/CustomDefaultItemRenderer.mxml代码:


























代码:Peter deHaan 翻译/整理/编译:中文Flex例子

Leave a Reply

Your email address will not be published. Required fields are marked *