start activity with left to right mode

后端 未结 5 1041
隐瞒了意图╮
隐瞒了意图╮ 2021-02-01 03:27

I am facing a problem .

I have three activities and i need to start new activity with slide left.

Activity1

Activity2

Activity3

means

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-01 04:21

    Here it is,

    Intent intent=new Intent(Activity1.this,Activity2.class);
    startActivityForResult(intent,0);
    getActivity().overridePendingTransition( R.anim.righttoleft, R.anim.stable );
    

    And here is the animation righttoleft.xml,

    
    
        
    
    

    and stable.xml

    
    
      
    
    

提交回复
热议问题