flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OmPrakash Muppirala <bigosma...@gmail.com>
Subject Re: Status bar issue in retina display ipad
Date Thu, 09 Oct 2014 08:17:30 GMT
Add this method to your skin class

override public function styleChanged(styleProp: String): void
        {
            super.styleChanged(styleProp);
            var allStyles: Boolean = (styleProp == null || styleProp ==
"styleName");

            if (allStyles || styleProp == "osStatusBarHeight")
            {
                var osStatusBarHeight: Number =
Number(getStyle("osStatusBarHeight"));
                containerGrp.top = isNaN(osStatusBarHeight) ? 0 :
osStatusBarHeight;
            }
        }

This was the method add to ApplicationSkin [1] to fix the status bar issue.

Thanks,
Om

[1]
https://github.com/apache/flex-sdk/blob/develop/frameworks/projects/spark/src/spark/skins/spark/ApplicationSkin.mxml
On Oct 8, 2014 11:14 PM, "Deepak MS" <megharajdeepak@gmail.com> wrote:

> Hi there,
> With iOS 7, there was status bar issue:
> https://issues.apache.org/jira/browse/FLEX-33860
>
> It works fine. But when I add a application skinClass, it is failing.
>
> I'm trying to add a simple background image using skinClass at application
> level:
>
> <?xml version="1.0" encoding="utf-8"?>
> <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
>         xmlns:s="library://ns.adobe.com/flex/spark">
>     <!-- host component -->
>     <fx:Metadata>
>         [HostComponent("spark.components.Application")]
>         [Style(name="bgSource", inherit="no", type="String")]
>         [Style(name="bgColor", inherit="no", type="uint")]
>     </fx:Metadata>
>
>     <!-- states -->
>     <s:states>
>         <s:State name="normal" />
>         <s:State name="disabled" />
>     </s:states>
>
>     <!-- SkinParts
>     name=iconDisplay, type=spark.primitives.BitmapImage, required=false
>     name=labelDisplay, type=spark.core.IDisplayText, required=false
> @Embed('com/imshealth/assets/images/bg.png')
>     -->
>
>
>     <s:Rect width="100%" height="100%">
>         <s:fill>
>             <s:SolidColor color="{getStyle('bgColor')}"/>
>         </s:fill>
>     </s:Rect>
>     <s:BitmapImage id="img"
>                    source="{getStyle('bgSource')}"
>                    smooth="true"
>                    scaleMode="letterbox"
>                    smoothingQuality="high"
>                    left="0" right="0"
>                    bottom="0" />
>
>     <s:Group id="contentGroup" left="0" right="0" top="0" bottom="0"
> minWidth="0" minHeight="0" />
> </s:Skin>
>
>
> I tried changing top and padding. But it isn't working.
>
> So my question is, when we use a skinClass, what change do we need to do in
> order to get rid of status bar issue?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message