What about percentage usage?
问题 So, 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? I just wanna discuss about it. Thanks. 回答1: