title: Android: how would I create this resource shape in code?
body: <p>I have this shape defined in an xml file, and need to create it in code but am stumped.</p>
  
  <p>I assume I want to instantiate a RoundRectShape and set its properties to those in xml, but properties don't line up very well.</p>
  
  <pre><code>RoundRectShape(float[] outerRadii, RectF inset, float[] innerRadii)
  </code></pre>
  
  <p>My xml shape only has 1 radius, now RectF, and the RoundRectShape has no options for setting padding or colors?</p>
  
  <pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt; 
      &lt;solid android:color="#00FFFFFF" /&gt;
      &lt;stroke android:width="2dp" android:color="#FFFFFFFF" /&gt; 
      &lt;padding android:left="7dp" android:top="7dp" 
              android:right="7dp" android:bottom="7dp" /&gt; 
      &lt;corners android:radius="4dp" /&gt; 
  &lt;/shape&gt; 
  </code></pre>