title: How can I create this shape.xml programmatically/dynamically in Android. Set stroke color(pics/code included)
body: <p>I need to create this shape programmatically (I need to change its stroke color depending on what a user chooses)</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="#FFEECC"
      /&gt;
  &lt;size
      android:width="100dp"
  android:height="100dp"
  /&gt;
  
  &lt;stroke android:width="5dp" android:color="#444444" /&gt;
  
  
  &lt;/shape&gt;
  </code></pre>
  
  <p>I tried using ShapeDrawable but it doesn't appear to have a stroke color option?  Also, shapes will tend to stretch no matter what width or height you set for them? can anyone explain this?</p>
  
  <p>tried this </p>
  
  <pre><code>ShapeDrawable sd = new ShapeDrawable();
              sd.setShape(new OvalShape());
              sd.getPaint().setStrokeWidth(20);
              sd.getPaint().setColor(Color.RED);
  </code></pre>
  
  <p><img src="https://i.imgur.com/94YpFo4.png" alt=""></p>