How can i make a dynamic flipping screen(like that of iPhone) in Android

后端 未结 4 1158
不知归路
不知归路 2020-12-23 12:52

I am parsing data through the web service. I want the flipping horizontally rather than vertically. Here is a tutorial where ViewFlipper is used but it is for static data.

4条回答
  •  醉话见心
    2020-12-23 13:29

    Just had a quick look for you because I was sure I've seen it around before, I found this on developer.android.com:

    public void overridePendingTransition (int enterAnim, int exitAnim)
    
    Since: API Level 5
    Call immediately after one of the flavors of startActivity(Intent) or finish() to specify an explicit transition animation to perform next.
    Parameters
    enterAnim   A resource ID of the animation resource to use for the incoming activity. Use 0 for no animation.
    exitAnim    A resource ID of the animation resource to use for the outgoing activity. Use 0 for no animation.
    

    So you can add this extra parameter to your intent which will define how the activity you call will animate on entrance of new activity and exit of old activity.

提交回复
热议问题