Is there an easy way to detect DPI? I need to layout icons slightly different depending on DPI. I can't just looked at the model since on Android there are so many, and I can't just look at the resolution since 1280x800 on a Galaxy Tab 10.1 is much lower DPI than 960x640 on an iPhone4.
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
Detecting DPI?
There's no way to do that at present, however could you consider checking for device for iPhone4 and checking screen res for others?
Since I want to run on Android this won't be possible, since there are dozens of HDPI Android handsets with DPI similar to the iPhone4. There'd be no way for me to differentiate between 1024x600 of the Nook Color/GTab (MDPI) vs. the 960x640 of an iPhone 4 (HDPI) or the 1024x768 (LDPI) of an iPad.
In my particular case the screen layout depends heavily on DPI since it corresponds to legibility (I need to provide somewhat fixed size UI elements in physical space, not in pixels).
My alternative is to provide two different apps, one that is for phones and one that is for tablets. That's not the end of the world, it's just somewhat inconvenient since the ONLY difference would be the layout.
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
newImageRect doesn't support setReferencePoint
Subdirectories - again
Spin a sprite
Simulator Keyboard Events
Android Permissions for writing to temporary and documents directories
Is 60fps Actually Feasible?
Distribution with Ad Hoc doesn't work
Error in Flashlight Sample program
Memory Leaks -- Possible Corona Bug