Thursday, September 5, 2013

How do you fade in and fade out text in Android?

I had a requirement to make text blink in my Android application.  This came in prety handy:

http://stackoverflow.com/questions/3450839/blinking-text-in-android-view

ViewFlipper is a control available in Android to flip through many controls.  Define all controls within ViewFlipper in layout.  Then call startFlipping() to make ViewFlipper flip.

Now, there is another control called ViewSwitcher.  According to Android docs - "ViewAnimator that switches between two views, and has a factory from which these views are created. You can either use the factory to create the views, or add them yourself. A ViewSwitcher can only have two child views, of which only one is shown at a time."

From what I understand, use ViewSwitcher like you would use themes.  Use ViewFlipper like movie names is displayed in http://www.marcustheatres.com/.

No comments:

Post a Comment