新增几种组合动画

pull/27/head
Jenly 3 years ago
parent 9a426841c9
commit 5183b3b9fe
  1. 16
      app-dialog/src/main/res/anim/app_dialog_scale_bottom_in.xml
  2. 16
      app-dialog/src/main/res/anim/app_dialog_scale_bottom_out.xml
  3. 16
      app-dialog/src/main/res/anim/app_dialog_scale_left_in.xml
  4. 16
      app-dialog/src/main/res/anim/app_dialog_scale_left_out.xml
  5. 16
      app-dialog/src/main/res/anim/app_dialog_scale_right_in.xml
  6. 16
      app-dialog/src/main/res/anim/app_dialog_scale_right_out.xml
  7. 16
      app-dialog/src/main/res/anim/app_dialog_scale_top_in.xml
  8. 16
      app-dialog/src/main/res/anim/app_dialog_scale_top_out.xml
  9. 20
      app-dialog/src/main/res/values/styles.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200">
<scale
android:pivotX="50%"
android:pivotY="50%"
android:fromXScale="0.0"
android:fromYScale="0.0"
android:toXScale="1.0"
android:toYScale="1.0"/>
<translate
android:fromXDelta="0"
android:toXDelta="0"
android:fromYDelta="100%"
android:toYDelta="0%" />
</set>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200">
<scale
android:pivotX="50%"
android:pivotY="50%"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="0.0"
android:toYScale="0.0"/>
<translate
android:fromXDelta="0"
android:toXDelta="0"
android:fromYDelta="0%"
android:toYDelta="100%" />
</set>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200">
<scale
android:pivotX="50%"
android:pivotY="50%"
android:fromXScale="0.0"
android:fromYScale="0.0"
android:toXScale="1.0"
android:toYScale="1.0"/>
<translate
android:fromXDelta="-100%"
android:toXDelta="0%"
android:fromYDelta="0"
android:toYDelta="0" />
</set>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200">
<scale
android:pivotX="50%"
android:pivotY="50%"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="0.0"
android:toYScale="0.0"/>
<translate
android:fromXDelta="0%"
android:toXDelta="-100%"
android:fromYDelta="0"
android:toYDelta="0" />
</set>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200">
<scale
android:pivotX="50%"
android:pivotY="50%"
android:fromXScale="0.0"
android:fromYScale="0.0"
android:toXScale="1.0"
android:toYScale="1.0"/>
<translate
android:fromXDelta="100%"
android:toXDelta="0%"
android:fromYDelta="0"
android:toYDelta="0" />
</set>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200">
<scale
android:pivotX="50%"
android:pivotY="50%"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="0.0"
android:toYScale="0.0"/>
<translate
android:fromXDelta="0%"
android:toXDelta="100%"
android:fromYDelta="0"
android:toYDelta="0" />
</set>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200">
<scale
android:pivotX="50%"
android:pivotY="50%"
android:fromXScale="0.0"
android:fromYScale="0.0"
android:toXScale="1.0"
android:toYScale="1.0"/>
<translate
android:fromXDelta="0"
android:toXDelta="0"
android:fromYDelta="-100%"
android:toYDelta="0%" />
</set>

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200">
<scale
android:pivotX="50%"
android:pivotY="50%"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="0.0"
android:toYScale="0.0"/>
<translate
android:fromXDelta="0"
android:toXDelta="0"
android:fromYDelta="0%"
android:toYDelta="-100%" />
</set>

@ -30,6 +30,26 @@
<item name="android:windowExitAnimation">@anim/app_dialog_bottom_out</item> <item name="android:windowExitAnimation">@anim/app_dialog_bottom_out</item>
</style> </style>
<style name="app_dialog_scale_left_animation" parent="android:style/Animation.Dialog">
<item name="android:windowEnterAnimation">@anim/app_dialog_scale_left_in</item>
<item name="android:windowExitAnimation">@anim/app_dialog_scale_left_out</item>
</style>
<style name="app_dialog_scale_top_animation" parent="android:style/Animation.Dialog">
<item name="android:windowEnterAnimation">@anim/app_dialog_scale_top_in</item>
<item name="android:windowExitAnimation">@anim/app_dialog_scale_top_out</item>
</style>
<style name="app_dialog_scale_right_animation" parent="android:style/Animation.Dialog">
<item name="android:windowEnterAnimation">@anim/app_dialog_scale_right_in</item>
<item name="android:windowExitAnimation">@anim/app_dialog_scale_right_out</item>
</style>
<style name="app_dialog_scale_bottom_animation" parent="android:style/Animation.Dialog">
<item name="android:windowEnterAnimation">@anim/app_dialog_scale_bottom_in</item>
<item name="android:windowExitAnimation">@anim/app_dialog_scale_bottom_out</item>
</style>
<!-- dialog style --> <!-- dialog style -->
<style name="app_dialog" parent="android:style/Theme.Dialog"> <style name="app_dialog" parent="android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item> <item name="android:windowFrame">@null</item>

Loading…
Cancel
Save