How to make text fade in and out in Android?

后端 未结 6 614
说谎
说谎 2021-01-30 12:44

I have a paragraph of text and when a button is clicked I want that text to fade out, change to some other text, then fade back in. I have some code but it doesn\'t do the fade

6条回答
  •  萌比男神i
    2021-01-30 13:39

    You should consider using something like a TextSwitcher. There is a brief document on TextSwitcher in the Android documentation. What I would recommend best though is to look at the API Demos, there is a great and simple to use one of TextSwitchers. Download the API Demos and check them out for yourself, or see here.

提交回复
热议问题