title: android studio change color that I want in array
body: <p>There are 2 array namely <code>b1[],b2[]</code></p>
  
  <pre class="lang-java prettyprint-override"><code>public void compare(){
          a1=recyText.toString().replaceAll("\\s", "");
          a2=edit3.toString().replaceAll("\\s","");
          b1 = a1.split("");
          b2= a2.split("");
          for (int i = 0; i &lt; b1.length; i++) {
              for (int j=0;j&lt;b2.length;j++){
                  if(b1[i].equals(b2[j])){
                      edit4.setText(edit4.getText()+b1[i]);
  
                  }
              }
           }
         }
  </code></pre>
  
  <p>I want to compare like<code>b1[0]=b2[0</code>],<code>b1[1]=b2[1]</code>  and </p>
  
  <p><code>if b1[i]=b2[j]</code> , </p>
  
  <p>I want to change <code>b[i]</code> color to Red. 
  I searched setspan but it works when start in int, end is int.
  How can i change the color that i want in array?</p>