I need in textview to display in order 1, 2, 3, 4 etc. But the value he receives from dados.getdia()
is always 3, 5, 7, 9, 11 etc. I've tried several things.
In this code below it works until you get 5, then when you get 7, it displays 5 instead of 4, which would be the correct one. How can I do this?
int dia = dados.getDia();
if(dia == 3){
Log.d(TAG,"entrou Dia ==3");
int dia2 = dia-1 ;
txv_dia.setText(String.valueOf(dia2));
}else if(dia >3){
Log.d(TAG,"entrou Dia >3");
int dia2 = dia-3 ;
txv_dia.setText(String.valueOf(dia2));
}