On 11/17/16, 1:56 PM, "bilbosax" <[email protected]> wrote:
>I am having a bit of trouble with the custom layout, I believe because of >scaling issues related to screen DPI. What lays out nicely in the >emulator >is WAY off when loaded onto my iPad. So I have come up with this, which >includes a scaling factor, but it feels a bit like a hack and I don't know >if it is appropriate. For every X value that I calculate, I have to >divide >it by a scale factor to adjust for screen density. Let me know if you >think >there is a better way. > >var itemRendererWidth:int = renderer.width; >var scale = Capabilities.screenDPI/132; >var col1x = .15*itemRendererWidth/scale; > >label1.x = col1x; >label1.text = data.address; Makes me think something else is wrong. First verify that the renderer.width is reasonable in emulator and on the device. Then we can try to figure out the right answer. But before you even do that, I would not worry about how nice it looks, I would just make sure you can see every Label like you used to and see if your performance got better. No need to polish a turd, as a former colleague used to say. -Alex
