How can I set a percentage width for my box that will be constant across devices?
<p>I have become confuddled, I'm trying to set a minimum width of a box, for all devices I want it to have a minimum width of say 20% of the screen width. how can I achieve this?</p>

<p>I've gotten the dpWidth of two screens from a tablet and my XHDPI Galaxy S3. The S3 has a dpWidth of 300 and the tablet 800. In which case I can do this programatically by calculating 20% of the dpWidth and setting that as my boxes dp value.</p>

<p>I'm guessing I can't use weight because it's just for the width. So how can I do this in the XML?</p>

<p>Also a follow-up question, how is dp useful at all? If one device can have 300 and the other 800 then the effect of the dp changes dramatically! i don't understand why there aren't more useful units to work with, i.e the screen divided into 100 units or something.</p>
