title: How to auto resize the margin_left and margin_right sizes based on screen size in android
body: <p><a href="https://i.stack.imgur.com/mE3AB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mE3AB.png" alt="enter image description here"></a></p>
  
  <p>1>How i see the screen like this, at all different screen sizes?<br>
  2>what are the steps i have to follow for that?    </p>
  
  
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.example.sridhar.textviewautosize.MainActivity"&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="240dp"
          android:layout_marginLeft="20dp"
          android:layout_marginRight="36dp"
          android:layout_marginTop="25dp"
          android:autoSizeTextType="uniform"
          android:text="Hello World I am Checking AutoFill Text View is working or not for different screens" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Please check this code and tell me how to i auto resize that margin left and margin right attributes based on screen sizes for small,medium, large and xlarge. </p>