隐藏的TextView在Android中一段时间后, [英] Hide TextView after some time in Android
问题描述
我要一些时间间隔后隐藏的TextView说3秒。我用Google搜索,发现了一些code,我试图code如下图所示,但它不工作。搜索结果
请告诉我什么是错呢?
I want to hide TextView after some time interval say 3 seconds. I googled and found some code and I tried code as shown below but It is not working.
Please tell me what is the wrong with this ?
tvRQPoint.setText("+0");
tvRQPoint.postDelayed(new Runnable() {
public void run() {
tvRQPoint.setText("+0");
}
}, 3000);
还有一件事,如何删除超时?当我用这对点击
,如果一个选项,然后用户点击点击第二个选项,然后3秒克服了(点击第一个选项后),它不显示第二个选项3秒的ListView
事件
One more thing, how to remove timeout ? As I am using this on click
event of ListView
, If user clicks on one option and then clicks on second option, then as 3 seconds got over (after clicked on first option), It does not show second option for 3 seconds.
推荐答案
尝试视图中不可见
或 GONE
,如:
tvRQPoint.postDelayed(new Runnable() {
public void run() {
tvRQPoint.setVisibility(View.INVISIBLE);
}
}, 3000);
设置查看知名度
与view.setVisibility(View.INVISIBLE|View.VISIBLE|View.GONE);
这篇关于隐藏的TextView在Android中一段时间后,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!