2
I wonder if there is a problem with the App’s performance in using 2 handler.postDlay()
at the same time, type calling the 2 in functions: inside the Oncreate Td1(); Td2();
public void Td1(){
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
handler.postDelayed(this, 5 * 1000);
}
}, 5 * 1000);
}
public void Td2(){
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
handler.postDelayed(this, 5 * 1000);
}
}, 5 * 1000);
}
then in case I should wear everything on a single tread?
– Rubens Ventura
Don’t confuse thread with Handler.
– ramaral
right, but in that case, I could put all the actions within one, I can use divided into 2, that’s my doubt!
– Rubens Ventura
You can put in one or two, what I tried to explain is whether calling the Td1 and Td2 methods one after the other is the same as calling one with all actions.
– ramaral
I get it, thank you!
– Rubens Ventura