title: How to do percentage height and width in Android?
body: <p>I'm trying to set a button to 60% height and 60% width of the physical device.</p>
  
  <p>Since the size of the screen is user-dependent, using dips is out of the question.</p>
  
  <p>How can we do percentage height and width in Android? E.g.:</p>
  
  <pre><code> &lt;Button android:layout_width="60%" android:layout_height="60%"/&gt;
  </code></pre>