title: Android change color stroke (border) programmatically
body: <p>I try change color "stroke", through  "GradientDrawable" but not work.</p>
  
  <p>also, I don't know how get id stroke, and change only stroke (I see google, all example are failed)</p>
  
  <p>My XML item</p>
  
  <pre><code>&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android" &gt;
      &lt;item android:id="@+id/selectable_kachel_shape" &gt;
          &lt;shape
              android:innerRadius="0dp"
              android:shape="ring"
              android:thicknessRatio="2"
              android:useLevel="false" &gt;
              &lt;stroke android:width="11dp" android:color="#ff00ffff"/&gt;
              &lt;gradient
                  android:centerColor="#FFFFFF"
                  android:endColor="#FFFFFF"
                  android:startColor="#FFFFFF"
                  android:type="sweep" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
      &lt;/layer-list&gt;
  
  GradientDrawable gd = (GradientDrawable) circleProgress.getBackground();
  
  gd = (GradientDrawable) circleProgress.getBackground();
  gd.setColor(Color.RED);
  
  android.graphics.drawable.LayerDrawable cannot be cast to android.graphics.drawable.GradientDrawable
  </code></pre>
  
  <p>Here Works, but ... not get my item</p>
  
  <pre><code>    GradientDrawable gd = new GradientDrawable();
      gd.setColor(Color.RED);
      gd.setCornerRadius(10);
      gd.setStroke(2, Color.WHITE);
  
  
      circleProgress.setBackgroundDrawable(gd);
  </code></pre>
  
  <p><strong>UPDATE</strong> here Works, BUT NOT CHANGE MY STROKE (I TRIED WITH ID BUT NOT WORK)
  ONLY WORK WITH ID ITEM.</p>
  
  <pre><code>GradientDrawable shape = (GradientDrawable) (layers.findDrawableByLayerId(R.id.selectable_kachel_shape));
          shape.setColor(this.getResources().getColor(android.R.color.background_dark));
          circleProgress.setBackgroundDrawable(shape);
  </code></pre>