 
 package spark.skins.mobile
 {
-import flash.display.Graphics;
-import flash.display.Sprite;
-
+import flash.display.DisplayObject;
+import flash.events.Event;
+import flash.text.TextLineMetrics;
+
+import mx.core.ILayoutElement;
 import mx.core.UIComponent;
+import mx.core.UITextField;
+import mx.core.mx_internal;
+import mx.styles.ISimpleStyleClient;
 
 import spark.components.ActionBar;
 import spark.components.Group;
-import spark.components.Label;
+import spark.components.supportClasses.MobileTextField;
+import spark.core.IDisplayText;
 import spark.core.SpriteVisualElement;
 import spark.layouts.HorizontalAlign;
 import spark.layouts.HorizontalLayout;

        
        // Draw background
        graphics.clear();
        graphics.beginFill(getStyle("chromeColor"), getStyle("backgroundAlpha"));
        graphics.drawRect(0, 1, unscaledWidth, unscaledHeight);
        graphics.endFill();
    }
    
}
}
        hLayout.horizontalAlign = HorizontalAlign.RIGHT;
        hLayout.verticalAlign = VerticalAlign.JUSTIFY;
        hLayout.gap = 0;
        hLayout.paddingLeft = hLayout.paddingTop = hLayout.paddingRight = 
            hLayout.paddingBottom = 0;
        actionGroup.layout = hLayout;
        addChild(actionGroup);
        
        var titleDisplayComp:TitleDisplayComponent = new TitleDisplayComponent();
        titleDisplayComp.percentWidth = 100;
        titleDisplayComp.styleName = this;
        titleDisplay = titleDisplayComp;
        
        initializeStyles();
    }
    
    protected function initializeStyles():void
    {
        // ID selectors to style contents of each group separately
        navigationGroup.id = "navigationGroup";
        titleGroup.id = "titleGroup";
        actionGroup.id = "actionGroup";
    }
    
    override protected function measure():void
    {
        var titleComponent:ILayoutElement = (titleGroup.numElements > 0) ? titleGroup : null;
        var titleWidth:Number = 0;
        var titleHeight:Number = 0;
        
        if (!titleComponent && (titleDisplay is ILayoutElement))
            titleComponent = ILayoutElement(titleDisplay);
        
        if (titleComponent)
        {
            titleWidth = titleComponent.getPreferredBoundsWidth();
            titleHeight = titleComponent.getPreferredBoundsHeight();
        }
        
        measuredMinWidth = measuredWidth =
            navigationGroup.getPreferredBoundsWidth()
            + actionGroup.getPreferredBoundsWidth()
            + titleWidth;
        
        measuredMinHeight = measuredHeight =
            Math.max(80, navigationGroup.getPreferredBoundsHeight(), 
                actionGroup.getPreferredBoundsHeight(),
                titleHeight);
    }
    
    override protected function updateDisplayList(unscaledWidth:Number,
                                                  unscaledHeight:Number):void
    {
        // FXG contains a top border, bottom border, and 3 px drop shadow
        border.width = unscaledWidth;
        border.height = unscaledHeight + 5;
        
        var left:Number = 0;
        var right:Number = unscaledWidth;
        
        // position groups, overlap of navigation and action groups is allowed
        // when overlap occurs, titleDisplay/titleGroup is not visible
        // (width = 0)
        if (navigationGroup.numElements > 0
            && navigationGroup.includeInLayout)
        {
            left += navigationGroup.getPreferredBoundsWidth();
            navigationGroup.setLayoutBoundsSize(left, unscaledHeight);
            navigationGroup.setLayoutBoundsPosition(0, 1); // top border
        }
        
        if (actionGroup.numElements > 0 && actionGroup.includeInLayout)
        {
            var actionGroupWidth:Number =
                actionGroup.getPreferredBoundsWidth();
            right -= actionGroupWidth;
            actionGroup.setLayoutBoundsSize(actionGroupWidth, unscaledHeight);
            
            // actionGroup x position can be negative
            actionGroup.setLayoutBoundsPosition(right, 1); // top border
        }
        
        var titleGroupWidth:Number = right - left;
