Animate any element in Android

An easy way to run an animation to any element within your activity.


Libraries

Code Snippet
TextView textView = (TextView) findViewById(R.id.yourTextView);
textView.startAnimation(AnimationUtils.loadAnimation(c, android.R.anim.fade_in));


Implementation

The code above runs the android animation "fade_in" on the TextView with ID of "yourTextView".





Comments
  • mode_editWrite a comment



  • forumComments




Embed Code

We provide special containers which include the full snippet and a link to this site. So for example when you make a tutorial and you are using code from this site, you can use one of the following snippet embeddings:

Load Preview Get Code Close Preview







    Share
    Rating
    thumb_up 0 thumb_down
    Author
    Thorolus

    I'm the head developer and co-founder of GlovilGames Studios (glovilgames.com) and other platforms GlovilGames created, like vsnippets.com, worth-calculator.net, python-obfuscator.com and some mobile apps and games.

    Tags
    Android
    Animation



    Informations

    posted on 2016-10-28 16:20:58

    viewed 104 times

    snippet's UUID is 58135eca584ab

    Similar Snippets