title: How to adjust button size according to screen size in Android Studio
body: <p>I'm new to android development, and I am making a calculator in android studio. My calculator works fine but there isa  problem with its layout I installed it on my tablet and the buttons were very small as I designed them in Android Studio on an emulator, the button size doesn't change, and need help so that the button size increases as the screen size changes.</p>
  
  <p>My calculator design in Android Studio </p>
  
  <p><img src="https://i.stack.imgur.com/MG5Ym.png" alt="Calculator design"></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent" android:layout_height="match_parent"
      android:background="#ff000000"&gt;
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/clear"
          android:layout_alignParentTop="true"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="true"
          android:layout_marginTop="110dp"
          android:background="@drawable/clear_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/plus_minus"
          android:layout_alignBottom="@+id/clear"
          android:layout_toRightOf="@+id/clear"
          android:layout_toEndOf="@+id/clear"
          android:layout_marginLeft="-11dp"
          android:background="@drawable/pm_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/per"
          android:layout_alignBottom="@+id/plus_minus"
          android:layout_toRightOf="@+id/plus_minus"
          android:layout_toEndOf="@+id/plus_minus"
          android:layout_marginLeft="-11dp"
          android:background="@drawable/per_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/div"
          android:layout_alignTop="@+id/per"
          android:layout_toRightOf="@+id/per"
          android:layout_toEndOf="@+id/per"
          android:layout_marginLeft="-11dp"
          android:background="@drawable/div_btn"
          android:layout_alignParentRight="false" /&gt;
  
      &lt;TextView
          android:layout_width="fill_parent"
          android:layout_height="70dp"
          android:textAppearance="?android:attr/textAppearanceLarge"
          android:id="@+id/disp"
          android:layout_above="@+id/plus_minus"
          android:layout_alignParentLeft="true"
          android:layout_alignParentStart="true"
          android:layout_alignParentRight="true"
          android:layout_alignParentEnd="true"
          android:textColor="@android:color/white"
          android:textSize="32sp"
          android:inputType="none"
          android:textStyle="normal"
          android:gravity="right" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/seven"
          android:layout_below="@+id/clear"
          android:layout_toLeftOf="@+id/plus_minus"
          android:layout_toStartOf="@+id/plus_minus"
          android:layout_marginTop="-10dp"
          android:layout_alignParentTop="false"
          android:layout_alignParentLeft="true"
          android:background="@drawable/seven_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/eight"
          android:layout_alignTop="@+id/seven"
          android:layout_alignLeft="@+id/plus_minus"
          android:layout_alignStart="@+id/plus_minus"
          android:background="@drawable/eight_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/nine"
          android:layout_alignBottom="@+id/seven"
          android:layout_alignLeft="@+id/per"
          android:layout_alignStart="@+id/per"
          android:background="@drawable/nine_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/mul"
          android:layout_alignTop="@+id/nine"
          android:layout_alignLeft="@+id/div"
          android:layout_alignStart="@+id/div"
          android:background="@drawable/mul_btn" /&gt;
  
      &lt;Button
          android:layout_width="103dp"
          android:layout_height="90dp"
          android:id="@+id/four"
          android:layout_below="@+id/seven"
          android:layout_alignRight="@+id/seven"
          android:layout_alignEnd="@+id/seven"
          android:layout_marginTop="-10dp"
          android:layout_alignParentLeft="false"
          android:background="@drawable/four_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/five"
          android:layout_alignBottom="@+id/four"
          android:layout_alignLeft="@+id/eight"
          android:layout_alignStart="@+id/eight"
          android:background="@drawable/five_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/six"
          android:layout_alignTop="@+id/five"
          android:layout_alignLeft="@+id/nine"
          android:layout_alignStart="@+id/nine"
          android:background="@drawable/six_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/sub"
          android:layout_toEndOf="@+id/nine"
          android:layout_alignTop="@+id/six"
          android:layout_alignLeft="@+id/mul"
          android:layout_alignStart="@+id/mul"
          android:background="@drawable/min_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/one"
          android:layout_below="@+id/four"
          android:layout_alignLeft="@+id/four"
          android:layout_alignStart="@+id/four"
          android:layout_marginTop="-10dp"
          android:layout_alignParentLeft="false"
          android:background="@drawable/one_btn" /&gt;
  
      &lt;Button
          android:layout_width="203dp"
          android:layout_height="90dp"
          android:id="@+id/zero"
          android:layout_below="@+id/one"
          android:layout_alignLeft="@+id/one"
          android:layout_alignStart="@+id/one"
          android:layout_marginTop="-10dp"
          android:background="@drawable/zero_btn"
          android:layout_alignParentLeft="true"
          android:layout_marginLeft="-7dp" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/two"
          android:layout_above="@+id/zero"
          android:layout_alignLeft="@+id/five"
          android:layout_alignStart="@+id/five"
          android:background="@drawable/two_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/three"
          android:layout_below="@+id/five"
          android:layout_alignLeft="@+id/six"
          android:layout_alignStart="@+id/six"
          android:layout_marginTop="-10dp"
          android:background="@drawable/three_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/add"
          android:layout_toEndOf="@+id/three"
          android:layout_below="@+id/six"
          android:layout_alignLeft="@+id/sub"
          android:layout_alignStart="@+id/sub"
          android:layout_marginTop="-10dp"
          android:background="@drawable/plus_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/dot"
          android:layout_below="@+id/two"
          android:layout_alignRight="@+id/three"
          android:layout_alignEnd="@+id/three"
          android:layout_marginTop="-10dp"
          android:background="@drawable/dot_btn" /&gt;
  
      &lt;Button
          android:layout_width="100dp"
          android:layout_height="90dp"
          android:id="@+id/equ"
          android:layout_toEndOf="@+id/dot"
          android:layout_below="@+id/three"
          android:layout_alignLeft="@+id/add"
          android:layout_alignStart="@+id/add"
          android:layout_marginTop="-10dp"
          android:background="@drawable/equ_btn" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>