setting compound drawable to different TextViews
<p>In the following code I have 5 TextViews in which I try to set a compound drawable for each one of them.</p>

<p>However the drawable is drawn only on the first one! WHY, and how to fix it !?</p>

<pre><code>if(number &gt;= 1210 &amp;&amp; number &lt;= 1215){
    ist1_1210.setCompoundDrawablesWithIntrinsicBounds(R.drawable.update_icon, 0, 0,0);
    ist1_1210.setPadding(10, 0, 0, 0);
    ist1_1210.setCompoundDrawablePadding(-45);
    System.out.println("ist1_1210 is supposed to be running");
}

if(number &gt;= 1220 &amp;&amp; number &lt;= 1225){
    //ist1_1220.setTextColor(Color.GREEN);
    ist1_1220.setCompoundDrawablesWithIntrinsicBounds(R.drawable.update_icon, 0, 0,0);
    ist1_1220.setPadding(10, 0, 0, 0);
    ist1_1220.setCompoundDrawablePadding(-45);
    System.out.println("ist1_1220 is supposed to be running");
}

if(number &gt;= 1230 &amp;&amp; number &lt;= 1235){
    //ist1_1230.setTextColor(Color.GREEN);
    ist1_1230.setCompoundDrawablesWithIntrinsicBounds(R.drawable.update_icon, 0, 0,0);
    ist1_1230.setPadding(10, 0, 0, 0);
    ist1_1230.setCompoundDrawablePadding(-45);
}

if(number &gt;= 1240 &amp;&amp; number &lt;= 1245){
    //ist1_1240.setTextColor(Color.GREEN);
    ist1_1240.setCompoundDrawablesWithIntrinsicBounds(R.drawable.update_icon, 0, 0,0);
    ist1_1240.setPadding(10, 0, 0, 0);
    ist1_1240.setCompoundDrawablePadding(-45);
}

if(number &gt;= 1250 &amp;&amp; number &lt;= 1255){
    //ist1_1250.setTextColor(Color.GREEN);
    ist1_1250.setCompoundDrawablesWithIntrinsicBounds(R.drawable.update_icon, 0, 0,0);
    ist1_1250.setPadding(10, 0, 0, 0);
    ist1_1250.setCompoundDrawablePadding(-45);
}
</code></pre>
