There are 2 array namely b1[],b2[]
public void compare(){
a1=recyText.toString().replaceAll("\\s", "");
a2=edit3.toString().replaceAll("\\s","");
b1 = a1.split("");
b2= a2.split("");
for (int i = 0; i < b1.length; i++) {
for (int j=0;j<b2.length;j++){
if(b1[i].equals(b2[j])){
edit4.setText(edit4.getText()+b1[i]);
}
}
}
}
I want to compare likeb1[0]=b2[0
],b1[1]=b2[1]
and
if b1[i]=b2[j]
,
I want to change b[i]
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?