Currently I'm using percentages to maintain my Android app UI, but I think this is'nt the best solution.
I found this in the documentation:
The coordinates grid
Titanium uses a grid coordinate system for layout. Grid locations are based on the system unit (platform-dependent unit). This means that by default on iOS, elements are positioned on a density-independent grid and on Android on a density-dependent grid. The net result is that on iOS, elements are positioned in visually the same locations regardless of the actual density of the screen. On Android, elements are positioned at the same absolute pixel locations and might lay out differently depending on the device.
iPhone with either original or retina display is based on a 320 x 480 dip grid.
iPad is based on a 1024 x 768 dip grid.
Android device screen sizes vary. Considering these emulator examples:
HVGA emulator is 320 x 480 px
WVGA800 emulator is 480 x 800 px
WVGA854 emulator is 480 x 854 px
Remember that you can specify dp or dip units on Android (and even set an app-level default in tiapp.xml) to achieve the same density-independent grid as offered by default on iOS.
As I think, this last sentence should mean if I set the app-level default in tiapp.xml to dp or dip, then I should have a coordinate grid with 320 px (dip) width... But when I start my app, Windows and Views width are 360... Why? Where is the problem?
These are some displayCaps info of my device.
[INFO] : Ti.Platform.displayCaps.density: xxhigh
[INFO] : Ti.Platform.displayCaps.dpi: 480
[INFO] : Ti.Platform.displayCaps.platformHeight: 1776
[INFO] : Ti.Platform.displayCaps.platformWidth: 1080
[INFO] : Ti.Platform.displayCaps.logicalDensityFactor: 3
[INFO] : Ti.Platform.displayCaps.xdpi: 442.45098876953125
[INFO] : Ti.Platform.displayCaps.ydpi: 443.3450012207031