You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by bi...@apache.org on 2014/06/11 09:28:00 UTC

git commit: [flex-sdk] [refs/heads/new_android_skins] - Android 4.x skins for SpinnerList. Contributed by Aaron Nash here: https://issues.apache.org/jira/browse/FLEX-34356 I made some tweaks to the skin to make it consistent with the color scheme I am w

Repository: flex-sdk
Updated Branches:
  refs/heads/new_android_skins 5c1f4904b -> 95c7ca684


Android 4.x skins for SpinnerList.  Contributed by Aaron Nash here: https://issues.apache.org/jira/browse/FLEX-34356
I made some tweaks to the skin to make it consistent with the color scheme I am working with.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/95c7ca68
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/95c7ca68
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/95c7ca68

Branch: refs/heads/new_android_skins
Commit: 95c7ca684e44d73e6b2e25633d114f8c737779c4
Parents: 5c1f490
Author: Om <bi...@gmail.com>
Authored: Wed Jun 11 00:26:42 2014 -0700
Committer: Om <bi...@gmail.com>
Committed: Wed Jun 11 00:26:42 2014 -0700

----------------------------------------------------------------------
 .../projects/mobiletheme/src/android4x.css      |  28 ++
 .../skins/android4/SpinnerListContainerSkin.as  | 337 +++++++++++++++++++
 .../skins/android4/SpinnerListScrollerSkin.mxml |  94 ++++++
 .../src/spark/skins/android4/SpinnerListSkin.as | 267 +++++++++++++++
 .../assets/SpinnerListContainerBackground.fxg   |  47 +++
 .../SpinnerListContainerSelectionIndicator.fxg  |  44 +++
 .../assets/SpinnerListContainerShadow.fxg       |  41 +++
 7 files changed, 858 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/95c7ca68/frameworks/projects/mobiletheme/src/android4x.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobiletheme/src/android4x.css b/frameworks/projects/mobiletheme/src/android4x.css
index f014200..511511f 100644
--- a/frameworks/projects/mobiletheme/src/android4x.css
+++ b/frameworks/projects/mobiletheme/src/android4x.css
@@ -111,6 +111,15 @@ Callout
     borderColor: 0;
 }
 
+Callout ViewNavigator ActionBar
+{
+	skinClass: ClassReference("spark.skins.mobile.CalloutActionBarSkin");
+	defaultButtonAppearance: none;
+	paddingLeft: 0;
+	paddingRight: 0;
+}
+
+
 CheckBox
 {
 	skinClass: ClassReference("spark.skins.android4.CheckBoxSkin");
@@ -130,6 +139,25 @@ RadioButton
 	chromeColor: #FFFFFF;
 }
 
