user4890366
user4890366

Reputation:

how to apply animation on android activity

i am working on app in which i need some animation on activity i cannot find any solution. please any one help me

public class MainActivity extends Activity implements AnimationListener {

    TextView tv;
    Animation animFadein;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        tv = (TextView) findViewById(R.id.textView1);

        animFadein = AnimationUtils.loadAnimation(getApplicationContext(),
                R.anim.fade_in);

    }

}

Upvotes: 2

Views: 46

Answers (1)

Attaullah
Attaullah

Reputation: 4021

Animations can be performed through either XML or android code. In this tutorial many of animation are explained that how to do animations using XML notations for an activity.

tutorial link and source code

enter image description here

Upvotes: 1

Related Questions