What about percentage usage? I'm thinking about the usage of percent, example, in margins.

We can use overlay to separate our layout by DPI sizes, but why can't we use percentage?

Something like that:

Display display = getWindowManager().getDefaultDisplay();

float width = display.getWidth();
float height = display.getHeight();

//20% of left margin
float imageMarginLeft = ( width * 20 ) / 100;


And then set this margin to the image, or whatever element.

Is this bad?
You can simplify math whenever possible. No reason to multiply by 20 then divide by 100. Just multiply by .20. If you needed a result that was twenty percent in addition to 100 percent of what you already had you could multiply by 1.2. It saves a process making your code just a tad more efficient!