+SpinnerList
+{
+	skinClass: ClassReference("spark.skins.android4.SpinnerListSkin");
+}
+
+SpinnerListContainer
+{
+	skinClass: ClassReference("spark.skins.android4.SpinnerListContainerSkin");
+	backgroundAlpha: 0;
+}
+
+SpinnerListItemRenderer
+{
+	paddingTop : 18;
+	paddingBottom : 18;
+	paddingLeft : 16;
+	paddingRight : 16;
+}
+
 TabbedViewNavigator #tabBar
 {
 	fontFamily: RobotoRegular;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/95c7ca68/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListContainerSkin.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListContainerSkin.as b/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListContainerSkin.as
new file mode 100644
index 0000000..f8b3779
--- /dev/null
+++ b/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListContainerSkin.as
@@ -0,0 +1,337 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package spark.skins.android4
+{
+	import flash.display.Graphics;
+	import flash.display.InteractiveObject;
+	import flash.display.Sprite;
+	
+	import mx.core.DPIClassification;
+	import mx.core.mx_internal;
+	import spark.components.Group;
+	import spark.components.SpinnerListContainer;
+	import spark.layouts.HorizontalLayout;
+	//import android skins
+	import spark.skins.android4.assets.SpinnerListContainerBackground;
+	import spark.skins.android4.assets.SpinnerListContainerSelectionIndicator;
+	import spark.skins.android4.assets.SpinnerListContainerShadow
+		
+	import spark.skins.mobile.supportClasses.MobileSkin;
+
+	use namespace mx_internal;
+	/**
+	 *  ActionScript-based skin for the SpinnerListContainer in mobile applications. 
+	 * 
+	 *  @see spark.components.SpinnerListContainer
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion AIR 3
+	 *  @productversion Flex 4.6
+	 */
+	public class SpinnerListContainerSkin extends MobileSkin
+	{
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+		/**
+		 *  Constructor.
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 * 
+		 */
+		public function SpinnerListContainerSkin()
+		{
+			super();
+			
+			borderClass = spark.skins.android4.assets.SpinnerListContainerBackground;
+			selectionIndicatorClass = spark.skins.android4.assets.SpinnerListContainerSelectionIndicator;
+			shadowClass = spark.skins.android4.assets.SpinnerListContainerShadow;
+			switch (applicationDPI)
+			{
+				case DPIClassification.DPI_640:
+				{
+					cornerRadius = 0;
+					borderThickness = 3;
+					selectionIndicatorHeight = 182;
+					break;
+				}
+				case DPIClassification.DPI_480:
+				{
+					cornerRadius = 0;
+					borderThickness = 2;
+					selectionIndicatorHeight = 144;
+					break;
+				}
+				case DPIClassification.DPI_320:
+				{					
+					cornerRadius = 0;
+					borderThickness = 2;
+					selectionIndicatorHeight = 96;
+					break;
+				}
+				case DPIClassification.DPI_240:
+				{
+					cornerRadius = 0;
+					borderThickness = 1;
+					selectionIndicatorHeight = 72;
+					break;
+				}
+				case DPIClassification.DPI_120:
+				{
+					cornerRadius = 0;
+					borderThickness = 0;
+					selectionIndicatorHeight = 37;
+					break;
+				}
+				default: // default DPI_160
+				{
+					cornerRadius = 0;
+					borderThickness = 1;
+					selectionIndicatorHeight = 48;
+					
+					break;
+				}
+			}
+			
+			minWidth = 30;
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Variables
+		//
+		//--------------------------------------------------------------------------
+		/**
+		 *  Pixel thickness of the border. 
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var borderThickness:Number;
+		
+		/**
+		 *  Radius of the border corners.
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var cornerRadius:Number;
+		
+		/**
+		 *  Height of the selection indicator.  
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var selectionIndicatorHeight:Number;
+		
+		/**
+		 *  Class for the border part. 
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var borderClass:Class;
+		
+		/**
+		 *  Class for the selection indicator skin part. 
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var selectionIndicatorClass:Class;
+		
+		/**
+		 *  Class for the shadow skin part.  
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var shadowClass:Class;
+		
+		/**
+		 *  Border skin part which includes the background. 
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var border:InteractiveObject;
+		
+		/**
+		 *  Selection indicator skin part. 
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var selectionIndicator:InteractiveObject;
+		
+		/**
+		 *  Shadow skin part. 
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var shadow:InteractiveObject;
+		
+		/**
+		 *  Mask for the content group. 
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var contentGroupMask:Sprite;
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Skin parts 
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  An optional skin part that defines the Group where the content 
+		 *  children are pushed into and laid out.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		public var contentGroup:Group;
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Properties 
+		//
+		//--------------------------------------------------------------------------
+		/** 
+		 *  @copy spark.skins.spark.ApplicationSkin#hostComponent
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		public var hostComponent:SpinnerListContainer;
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden Methods 
+		//
+		//--------------------------------------------------------------------------
+		/**
+		 *  @private
+		 */
+		override protected function createChildren():void
+		{
+			super.createChildren();
+			
+			if (!border)
+			{
+				// Border and background
+				border = new borderClass();
+				border.mouseEnabled = false;
+				addChild(border);
+			}
+			
+			if (!contentGroup)
+			{
+				// Contains the child elements
+				contentGroup = new Group();
+				var hLayout:HorizontalLayout = new HorizontalLayout();
+				hLayout.gap = 0;
+				hLayout.verticalAlign = "middle";
+				contentGroup.layout = hLayout;
+				contentGroup.id = "contentGroup";
+				addChild(contentGroup);
+			}
+			
+			if (!shadow)
+			{
+				// Shadowing sits on top of the content
+				shadow = new shadowClass();
+				shadow.mouseEnabled = false;
+				addChild(shadow);
+			}
+			
+
+			if (!contentGroupMask)
+			{
+				// Create a mask for the content
+				contentGroupMask = new Sprite();
+				addChild(contentGroupMask);
+			}
+		}   
+		
+		/**
+		 *  @private
+		 */
+		override protected function measure():void
+		{
+			super.measure();
+			
+			var contentW:Number = contentGroup.getPreferredBoundsWidth();
+			var contentH:Number = contentGroup.getPreferredBoundsHeight();
+			
+			measuredWidth = measuredMinWidth = contentW + borderThickness * 2;
+			measuredHeight = contentH + borderThickness * 2;
+
+		}
+		
+		/**
+		 *  @private
+		 */
+		override protected function layoutContents(unscaledWidth:Number, unscaledHeight:Number):void
+		{
+			super.layoutContents(unscaledWidth, unscaledHeight);
+	
+			setElementSize(contentGroup, unscaledWidth - borderThickness * 2, unscaledHeight - borderThickness * 2);
+			setElementPosition(contentGroup, borderThickness, borderThickness);
+			
+			// Inset by the borderThickness horizontally because the selectionIndicator starts at 0
+			setElementSize(border, unscaledWidth - borderThickness * 2, unscaledHeight);
+			setElementPosition(border, borderThickness, 0);			
+			
+			setElementSize(shadow, unscaledWidth - borderThickness * 4, unscaledHeight - borderThickness * 2);
+			setElementPosition(shadow, borderThickness * 2, borderThickness);
+		
+			// The SpinnerLists contain a left and right border. We don't want to show the leftmost 
+			// SpinnerLists's left border nor the rightmost one's right border. 
+			// We inset the mask on the left and right sides to accomplish this. 
+			var g:Graphics = contentGroupMask.graphics;
+			g.clear();
+			g.beginFill(0x00FF00);
+			g.drawRoundRect(borderThickness * 2, borderThickness, unscaledWidth - borderThickness * 4, unscaledHeight - borderThickness * 2, cornerRadius, cornerRadius);
+			g.endFill();
+			
+			contentGroup.mask = contentGroupMask;       
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/95c7ca68/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListScrollerSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListScrollerSkin.mxml b/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListScrollerSkin.mxml
new file mode 100644
index 0000000..270818e
--- /dev/null
+++ b/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListScrollerSkin.mxml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+
+
+<!--
+
+Scroller unconditionally sets its skin's layout to private layout
+implementation that handles the scroll policies.  Scroller skins can
+only provide replacement scrollbars.  The skin's layout and
+constraints or dimensions set on skin parts will not be honored.  To
+gain more control over the layout of a viewport and its scrollbars,
+instead of using Scroller, add them to a Group and use the ScrollBar component's
+viewport property to link them together.
+
+-->
+
+<!--- The default skin class for the Spark Scroller that is used by the SpinnerList component. 
+
+@see spark.components.SpinnerList
+@see spark.components.Scroller
+
+@langversion 3.0
+@playerversion AIR 3
+@productversion Flex 4.6
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
+	
+	<fx:Metadata>
+		<![CDATA[ 
+		/** 
+		* @copy spark.skins.spark.ApplicationSkin#hostComponent
+		* 
+		*  @langversion 3.0
+		*  @playerversion AIR 3
+		*  @productversion Flex 4.6
+		*/
+		[HostComponent("spark.components.Scroller")]
+		]]>
+	</fx:Metadata> 
+	
+	<fx:Script>
+		<![CDATA[    
+			/**
+			 *  @private
+			 */
+			override public function beginHighlightBitmapCapture() : Boolean
+			{
+				var needUpdate:Boolean = super.beginHighlightBitmapCapture();
+				
+				// Draw an opaque rect that fill our entire skin. Our background
+				// is transparent, but we don't want focus/error skins to
+				// poke through.  This is safe to do since we don't have any 
+				// graphic elements as direct children.
+				graphics.beginFill(0);
+				graphics.drawRect(0, 0, width, height);
+				graphics.endFill();
+				
+				return needUpdate;
+			}
+			
+			/**
+			 *  @private
+			 */
+			override public function endHighlightBitmapCapture() : Boolean
+			{
+				var needUpdate:Boolean = super.endHighlightBitmapCapture();
+				
+				// Clear the rect we drew in beginBitmapCapture();
+				graphics.clear();
+				
+				return needUpdate;
+			}
+		]]>
+	</fx:Script>
+	
+</s:SparkSkin>
+

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/95c7ca68/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListSkin.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListSkin.as b/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListSkin.as
new file mode 100644
index 0000000..69e4b75
--- /dev/null
+++ b/frameworks/projects/mobiletheme/src/spark/skins/android4/SpinnerListSkin.as
@@ -0,0 +1,267 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package spark.skins.android4
+{
+	import flash.display.InteractiveObject;
+	
+	import mx.core.ClassFactory;
+	import mx.core.DPIClassification;
+	import mx.core.mx_internal;	
+
+	import spark.components.DataGroup;
+	import spark.components.Scroller;
+	import spark.layouts.VerticalSpinnerLayout;
+	import spark.skins.mobile.supportClasses.MobileSkin;
+	
+	import spark.skins.android4.assets.SpinnerListContainerSelectionIndicator;
+	
+	import spark.components.SpinnerList;
+	import spark.components.SpinnerListItemRenderer;	
+
+	
+	use namespace mx_internal;
+	/**
+	 *  ActionScript-based skin for the SpinnerList in mobile applications. 
+	 * 
+	 *  @see spark.components.SpinnerList
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion AIR 3
+	 *  @productversion Flex 4.6
+	 */
+	public class SpinnerListSkin extends MobileSkin
+	{
+		/**
+		 *  Constructor.
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		public function SpinnerListSkin()
+		{
+			super();
+			
+			selectionIndicatorClass = spark.skins.android4.assets.SpinnerListContainerSelectionIndicator;
+			switch (applicationDPI)
+			{
+				case DPIClassification.DPI_640:
+				case DPIClassification.DPI_480:
+				case DPIClassification.DPI_320:
+				{
+					borderThickness = 2;
+					break;
+				}
+				default:
+				{
+					selectionIndicatorHeight = 48;
+					borderThickness = 1;
+				}   
+			}
+			
+			minWidth = 16;
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Skin parts 
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  Scroller skin part.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */ 
+		public var scroller:Scroller;
+		
+		/**
+		 *  DataGroup skin part.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */ 
+		public var dataGroup:DataGroup;
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Properties 
+		//
+		//--------------------------------------------------------------------------
+		/** 
+		 *  @copy spark.skins.spark.ApplicationSkin#hostComponent
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		public var hostComponent:SpinnerList;
+		
+		/**
+		 *  Pixel size of the border.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */ 
+		protected var borderThickness:int;
+		
+		/**
+		 *  Class for the selection indicator skin part. 
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var selectionIndicatorClass:Class;
+		
+		/**
+		 *  Selection indicator skin part. 
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var selectionIndicator:InteractiveObject;
+		
+		/**
+		 *  Height of the selection indicator.  
+		 *       
+		 *  @langversion 3.0
+		 *  @playerversion AIR 3
+		 *  @productversion Flex 4.6
+		 */
+		protected var selectionIndicatorHeight:Number;
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden Methods 
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  @private
+		 */
+		override protected function commitCurrentState():void
+		{
+			super.commitCurrentState();
+			
+			alpha = currentState.indexOf("disabled") == -1 ? 1 : 0.5;
+		}
+		
+		/**
+		 *  @private
+		 */
+		override protected function createChildren():void
+		{           
+			super.createChildren();
+			
+			if (!dataGroup)
+			{
+				// Create data group layout
+				var layout:VerticalSpinnerLayout = new VerticalSpinnerLayout();
+				layout.requestedRowCount = 5;
+				
+				// Create data group
+				dataGroup = new DataGroup();
+				dataGroup.id = "dataGroup";
+				dataGroup.layout = layout;
+
+				dataGroup.itemRenderer = new ClassFactory(spark.components.SpinnerListItemRenderer);
+			}
+
+			if (!scroller)
+			{
+				// Create scroller
+				scroller = new Scroller();
+				scroller.id = "scroller";
+				scroller.hasFocusableChildren = false;
+				scroller.ensureElementIsVisibleForSoftKeyboard = false;
+				
+				// Only support vertical scrolling
+				scroller.setStyle("verticalScrollPolicy","on");
+				scroller.setStyle("horizontalScrollPolicy", "off");
+				scroller.setStyle("skinClass", spark.skins.android4.SpinnerListScrollerSkin);
+				
+				addChild(scroller);
+			}
+			
+			if (!selectionIndicator)
+			{
+				// Selection indicator is on top
+				selectionIndicator = new selectionIndicatorClass();
+				selectionIndicator.mouseEnabled = false;
+				addChild(selectionIndicator);
+			}
+			
+			// Associate scroller with data group
+			if (!scroller.viewport)
+				scroller.viewport = dataGroup;
+		}
+		
+		/**
+		 *  @private
+		 */
+		override protected function measure():void
+		{
+			measuredWidth = scroller.getPreferredBoundsWidth() + borderThickness * 2;
+			measuredHeight = scroller.getPreferredBoundsHeight();
+			//add in for selection indicator
+			measuredMinHeight = selectionIndicatorHeight + borderThickness * 4;
+			minHeight = measuredMinHeight;			
+		}
+		
+		/**
+		 *  @private
+		 */
+		override protected function layoutContents(unscaledWidth:Number, unscaledHeight:Number):void
+		{   
+			super.layoutContents(unscaledWidth, unscaledHeight);			
+			
+			// Scroller
+			setElementSize(scroller, unscaledWidth - borderThickness * 2, unscaledHeight);
+			setElementPosition(scroller, borderThickness, 0);
+			//selection indicator
+			unscaledHeight = Math.max(unscaledHeight, selectionIndicatorHeight + borderThickness * 4);
+			
+			setElementSize(selectionIndicator, unscaledWidth, selectionIndicatorHeight);
+			setElementPosition(selectionIndicator, 0, Math.floor((unscaledHeight - selectionIndicatorHeight) / 2));
+		}
+		
+		/**
+		 *  @private
+		 */
+		override public function styleChanged(styleProp:String):void
+		{
+			// Reinitialize the typical element so it picks up the latest styles
+			// Font styles might impact the size of the SpinnerList
+			if (styleProp != "color" && styleProp != "accentColor")
+			{
+				if (dataGroup)
+					dataGroup.invalidateTypicalItemRenderer();
+			}
+			
+			super.styleChanged(styleProp);
+		}
+		
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/95c7ca68/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerBackground.fxg
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerBackground.fxg b/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerBackground.fxg
new file mode 100644
index 0000000..78d8c59
--- /dev/null
+++ b/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerBackground.fxg
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+
+-->
+<Graphic version="2.0" xmlns="http://ns.adobe.com/fxg/2008" viewHeight="100" viewWidth="100"
+	scaleGridLeft="7" scaleGridTop="7" scaleGridRight="93" scaleGridBottom="93">
+	   <!-- drop shadow-->
+    <Rect x="0" y="97" width="100" height="2">
+        <fill>
+            <SolidColor color="#FFFFFF" alpha=".35"/>
+        </fill>
+    </Rect>
+	    <Rect x="0" y="98" width="65" height="1">
+        <fill>
+            <SolidColor color="#FFFFFF" alpha=".2"/>
+        </fill>
+    </Rect>
+    <Rect x="0" y="99" width="65" height="1">
+        <fill>
+            <SolidColor color="#FFFFFF" alpha="0.1"/>
+        </fill>
+    </Rect>
+	<Rect width="100" height="100" radiusX="1" radiusY="1">
+		<fill>
+			<SolidColor color="#FFFFFF"/>
+		</fill>
+	</Rect>
+</Graphic>

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/95c7ca68/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerSelectionIndicator.fxg
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerSelectionIndicator.fxg b/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerSelectionIndicator.fxg
new file mode 100644
index 0000000..a8d8ae7
--- /dev/null
+++ b/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerSelectionIndicator.fxg
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+
+-->
+<Graphic version="2.0" xmlns="http://ns.adobe.com/fxg/2008" viewHeight="48" viewWidth="100"
+	scaleGridLeft="3" scaleGridTop="6" scaleGridRight="97" scaleGridBottom="41">
+	<!-- Transparent rect used to center the bar -->
+	<Rect x="0" y="0" width="100" height="4">
+		<fill>
+			<SolidColor color="#000000" alpha="0"/>
+		</fill>
+	</Rect>
+	<!-- Top highlight -->
+	<Rect x="5" y="5" width="70" height="1.5">
+    	<fill>
+        	<SolidColor color="#33afdd"/>
+        </fill>
+	</Rect>
+	<!-- Bottom highlight -->
+	<Rect x="5" y="42" width="70" height="1.5">
+    	<fill>
+        	<SolidColor color="#33afdd"/>
+        </fill>
+	</Rect>
+</Graphic>

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/95c7ca68/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerShadow.fxg
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerShadow.fxg b/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerShadow.fxg
new file mode 100644
index 0000000..2f43622
--- /dev/null
+++ b/frameworks/projects/mobiletheme/src/spark/skins/android4/assets/SpinnerListContainerShadow.fxg
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+
+-->
+<Graphic version="2.0" xmlns="http://ns.adobe.com/fxg/2008" viewHeight= "100" viewWidth= "100"
+	scaleGridLeft="5" scaleGridTop="5" scaleGridRight="95" scaleGridBottom="95">
+	<Rect width="100" height="100" radiusX="5" radiusY="5">
+		<fill>
+	      <LinearGradient rotation="90">
+	        <GradientEntry ratio="0" color="#FFFFFF" alpha="1.0"/>
+	        <GradientEntry ratio="0.10" color="#FFFFFF" alpha=".7"/>
+	        <GradientEntry ratio="0.30" color="#FFFFFF" alpha=".3"/>
+	        <GradientEntry ratio="0.40" color="#FFFFFF" alpha=".05"/>
+	        <GradientEntry ratio="0.60" color="#FFFFFF" alpha=".05"/>
+	        <GradientEntry ratio="0.70" color="#FFFFFF" alpha=".3"/>
+	        <GradientEntry ratio="0.90" color="#FFFFFF" alpha=".7"/>
+	        <GradientEntry ratio="1" color="#FFFFFF" alpha="1.0"/>
+	      </LinearGradient>
+	    </fill>
+	</Rect>
+</Graphic>
+