My if and else if conditionals are too long. Is it possible to put a for or while or switch or any other function that could reduce the code and make it more understandable?
Apart from that, the code is running fine.
if((text.charAt(7)=='O' || text.charAt(7)=='X')
&& (text.charAt(8)=='O' || text.charAt(8)=='X')
&& (text.charAt(9)=='O' || text.charAt(9)=='X')
&& (text.charAt(10)=='O'|| text.charAt(10)=='X')
&& text.charAt(49)=='O'
&& text.charAt(50)=='O'
&& text.charAt(51)=='X')
{
ledGeneral.setBackgroundResource(R.drawable.ledverte);
}else if (text.charAt(7)=='A'
|| text.charAt(8)=='A'
|| text.charAt(9)=='A'
|| text.charAt(10)=='A'
|| text.charAt(49)=='A'
|| text.charAt(50)=='A')
{
ledGeneral.setBackgroundResource(R.drawable.ledgeneralrouge);
}else{
ledGeneral.setBackgroundResource(R.drawable.imageverte);
}