尝试执行以下操作:
animTimeChange = AnimationUtils.loadAnimation(this, android.R.anim.slide_in_left);
itemTime.startAnimation(animTimeChange);
itemTime.setText("new text");
但动画通过空白屏幕发生(即原始文本被清除,然后新文本出现动画)。如何避免那个空白屏幕?
(我TextView
是ListView
行的一部分,我尝试使用TextSwitcher
-它无法正常工作;因为ViewFlipper
- 我不确定在哪里添加视图,因为这是ListView)