如何隐藏的ImageButton? [英] How to hide imagebutton?
本文介绍了如何隐藏的ImageButton?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有1 ImageButton的,我想隐藏onCreate方法5秒后,该按钮。任何人都可以请帮我
解决方案
的onCreate(){
新SleepTask()执行();
}私有类SleepTask扩展的AsyncTask {
保护无效doInBackground(){
视频下载(5000);
}
保护无效onPostExecute(){
yourImageButton.setVisiblity(View.INVISIBLE);
}
}
I have 1 imageButton and i want to hide that button after 5sec in oncreate method. Can anyone please help me
解决方案
onCreate(){
new SleepTask().execute();
}
private class SleepTask extends AsyncTask{
protected void doInBackground(){
Thread.sleep(5000);
}
protected void onPostExecute(){
yourImageButton.setVisiblity(View.INVISIBLE);
}
}
这篇关于如何隐藏的ImageButton?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文