You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Deepak MS <me...@gmail.com> on 2015/03/03 14:28:13 UTC

Re: runtimeDPIProvider in mx:Application?

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core/RuntimeDPIProvider.html
I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm afraid
it isn't working as expected. I tried to create a runtime class and DPI
value was overridden. But still there is no change. All screen elements
look very small than normal.

Has anybody come across this case on laptops(high DPI\retina display\HD)?

On iPad retina display, it works out of the box without any
runtimedpiprovider class when I use flex 4.13 but not on this laptop. When
I checked Capabilites.screenDPI, I get the value as 72. Looks like value
returned isn't correct nor is it getting overridden.

Any ideas?

PS: I'm testing this on Dell latitude E7440.

Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Just happened to download FP 18 and looks like this issue has been handled
in that.

On Sun, Mar 8, 2015 at 9:38 PM, Deepak MS <me...@gmail.com> wrote:

> https://bugbase.adobe.com/index.cfm?event=bug&id=3949775
>
>
>
> On Sat, Mar 7, 2015 at 10:48 AM, Deepak MS <me...@gmail.com>
> wrote:
>
>> Thanks Alex. Yes, Ill file it. And hope something shall be done about it.
>> Just like retina display ipads, am sure many users would lean towards
>> retina display laptops too.
>>
>> Cheers!
>> On 5 Mar 2015 12:04, "Alex Harui" <ah...@adobe.com> wrote:
>>
>>> I’m not sure that 1980 counts as a Retina-class display.  IIRC, the
>>> player
>>> has reported 72dpi for desktop screens forever.  I think you can also get
>>> it to report 120dpi in some cases, but I don’t think they’ve tried to
>>> introduce useful screenDensity except on mobile devices.  You can try
>>> filing a bug at bugbase.adobe.com and see what they have to say.  They
>>> could have changed something else recently that I’m unaware of.
>>>
>>> -Alex
>>>
>>>
>>> On 3/3/15, 11:55 PM, "Deepak MS" <me...@gmail.com> wrote:
>>>
>>> >Yes.
>>> >It's just a recommended screen resolution which user can change under
>>> >system's display(shown in image in the link below):
>>> >http://pbrd.co/1M66RiC
>>> >
>>> >If I change the resolution to 1280 x 1024, then
>>> >Capabilities.screenResolutionX and Y give me 1280 and 1024, which are
>>> >correct values. Only problem is the DPI value.
>>> >
>>> >
>>> >On Wed, Mar 4, 2015 at 12:54 PM, Alex Harui <ah...@adobe.com> wrote:
>>> >
>>> >> Is the laptop screen actually 1920 x 1080?
>>> >>
>>> >> On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:
>>> >>
>>> >> >Hi Alex,
>>> >> >No luck ;(
>>> >> >
>>> >> >I updated to Flex4.14 FP 16 AIR 16.
>>> >> >
>>> >> >Sample code that I have been trying:
>>> >> >
>>> >> ><?xml version="1.0" encoding="utf-8"?>
>>> >> ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>>> >> >               xmlns:s="library://ns.adobe.com/flex/spark"
>>> >> >               xmlns:mx="library://ns.adobe.com/flex/mx"
>>> minWidth="955"
>>> >> >minHeight="600"
>>> >> >               runtimeDPIProvider="AppRuntimeDPI"
>>> >> >
>>> >> >creationComplete="application1_creationCompleteHandler(event)">
>>> >> >    <s:layout>
>>> >> >        <s:VerticalLayout/>
>>> >> >    </s:layout>
>>> >> >    <fx:Script>
>>> >> >        <![CDATA[
>>> >> >            import mx.events.FlexEvent;
>>> >> >
>>> >> >            protected function
>>> >> >application1_creationCompleteHandler(event:FlexEvent):void
>>> >> >            {
>>> >> >                ta.text = '';
>>> >> >                ta.text += "Capabilities.screenDPI : "+
>>> >> >Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
>>> >> >laptop
>>> >> >                ta.text += "\nCapabilities.screenResolutionX : "+
>>> >> >Capabilities.screenResolutionX.toString();//1600 in normal laptop and
>>> >>1920
>>> >> >in HD laptop
>>> >> >                ta.text += "\nCapabilities.screenResolutionY : "+
>>> >> >Capabilities.screenResolutionY.toString();//900 in normal laptop and
>>> >>1080
>>> >> >in HD laptop
>>> >> >
>>> >> >            }
>>> >> >
>>> >> >        ]]>
>>> >> >    </fx:Script>
>>> >> >    <s:Button label="Hello"/>
>>> >> >    <s:TextInput/>
>>> >> >    <s:DropDownList/>
>>> >> >    <s:Label text="Hello Label"/>
>>> >> >    <s:NumericStepper />
>>> >> >    <s:TextArea id="ta" width="100%"/>
>>> >> ></s:Application>
>>> >> >
>>> >> >AppRuntimeDPI.as :
>>> >> >
>>> >> >package
>>> >> >{
>>> >> >    import mx.core.DPIClassification;
>>> >> >    import mx.core.RuntimeDPIProvider;
>>> >> >
>>> >> >    public class AppRuntimeDPI extends RuntimeDPIProvider
>>> >> >    {
>>> >> >        public function AppRuntimeDPI()
>>> >> >        {
>>> >> >            //super();
>>> >> >        }
>>> >> >
>>> >> >        override public function get runtimeDPI():Number
>>> >> >        {
>>> >> >// cannot check for this condition too as screenDPI for any
>>> >>laptop(normal
>>> >> >or HD) is returned as 72 always. Moreover, any DPI value that I
>>> assign
>>> >> >here, doesn't have any effect on the screen element sizes. It's
>>> always
>>> >> >same
>>> >> >for all values.
>>> >> >
>>> >> >            // A tablet reporting an incorrect DPI of 240.
>>> >> >            /*if (Capabilities.screenDPI == 240 &&
>>> >> >            Capabilities.screenResolutionX == 600 &&
>>> >> >            Capabilities.screenResolutionY == 1024)
>>> >> >            {
>>> >> >            return DPIClassification.DPI_160;
>>> >> >            }
>>> >> >
>>> >> >            return super.runtimeDPI;*/
>>> >> >            return DPIClassification.DPI_240;
>>> >> >        }
>>> >> >    }
>>> >> >}
>>> >> >
>>> >> >
>>> >> >On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <megharajdeepak@gmail.com
>>> >
>>> >> >wrote:
>>> >> >
>>> >> >> Hmmm okay. I'll give it a try and let you know. Just hope it works.
>>> >> >> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
>>> >> >>
>>> >> >>> Try the latest AIR SDK?
>>> >> >>>
>>> >> >>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>>> >> >>>
>>> >> >>> >
>>> >> >>>
>>> >> >>>
>>> >>
>>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
>>> >> >>>re
>>> >> >>> >/RuntimeDPIProvider.html
>>> >> >>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and
>>> I'm
>>> >> >>>afraid
>>> >> >>> >it isn't working as expected. I tried to create a runtime class
>>> and
>>> >> >>>DPI
>>> >> >>> >value was overridden. But still there is no change. All screen
>>> >> >>>elements
>>> >> >>> >look very small than normal.
>>> >> >>> >
>>> >> >>> >Has anybody come across this case on laptops(high DPI\retina
>>> >> >>>display\HD)?
>>> >> >>> >
>>> >> >>> >On iPad retina display, it works out of the box without any
>>> >> >>> >runtimedpiprovider class when I use flex 4.13 but not on this
>>> >>laptop.
>>> >> >>> When
>>> >> >>> >I checked Capabilites.screenDPI, I get the value as 72. Looks
>>> like
>>> >> >>>value
>>> >> >>> >returned isn't correct nor is it getting overridden.
>>> >> >>> >
>>> >> >>> >Any ideas?
>>> >> >>> >
>>> >> >>> >PS: I'm testing this on Dell latitude E7440.
>>> >> >>>
>>> >> >>>
>>> >>
>>> >>
>>>
>>>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
https://bugbase.adobe.com/index.cfm?event=bug&id=3949775



On Sat, Mar 7, 2015 at 10:48 AM, Deepak MS <me...@gmail.com> wrote:

> Thanks Alex. Yes, Ill file it. And hope something shall be done about it.
> Just like retina display ipads, am sure many users would lean towards
> retina display laptops too.
>
> Cheers!
> On 5 Mar 2015 12:04, "Alex Harui" <ah...@adobe.com> wrote:
>
>> I’m not sure that 1980 counts as a Retina-class display.  IIRC, the player
>> has reported 72dpi for desktop screens forever.  I think you can also get
>> it to report 120dpi in some cases, but I don’t think they’ve tried to
>> introduce useful screenDensity except on mobile devices.  You can try
>> filing a bug at bugbase.adobe.com and see what they have to say.  They
>> could have changed something else recently that I’m unaware of.
>>
>> -Alex
>>
>>
>> On 3/3/15, 11:55 PM, "Deepak MS" <me...@gmail.com> wrote:
>>
>> >Yes.
>> >It's just a recommended screen resolution which user can change under
>> >system's display(shown in image in the link below):
>> >http://pbrd.co/1M66RiC
>> >
>> >If I change the resolution to 1280 x 1024, then
>> >Capabilities.screenResolutionX and Y give me 1280 and 1024, which are
>> >correct values. Only problem is the DPI value.
>> >
>> >
>> >On Wed, Mar 4, 2015 at 12:54 PM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >> Is the laptop screen actually 1920 x 1080?
>> >>
>> >> On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:
>> >>
>> >> >Hi Alex,
>> >> >No luck ;(
>> >> >
>> >> >I updated to Flex4.14 FP 16 AIR 16.
>> >> >
>> >> >Sample code that I have been trying:
>> >> >
>> >> ><?xml version="1.0" encoding="utf-8"?>
>> >> ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>> >> >               xmlns:s="library://ns.adobe.com/flex/spark"
>> >> >               xmlns:mx="library://ns.adobe.com/flex/mx"
>> minWidth="955"
>> >> >minHeight="600"
>> >> >               runtimeDPIProvider="AppRuntimeDPI"
>> >> >
>> >> >creationComplete="application1_creationCompleteHandler(event)">
>> >> >    <s:layout>
>> >> >        <s:VerticalLayout/>
>> >> >    </s:layout>
>> >> >    <fx:Script>
>> >> >        <![CDATA[
>> >> >            import mx.events.FlexEvent;
>> >> >
>> >> >            protected function
>> >> >application1_creationCompleteHandler(event:FlexEvent):void
>> >> >            {
>> >> >                ta.text = '';
>> >> >                ta.text += "Capabilities.screenDPI : "+
>> >> >Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
>> >> >laptop
>> >> >                ta.text += "\nCapabilities.screenResolutionX : "+
>> >> >Capabilities.screenResolutionX.toString();//1600 in normal laptop and
>> >>1920
>> >> >in HD laptop
>> >> >                ta.text += "\nCapabilities.screenResolutionY : "+
>> >> >Capabilities.screenResolutionY.toString();//900 in normal laptop and
>> >>1080
>> >> >in HD laptop
>> >> >
>> >> >            }
>> >> >
>> >> >        ]]>
>> >> >    </fx:Script>
>> >> >    <s:Button label="Hello"/>
>> >> >    <s:TextInput/>
>> >> >    <s:DropDownList/>
>> >> >    <s:Label text="Hello Label"/>
>> >> >    <s:NumericStepper />
>> >> >    <s:TextArea id="ta" width="100%"/>
>> >> ></s:Application>
>> >> >
>> >> >AppRuntimeDPI.as :
>> >> >
>> >> >package
>> >> >{
>> >> >    import mx.core.DPIClassification;
>> >> >    import mx.core.RuntimeDPIProvider;
>> >> >
>> >> >    public class AppRuntimeDPI extends RuntimeDPIProvider
>> >> >    {
>> >> >        public function AppRuntimeDPI()
>> >> >        {
>> >> >            //super();
>> >> >        }
>> >> >
>> >> >        override public function get runtimeDPI():Number
>> >> >        {
>> >> >// cannot check for this condition too as screenDPI for any
>> >>laptop(normal
>> >> >or HD) is returned as 72 always. Moreover, any DPI value that I assign
>> >> >here, doesn't have any effect on the screen element sizes. It's always
>> >> >same
>> >> >for all values.
>> >> >
>> >> >            // A tablet reporting an incorrect DPI of 240.
>> >> >            /*if (Capabilities.screenDPI == 240 &&
>> >> >            Capabilities.screenResolutionX == 600 &&
>> >> >            Capabilities.screenResolutionY == 1024)
>> >> >            {
>> >> >            return DPIClassification.DPI_160;
>> >> >            }
>> >> >
>> >> >            return super.runtimeDPI;*/
>> >> >            return DPIClassification.DPI_240;
>> >> >        }
>> >> >    }
>> >> >}
>> >> >
>> >> >
>> >> >On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com>
>> >> >wrote:
>> >> >
>> >> >> Hmmm okay. I'll give it a try and let you know. Just hope it works.
>> >> >> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
>> >> >>
>> >> >>> Try the latest AIR SDK?
>> >> >>>
>> >> >>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>> >> >>>
>> >> >>> >
>> >> >>>
>> >> >>>
>> >>
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
>> >> >>>re
>> >> >>> >/RuntimeDPIProvider.html
>> >> >>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm
>> >> >>>afraid
>> >> >>> >it isn't working as expected. I tried to create a runtime class
>> and
>> >> >>>DPI
>> >> >>> >value was overridden. But still there is no change. All screen
>> >> >>>elements
>> >> >>> >look very small than normal.
>> >> >>> >
>> >> >>> >Has anybody come across this case on laptops(high DPI\retina
>> >> >>>display\HD)?
>> >> >>> >
>> >> >>> >On iPad retina display, it works out of the box without any
>> >> >>> >runtimedpiprovider class when I use flex 4.13 but not on this
>> >>laptop.
>> >> >>> When
>> >> >>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like
>> >> >>>value
>> >> >>> >returned isn't correct nor is it getting overridden.
>> >> >>> >
>> >> >>> >Any ideas?
>> >> >>> >
>> >> >>> >PS: I'm testing this on Dell latitude E7440.
>> >> >>>
>> >> >>>
>> >>
>> >>
>>
>>

Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Thanks Alex. Yes, Ill file it. And hope something shall be done about it.
Just like retina display ipads, am sure many users would lean towards
retina display laptops too.

Cheers!
On 5 Mar 2015 12:04, "Alex Harui" <ah...@adobe.com> wrote:

> I’m not sure that 1980 counts as a Retina-class display.  IIRC, the player
> has reported 72dpi for desktop screens forever.  I think you can also get
> it to report 120dpi in some cases, but I don’t think they’ve tried to
> introduce useful screenDensity except on mobile devices.  You can try
> filing a bug at bugbase.adobe.com and see what they have to say.  They
> could have changed something else recently that I’m unaware of.
>
> -Alex
>
>
> On 3/3/15, 11:55 PM, "Deepak MS" <me...@gmail.com> wrote:
>
> >Yes.
> >It's just a recommended screen resolution which user can change under
> >system's display(shown in image in the link below):
> >http://pbrd.co/1M66RiC
> >
> >If I change the resolution to 1280 x 1024, then
> >Capabilities.screenResolutionX and Y give me 1280 and 1024, which are
> >correct values. Only problem is the DPI value.
> >
> >
> >On Wed, Mar 4, 2015 at 12:54 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Is the laptop screen actually 1920 x 1080?
> >>
> >> On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:
> >>
> >> >Hi Alex,
> >> >No luck ;(
> >> >
> >> >I updated to Flex4.14 FP 16 AIR 16.
> >> >
> >> >Sample code that I have been trying:
> >> >
> >> ><?xml version="1.0" encoding="utf-8"?>
> >> ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> >> >               xmlns:s="library://ns.adobe.com/flex/spark"
> >> >               xmlns:mx="library://ns.adobe.com/flex/mx"
> minWidth="955"
> >> >minHeight="600"
> >> >               runtimeDPIProvider="AppRuntimeDPI"
> >> >
> >> >creationComplete="application1_creationCompleteHandler(event)">
> >> >    <s:layout>
> >> >        <s:VerticalLayout/>
> >> >    </s:layout>
> >> >    <fx:Script>
> >> >        <![CDATA[
> >> >            import mx.events.FlexEvent;
> >> >
> >> >            protected function
> >> >application1_creationCompleteHandler(event:FlexEvent):void
> >> >            {
> >> >                ta.text = '';
> >> >                ta.text += "Capabilities.screenDPI : "+
> >> >Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
> >> >laptop
> >> >                ta.text += "\nCapabilities.screenResolutionX : "+
> >> >Capabilities.screenResolutionX.toString();//1600 in normal laptop and
> >>1920
> >> >in HD laptop
> >> >                ta.text += "\nCapabilities.screenResolutionY : "+
> >> >Capabilities.screenResolutionY.toString();//900 in normal laptop and
> >>1080
> >> >in HD laptop
> >> >
> >> >            }
> >> >
> >> >        ]]>
> >> >    </fx:Script>
> >> >    <s:Button label="Hello"/>
> >> >    <s:TextInput/>
> >> >    <s:DropDownList/>
> >> >    <s:Label text="Hello Label"/>
> >> >    <s:NumericStepper />
> >> >    <s:TextArea id="ta" width="100%"/>
> >> ></s:Application>
> >> >
> >> >AppRuntimeDPI.as :
> >> >
> >> >package
> >> >{
> >> >    import mx.core.DPIClassification;
> >> >    import mx.core.RuntimeDPIProvider;
> >> >
> >> >    public class AppRuntimeDPI extends RuntimeDPIProvider
> >> >    {
> >> >        public function AppRuntimeDPI()
> >> >        {
> >> >            //super();
> >> >        }
> >> >
> >> >        override public function get runtimeDPI():Number
> >> >        {
> >> >// cannot check for this condition too as screenDPI for any
> >>laptop(normal
> >> >or HD) is returned as 72 always. Moreover, any DPI value that I assign
> >> >here, doesn't have any effect on the screen element sizes. It's always
> >> >same
> >> >for all values.
> >> >
> >> >            // A tablet reporting an incorrect DPI of 240.
> >> >            /*if (Capabilities.screenDPI == 240 &&
> >> >            Capabilities.screenResolutionX == 600 &&
> >> >            Capabilities.screenResolutionY == 1024)
> >> >            {
> >> >            return DPIClassification.DPI_160;
> >> >            }
> >> >
> >> >            return super.runtimeDPI;*/
> >> >            return DPIClassification.DPI_240;
> >> >        }
> >> >    }
> >> >}
> >> >
> >> >
> >> >On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com>
> >> >wrote:
> >> >
> >> >> Hmmm okay. I'll give it a try and let you know. Just hope it works.
> >> >> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
> >> >>
> >> >>> Try the latest AIR SDK?
> >> >>>
> >> >>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
> >> >>>
> >> >>> >
> >> >>>
> >> >>>
> >>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
> >> >>>re
> >> >>> >/RuntimeDPIProvider.html
> >> >>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm
> >> >>>afraid
> >> >>> >it isn't working as expected. I tried to create a runtime class and
> >> >>>DPI
> >> >>> >value was overridden. But still there is no change. All screen
> >> >>>elements
> >> >>> >look very small than normal.
> >> >>> >
> >> >>> >Has anybody come across this case on laptops(high DPI\retina
> >> >>>display\HD)?
> >> >>> >
> >> >>> >On iPad retina display, it works out of the box without any
> >> >>> >runtimedpiprovider class when I use flex 4.13 but not on this
> >>laptop.
> >> >>> When
> >> >>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like
> >> >>>value
> >> >>> >returned isn't correct nor is it getting overridden.
> >> >>> >
> >> >>> >Any ideas?
> >> >>> >
> >> >>> >PS: I'm testing this on Dell latitude E7440.
> >> >>>
> >> >>>
> >>
> >>
>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Alex Harui <ah...@adobe.com>.
I’m not sure that 1980 counts as a Retina-class display.  IIRC, the player
has reported 72dpi for desktop screens forever.  I think you can also get
it to report 120dpi in some cases, but I don’t think they’ve tried to
introduce useful screenDensity except on mobile devices.  You can try
filing a bug at bugbase.adobe.com and see what they have to say.  They
could have changed something else recently that I’m unaware of.

-Alex


On 3/3/15, 11:55 PM, "Deepak MS" <me...@gmail.com> wrote:

>Yes.
>It's just a recommended screen resolution which user can change under
>system's display(shown in image in the link below):
>http://pbrd.co/1M66RiC
>
>If I change the resolution to 1280 x 1024, then
>Capabilities.screenResolutionX and Y give me 1280 and 1024, which are
>correct values. Only problem is the DPI value.
>
>
>On Wed, Mar 4, 2015 at 12:54 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Is the laptop screen actually 1920 x 1080?
>>
>> On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:
>>
>> >Hi Alex,
>> >No luck ;(
>> >
>> >I updated to Flex4.14 FP 16 AIR 16.
>> >
>> >Sample code that I have been trying:
>> >
>> ><?xml version="1.0" encoding="utf-8"?>
>> ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>> >               xmlns:s="library://ns.adobe.com/flex/spark"
>> >               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
>> >minHeight="600"
>> >               runtimeDPIProvider="AppRuntimeDPI"
>> >
>> >creationComplete="application1_creationCompleteHandler(event)">
>> >    <s:layout>
>> >        <s:VerticalLayout/>
>> >    </s:layout>
>> >    <fx:Script>
>> >        <![CDATA[
>> >            import mx.events.FlexEvent;
>> >
>> >            protected function
>> >application1_creationCompleteHandler(event:FlexEvent):void
>> >            {
>> >                ta.text = '';
>> >                ta.text += "Capabilities.screenDPI : "+
>> >Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
>> >laptop
>> >                ta.text += "\nCapabilities.screenResolutionX : "+
>> >Capabilities.screenResolutionX.toString();//1600 in normal laptop and
>>1920
>> >in HD laptop
>> >                ta.text += "\nCapabilities.screenResolutionY : "+
>> >Capabilities.screenResolutionY.toString();//900 in normal laptop and
>>1080
>> >in HD laptop
>> >
>> >            }
>> >
>> >        ]]>
>> >    </fx:Script>
>> >    <s:Button label="Hello"/>
>> >    <s:TextInput/>
>> >    <s:DropDownList/>
>> >    <s:Label text="Hello Label"/>
>> >    <s:NumericStepper />
>> >    <s:TextArea id="ta" width="100%"/>
>> ></s:Application>
>> >
>> >AppRuntimeDPI.as :
>> >
>> >package
>> >{
>> >    import mx.core.DPIClassification;
>> >    import mx.core.RuntimeDPIProvider;
>> >
>> >    public class AppRuntimeDPI extends RuntimeDPIProvider
>> >    {
>> >        public function AppRuntimeDPI()
>> >        {
>> >            //super();
>> >        }
>> >
>> >        override public function get runtimeDPI():Number
>> >        {
>> >// cannot check for this condition too as screenDPI for any
>>laptop(normal
>> >or HD) is returned as 72 always. Moreover, any DPI value that I assign
>> >here, doesn't have any effect on the screen element sizes. It's always
>> >same
>> >for all values.
>> >
>> >            // A tablet reporting an incorrect DPI of 240.
>> >            /*if (Capabilities.screenDPI == 240 &&
>> >            Capabilities.screenResolutionX == 600 &&
>> >            Capabilities.screenResolutionY == 1024)
>> >            {
>> >            return DPIClassification.DPI_160;
>> >            }
>> >
>> >            return super.runtimeDPI;*/
>> >            return DPIClassification.DPI_240;
>> >        }
>> >    }
>> >}
>> >
>> >
>> >On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com>
>> >wrote:
>> >
>> >> Hmmm okay. I'll give it a try and let you know. Just hope it works.
>> >> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
>> >>
>> >>> Try the latest AIR SDK?
>> >>>
>> >>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>> >>>
>> >>> >
>> >>>
>> >>>
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
>> >>>re
>> >>> >/RuntimeDPIProvider.html
>> >>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm
>> >>>afraid
>> >>> >it isn't working as expected. I tried to create a runtime class and
>> >>>DPI
>> >>> >value was overridden. But still there is no change. All screen
>> >>>elements
>> >>> >look very small than normal.
>> >>> >
>> >>> >Has anybody come across this case on laptops(high DPI\retina
>> >>>display\HD)?
>> >>> >
>> >>> >On iPad retina display, it works out of the box without any
>> >>> >runtimedpiprovider class when I use flex 4.13 but not on this
>>laptop.
>> >>> When
>> >>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like
>> >>>value
>> >>> >returned isn't correct nor is it getting overridden.
>> >>> >
>> >>> >Any ideas?
>> >>> >
>> >>> >PS: I'm testing this on Dell latitude E7440.
>> >>>
>> >>>
>>
>>


Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Yes.
It's just a recommended screen resolution which user can change under
system's display(shown in image in the link below):
http://pbrd.co/1M66RiC

If I change the resolution to 1280 x 1024, then
Capabilities.screenResolutionX and Y give me 1280 and 1024, which are
correct values. Only problem is the DPI value.


On Wed, Mar 4, 2015 at 12:54 PM, Alex Harui <ah...@adobe.com> wrote:

> Is the laptop screen actually 1920 x 1080?
>
> On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:
>
> >Hi Alex,
> >No luck ;(
> >
> >I updated to Flex4.14 FP 16 AIR 16.
> >
> >Sample code that I have been trying:
> >
> ><?xml version="1.0" encoding="utf-8"?>
> ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> >               xmlns:s="library://ns.adobe.com/flex/spark"
> >               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
> >minHeight="600"
> >               runtimeDPIProvider="AppRuntimeDPI"
> >
> >creationComplete="application1_creationCompleteHandler(event)">
> >    <s:layout>
> >        <s:VerticalLayout/>
> >    </s:layout>
> >    <fx:Script>
> >        <![CDATA[
> >            import mx.events.FlexEvent;
> >
> >            protected function
> >application1_creationCompleteHandler(event:FlexEvent):void
> >            {
> >                ta.text = '';
> >                ta.text += "Capabilities.screenDPI : "+
> >Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
> >laptop
> >                ta.text += "\nCapabilities.screenResolutionX : "+
> >Capabilities.screenResolutionX.toString();//1600 in normal laptop and 1920
> >in HD laptop
> >                ta.text += "\nCapabilities.screenResolutionY : "+
> >Capabilities.screenResolutionY.toString();//900 in normal laptop and 1080
> >in HD laptop
> >
> >            }
> >
> >        ]]>
> >    </fx:Script>
> >    <s:Button label="Hello"/>
> >    <s:TextInput/>
> >    <s:DropDownList/>
> >    <s:Label text="Hello Label"/>
> >    <s:NumericStepper />
> >    <s:TextArea id="ta" width="100%"/>
> ></s:Application>
> >
> >AppRuntimeDPI.as :
> >
> >package
> >{
> >    import mx.core.DPIClassification;
> >    import mx.core.RuntimeDPIProvider;
> >
> >    public class AppRuntimeDPI extends RuntimeDPIProvider
> >    {
> >        public function AppRuntimeDPI()
> >        {
> >            //super();
> >        }
> >
> >        override public function get runtimeDPI():Number
> >        {
> >// cannot check for this condition too as screenDPI for any laptop(normal
> >or HD) is returned as 72 always. Moreover, any DPI value that I assign
> >here, doesn't have any effect on the screen element sizes. It's always
> >same
> >for all values.
> >
> >            // A tablet reporting an incorrect DPI of 240.
> >            /*if (Capabilities.screenDPI == 240 &&
> >            Capabilities.screenResolutionX == 600 &&
> >            Capabilities.screenResolutionY == 1024)
> >            {
> >            return DPIClassification.DPI_160;
> >            }
> >
> >            return super.runtimeDPI;*/
> >            return DPIClassification.DPI_240;
> >        }
> >    }
> >}
> >
> >
> >On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com>
> >wrote:
> >
> >> Hmmm okay. I'll give it a try and let you know. Just hope it works.
> >> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
> >>
> >>> Try the latest AIR SDK?
> >>>
> >>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
> >>>
> >>> >
> >>>
> >>>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
> >>>re
> >>> >/RuntimeDPIProvider.html
> >>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm
> >>>afraid
> >>> >it isn't working as expected. I tried to create a runtime class and
> >>>DPI
> >>> >value was overridden. But still there is no change. All screen
> >>>elements
> >>> >look very small than normal.
> >>> >
> >>> >Has anybody come across this case on laptops(high DPI\retina
> >>>display\HD)?
> >>> >
> >>> >On iPad retina display, it works out of the box without any
> >>> >runtimedpiprovider class when I use flex 4.13 but not on this laptop.
> >>> When
> >>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like
> >>>value
> >>> >returned isn't correct nor is it getting overridden.
> >>> >
> >>> >Any ideas?
> >>> >
> >>> >PS: I'm testing this on Dell latitude E7440.
> >>>
> >>>
>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Alex Harui <ah...@adobe.com>.
Is the laptop screen actually 1920 x 1080?

On 3/3/15, 10:51 PM, "Deepak MS" <me...@gmail.com> wrote:

>Hi Alex,
>No luck ;(
>
>I updated to Flex4.14 FP 16 AIR 16.
>
>Sample code that I have been trying:
>
><?xml version="1.0" encoding="utf-8"?>
><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>               xmlns:s="library://ns.adobe.com/flex/spark"
>               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
>minHeight="600"
>               runtimeDPIProvider="AppRuntimeDPI"
>
>creationComplete="application1_creationCompleteHandler(event)">
>    <s:layout>
>        <s:VerticalLayout/>
>    </s:layout>
>    <fx:Script>
>        <![CDATA[
>            import mx.events.FlexEvent;
>
>            protected function
>application1_creationCompleteHandler(event:FlexEvent):void
>            {
>                ta.text = '';
>                ta.text += "Capabilities.screenDPI : "+
>Capabilities.screenDPI.toString(); //72 in both normal laptop and HD
>laptop
>                ta.text += "\nCapabilities.screenResolutionX : "+
>Capabilities.screenResolutionX.toString();//1600 in normal laptop and 1920
>in HD laptop
>                ta.text += "\nCapabilities.screenResolutionY : "+
>Capabilities.screenResolutionY.toString();//900 in normal laptop and 1080
>in HD laptop
>
>            }
>
>        ]]>
>    </fx:Script>
>    <s:Button label="Hello"/>
>    <s:TextInput/>
>    <s:DropDownList/>
>    <s:Label text="Hello Label"/>
>    <s:NumericStepper />
>    <s:TextArea id="ta" width="100%"/>
></s:Application>
>
>AppRuntimeDPI.as :
>
>package
>{
>    import mx.core.DPIClassification;
>    import mx.core.RuntimeDPIProvider;
>
>    public class AppRuntimeDPI extends RuntimeDPIProvider
>    {
>        public function AppRuntimeDPI()
>        {
>            //super();
>        }
>
>        override public function get runtimeDPI():Number
>        {
>// cannot check for this condition too as screenDPI for any laptop(normal
>or HD) is returned as 72 always. Moreover, any DPI value that I assign
>here, doesn't have any effect on the screen element sizes. It's always
>same
>for all values.
>
>            // A tablet reporting an incorrect DPI of 240.
>            /*if (Capabilities.screenDPI == 240 &&
>            Capabilities.screenResolutionX == 600 &&
>            Capabilities.screenResolutionY == 1024)
>            {
>            return DPIClassification.DPI_160;
>            }
>
>            return super.runtimeDPI;*/
>            return DPIClassification.DPI_240;
>        }
>    }
>}
>
>
>On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com>
>wrote:
>
>> Hmmm okay. I'll give it a try and let you know. Just hope it works.
>> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
>>
>>> Try the latest AIR SDK?
>>>
>>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>>>
>>> >
>>> 
>>>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/co
>>>re
>>> >/RuntimeDPIProvider.html
>>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm
>>>afraid
>>> >it isn't working as expected. I tried to create a runtime class and
>>>DPI
>>> >value was overridden. But still there is no change. All screen
>>>elements
>>> >look very small than normal.
>>> >
>>> >Has anybody come across this case on laptops(high DPI\retina
>>>display\HD)?
>>> >
>>> >On iPad retina display, it works out of the box without any
>>> >runtimedpiprovider class when I use flex 4.13 but not on this laptop.
>>> When
>>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like
>>>value
>>> >returned isn't correct nor is it getting overridden.
>>> >
>>> >Any ideas?
>>> >
>>> >PS: I'm testing this on Dell latitude E7440.
>>>
>>>


Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Hi Alex,
No luck ;(

I updated to Flex4.14 FP 16 AIR 16.

Sample code that I have been trying:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
minHeight="600"
               runtimeDPIProvider="AppRuntimeDPI"

creationComplete="application1_creationCompleteHandler(event)">
    <s:layout>
        <s:VerticalLayout/>
    </s:layout>
    <fx:Script>
        <![CDATA[
            import mx.events.FlexEvent;

            protected function
application1_creationCompleteHandler(event:FlexEvent):void
            {
                ta.text = '';
                ta.text += "Capabilities.screenDPI : "+
Capabilities.screenDPI.toString(); //72 in both normal laptop and HD laptop
                ta.text += "\nCapabilities.screenResolutionX : "+
Capabilities.screenResolutionX.toString();//1600 in normal laptop and 1920
in HD laptop
                ta.text += "\nCapabilities.screenResolutionY : "+
Capabilities.screenResolutionY.toString();//900 in normal laptop and 1080
in HD laptop

            }

        ]]>
    </fx:Script>
    <s:Button label="Hello"/>
    <s:TextInput/>
    <s:DropDownList/>
    <s:Label text="Hello Label"/>
    <s:NumericStepper />
    <s:TextArea id="ta" width="100%"/>
</s:Application>

AppRuntimeDPI.as :

package
{
    import mx.core.DPIClassification;
    import mx.core.RuntimeDPIProvider;

    public class AppRuntimeDPI extends RuntimeDPIProvider
    {
        public function AppRuntimeDPI()
        {
            //super();
        }

        override public function get runtimeDPI():Number
        {
// cannot check for this condition too as screenDPI for any laptop(normal
or HD) is returned as 72 always. Moreover, any DPI value that I assign
here, doesn't have any effect on the screen element sizes. It's always same
for all values.

            // A tablet reporting an incorrect DPI of 240.
            /*if (Capabilities.screenDPI == 240 &&
            Capabilities.screenResolutionX == 600 &&
            Capabilities.screenResolutionY == 1024)
            {
            return DPIClassification.DPI_160;
            }

            return super.runtimeDPI;*/
            return DPIClassification.DPI_240;
        }
    }
}


On Tue, Mar 3, 2015 at 10:30 PM, Deepak MS <me...@gmail.com> wrote:

> Hmmm okay. I'll give it a try and let you know. Just hope it works.
> On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:
>
>> Try the latest AIR SDK?
>>
>> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>>
>> >
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core
>> >/RuntimeDPIProvider.html
>> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm afraid
>> >it isn't working as expected. I tried to create a runtime class and DPI
>> >value was overridden. But still there is no change. All screen elements
>> >look very small than normal.
>> >
>> >Has anybody come across this case on laptops(high DPI\retina display\HD)?
>> >
>> >On iPad retina display, it works out of the box without any
>> >runtimedpiprovider class when I use flex 4.13 but not on this laptop.
>> When
>> >I checked Capabilites.screenDPI, I get the value as 72. Looks like value
>> >returned isn't correct nor is it getting overridden.
>> >
>> >Any ideas?
>> >
>> >PS: I'm testing this on Dell latitude E7440.
>>
>>

Re: runtimeDPIProvider in mx:Application?

Posted by Deepak MS <me...@gmail.com>.
Hmmm okay. I'll give it a try and let you know. Just hope it works.
On 3 Mar 2015 21:21, "Alex Harui" <ah...@adobe.com> wrote:

> Try the latest AIR SDK?
>
> On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:
>
> >
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core
> >/RuntimeDPIProvider.html
> >I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm afraid
> >it isn't working as expected. I tried to create a runtime class and DPI
> >value was overridden. But still there is no change. All screen elements
> >look very small than normal.
> >
> >Has anybody come across this case on laptops(high DPI\retina display\HD)?
> >
> >On iPad retina display, it works out of the box without any
> >runtimedpiprovider class when I use flex 4.13 but not on this laptop. When
> >I checked Capabilites.screenDPI, I get the value as 72. Looks like value
> >returned isn't correct nor is it getting overridden.
> >
> >Any ideas?
> >
> >PS: I'm testing this on Dell latitude E7440.
>
>

Re: runtimeDPIProvider in mx:Application?

Posted by Alex Harui <ah...@adobe.com>.
Try the latest AIR SDK?

On 3/3/15, 5:28 AM, "Deepak MS" <me...@gmail.com> wrote:

>http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/core
>/RuntimeDPIProvider.html
>I have tried this on Flex 4 application(4.13, FP15, AIR15) and I'm afraid
>it isn't working as expected. I tried to create a runtime class and DPI
>value was overridden. But still there is no change. All screen elements
>look very small than normal.
>
>Has anybody come across this case on laptops(high DPI\retina display\HD)?
>
>On iPad retina display, it works out of the box without any
>runtimedpiprovider class when I use flex 4.13 but not on this laptop. When
>I checked Capabilites.screenDPI, I get the value as 72. Looks like value
>returned isn't correct nor is it getting overridden.
>
>Any ideas?
>
>PS: I'm testing this on Dell latitude E7440.