 <p>please try this:: </p> <pre><code>Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); int int_var = (width * 60)/100; </code></pre> <p>and put <code>int_var</code> as width</p>