Sorry for asking such a basic question, Actually i need to call a method after certain time interval which is actually assigning a text to textView in android,which is supposed to change.So please suggest me the best way to do this.
Thanking you in anticipation.
{
int splashTime=3000;
int waited = 0;
while(waited < splashTime)
{
try {
ds.open();
String quotes=ds.getRandomQuote();
textView.setText(quotes);
ds.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}
waited+=100;
}
Have you considered
CountDownTimer? For example something like this:Of course, you can put it in a loop.