I've been working on an android application on Titanium lately and i've come upon an issue.
What i'm struggling with is making a specific view responsive.
I want to show like 15-20 buttons on a view but i don't want it to be scrollable. Now if i use around 50dpi which is the recommended for buttons on some smaller screens i miss some of them.
How should i approach this? Should i use % of the device width and height which i get like
function PixelsToDPUnits(ThePixels) { if ( Titanium.Platform.displayCaps.dpi > 160 ) return (ThePixels / (Titanium.Platform.displayCaps.dpi / 160)); else return ThePixels; } Ti.App.deviceWidth = PixelsToDPUnits(Ti.Platform.displayCaps.platformWidth); Ti.App.deviceHeight = PixelsToDPUnits(Ti.Platform.displayCaps.platformHeight);Should i create say 4-5 different views and load the right one according to the user's DPI?
What's the most correct way to approach this.
THanks