1
votes

I made a simple Flex mobile application to test TextInput fields. I define my View with width=height=100% and use vertical layout. Inside I'm simply placing static TextInput components with width of 100, 200, 300, 400 respectively. I'm also displaying the width of each TextInput in its text property and it shows values which I've defined. What bothers me is the actual width of the TextFields doesn't match the properties of the phone emulator I'm running (Samsung Epic WxH = 480x775) or actual device. For instance the TextInput with width of 400 completely extends past the left and right sides of the device, while it should be contained inside it: it's 400 pixels wide and device has 480 usable pixels available. So do all other TextInputs. They look lot wider they they should be. What the issue here? Am I missing something trivial? Thanks.

1
When going to setup a mobile app I noticed the option to automatically scale for different DPIs, by default it appears to be un-checked but perhaps this is causing your problem, in their Learn More link it brings you to here: help.adobe.com/en_US/flex/mobileapps/… I'm still going to just try to replicate what your seeing out of curiousityshaunhusain

1 Answers

0
votes

That did in fact make all the difference. When creating the application if you check the box to auto-scale for other DPIs it sets this property on the ViewNavigatorApplication

applicationDPI="160"

If I don't check the box that property isn't added and I get the behavior you were expecting if that property is included and/or I did check the box then it is adjusting the pixel values assuming that I wrote it for a 160 DPI screen and it now needs to scale the value for a 320 DPI screen.