@deepthi: here is an detail example to to display text in a button at specific time interval
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.widget.Button;
import android.widget.ImageView;
public class ButtonActivity extends Activity {
private static final long GET_DATA_INTERVAL = 2000;
int images[] = {R.drawable.kanya,R.drawable.kumba};
private String[] textfirst={"nsc","bsc","nasadq","tcs","mds","mac","manipal"};
int index = 0;
ImageView img;
Button btn;
Handler hand = new Handler();
Handler hand1 = new Handler();
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
this.setContentView(R.layout.main);
img = (ImageView) findViewById(R.id.image);
btn = (Button) findViewById(R.id.button1);
hand1.postDelayed(run1, GET_DATA_INTERVAL);
}
Runnable run1 = new Runnable() {
@Override
public void run() {
btn.setText(textfirst[index++]);
if (index == textfirst.length)
index = 0;
hand1.postDelayed(run1, GET_DATA_INTERVAL);
}
};