How can I set the color of android rating bar's stroke? (Not the color of the stars but the BORDER)
<p>I am an android beginner and I want to make my custom ratingBar.</p>

<p>Disclaimer: it's not a duplicate. because all the posts I have read asks about how to change colors of the star and how to remove the stroke. That is NOT what I want. I want to have the stroke and to be able to change the color of the border.</p>

<p>With a transparent and yellow stroke while empty, and yellow background and stroke for half and filled.</p>

<p>I do NOT want to use pngs. I have my own already but they are too small. I just dont want to ask the designer to make new ones if I can make the stars using only XML attributes and drawables.</p>

<pre><code>&lt;RatingBar
          android:id="@+id/thread_rating"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:isIndicator="true"
          android:numStars="5"
          android:progressBackgroundTint="@color/gray"
          android:progressTint="@color/gold"
          android:rating="2.5"
          android:secondaryProgressTint="@color/gray"
          android:stepSize="0.5"
          style="?android:attr/ratingBarStyleSmall"
          /&gt;
</code></pre>

<p>I work on this with another engineer. He also wrote code in a java file</p>

<pre><code>private void setRatingBarStart(RatingBar rating_bar) {
LayerDrawable stars = (LayerDrawable) rating_bar.getProgressDrawable();
stars.getDrawable(2)
    .setColorFilter(getResources().getColor(R.color.gold),
        PorterDuff.Mode.SRC_ATOP); // for filled stars
stars.getDrawable(1)
    .setColorFilter(getResources().getColor(R.color.light_gray),
        PorterDuff.Mode.SRC_ATOP); // for half filled stars
stars.getDrawable(0)
    .setColorFilter(getResources().getColor(R.color.light_gray),
        PorterDuff.Mode.SRC_ATOP); // for empty stars
</code></pre>

<p>[So now it has a grey background, yellow for filled, and NO stroke now.</p>

<p><a href="https://i.stack.imgur.com/TqQOB.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/TqQOB.jpg" alt="enter image description here"></a></p>

<p>And I want it to have transparent background, yellow stroke and yellow for filled.
Looks like this 
<a href="https://i.stack.imgur.com/XKvnX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XKvnX.png" alt="enter image description here"></a></p>

<p>I already know how to set the background transparent and to make it yellow. I just dont know how to set the stroke color. Thanks a lot!!!!</p>