I am making an application that is easily accessible and MOSTLY used on phones, but will be CONVENIENT for use on a tablet, if available.
I am familiar with landscape / portrait layouts for individual XML files, but what about different resolutions? This is also a problem for phone-only applications, which is the best way to have scalable layouts.
I use dip values ββthat are density independent but not as efficient as just using percentages that will effectively scale your layout.
I also hard code XML. I IMAGINE that I could programmatically generate a layout by checking the width and height of the screen on EVERY ACTIVITY, but tell me, is there a better way?
source share