Displaying activity with custom animation

后端 未结 3 1532
终归单人心
终归单人心 2020-12-07 12:09

I have a widget which starts an activity when it is clicked. I\'d like to have some kind of fancy animation to display this activity, rather than the standard scroll-from-ri

3条回答
  •  萌比男神i
    2020-12-07 12:49

    You can create a custom Theme with a reference to your own animation and apply it to your Activity in your manifest file. I was successful in applying a custom animation for a floating window using the following style definition. You might be able to do something similar if you set the parent of your style to be "@android:style/Animation.Activity"

    Look at the following files for further details on what you can override.

    https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/styles.xml https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/themes.xml

    Here's my a portion of my styles.xml and manifest.xml

    styles.xml

    
    
     
     
    

    Manifest.xml

        
        
    

提交回复
热议问题