title: Scale drawable circle according to screen size
body: <p>Its been a while I am stuck with this. I am a newbie android developer.</p>
  
  <p>I have a drawable circle.</p>
  
  <p><strong>circular_shape.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;    
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
      android:useLevel="false"
      android:shape="ring"
      android:thickness="0.8dp"&gt;
      &lt;solid android:color="@android:color/holo_blue_dark"/&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>now i want to use this circle in my activity layout in such a way that it covers the whole screen. That is, the width of the screen should be equal to Diameter of the circle.
  Note that I have not set the radius of the circle.</p>
  
  <p><strong>example_activity.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/exampleLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.example.anil.raceorganizer.ExampleActivity"&gt;
      &lt;ImageView
          android:id="@+id/race_field"
          android:src="@drawable/circular_shape"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@android:color/darker_gray"
          android:padding="0dp"
          android:layout_margin="0dp"
          &gt;&lt;/ImageView&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>Note that I have tried to put padding and margin as 0, but it didn't work.
  I also tried setting the size of the ImageView through code, but it only changed the size of the ImageView as a whole and not circle alone.</p>
  
  <p>This is what I get with this code.</p>
  
  <p><a href="https://i.stack.imgur.com/nLPyr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nLPyr.png" alt="enter image description here"></a></p>
  
  <p>Any help is greatly appreciated.</p>