title: Creating an oval shape with a size relative to the display size
body: <p>I need a custom shape which should look like this:</p>
  
  <p><img src="https://i.stack.imgur.com/eyqlA.png" alt="enter image description here"></p>
  
  <p>The style of the shape is stroke so the orange part of that example is the border of the circle. The white part here is not part of the shape! it is the color of the layout under the shape. I hope you understand what i mean. The shape should not draw the white circle in the middle the shape should draw the orange stuff.</p>
  
  <p>Even more: I need the width and the height of the white circle to be relative to the screen size. If the screen width is smaller than the height i need the white circle's radius to be width / 2 and if the height is smaller than the width i need the circle's radius to be height / 2.</p>
  
  <p>There is really nothing i could find to achiev this. I thought that would be an easy task because its a simple drawing but android seems to make it hard to achiev since the shape's always setting fix dp for width and height like 120dp in the following example:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:shape="oval"&gt;
  
     &lt;solid 
         android:color="#666666"/&gt;
  
     &lt;size 
         android:width="120dp"
         android:height="120dp"/&gt;
  &lt;/shape&gt; 
  </code></pre>
  
  <p>I need this drawable as an overlay for an imageview.</p>