Display Activity From Bottom to Top

后端 未结 3 663
执念已碎
执念已碎 2020-11-29 18:41

I want to display one activity to another from bottom to top animation using Intent.

Given me some example for that like below

<         


        
3条回答
  •  北海茫月
    2020-11-29 19:29

    Define an animation in res/anim/slide_in_up.xml:

    
    
    

    and another at res/anim/slide_out_up.xml:

    
    
    

    Then apply these after to call startActivity:

    Intent i2 = new Intent(main.this, test.class);
    startActivity(i2);
    overridePendingTransition( R.anim.slide_in_up, R.anim.slide_out_up );
    

    There an introduction to Android animation here which may help you further.

提交回复
热议问题