1
I need that in the textview displays in order 1, 2, 3, 4 etc. But the value it receives from dados.getdia()
is always 3, 5, 7, 9, 11 etc. I have tried several things.
In this code below it works up to when it gets 5, then when it gets 7, it displays 5 instead of 4, which would be correct. 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));
}
It seems easy to solve your problem, but I barely understood what you tried to explain. Could you elaborate a little more? Do you want to show only odd days? or only pairs?
– viana
I want to display 1,2,3 however I get odd, but it seems that I managed to solve here, I made a counter and subtract the day - counted, I’m doing the tests here
– Igor Oliveira