在android中的TextView中显示文本后创建延迟?

时间:2016-07-19 10:52:03

标签: android textview delay

我首先得到延迟,然后显示文本,但我想首先显示文本然后创建延迟???

TextView textView=(TextView)findViewById(R.id.correct_word) 
textView.setText("Delay is created");
final Handler handler = new Handler(); 
handler.postDelayed(new Runnable() { 
    @Override 
    public void run() {
    //your code
    }
}, 2000);

1 个答案:

答案 0 :(得分:0)

textView.setText("Delay is created");的{​​{1}}方法中移动Runnable

run()