theme.xml
0 <style name="Theme.Translucent"> 571 <item name="android:windowBackground">@android:color/transparent</item> 572 <item name="android:colorBackgroundCacheHint">@null</item> 573 <item name="android:windowIsTranslucent">true</item> 574 <!-- Note that we use the base animation style here (that is no 575 animations) because we really have no idea how this kind of 576 activity will be used. --> 577 <item name="android:windowAnimationStyle">@android:style/Animation</item> 578 </style>
style.xml
<style name="Animation.Translucent"> 121 <item name="windowEnterAnimation">@anim/translucent_enter</item> 122 <item name="windowExitAnimation">@anim/translucent_exit</item> 123 </style>
translucent_enter.xml
20<set xmlns:android="http://schemas.android.com/apk/res/android" 21 android:interpolator="@interpolator/decelerate_quad"> 22 <translate android:fromXDelta="75%" android:toXDelta="0" 23 android:duration="@android:integer/config_shortAnimTime"/> 24 <alpha android:fromAlpha="0.0" android:toAlpha="1.0" 25 android:duration="@android:integer/config_shortAnimTime"/> 26</set>
translucent_exit.xml
20<set xmlns:android="http://schemas.android.com/apk/res/android" 21 android:interpolator="@interpolator/accelerate_quad"> 22 <translate android:fromXDelta="0%" android:toXDelta="75%" 23 android:duration="@android:integer/config_shortAnimTime"/> 24 <alpha android:fromAlpha="1.0" android:toAlpha="0" 25 android:duration="@android:integer/config_shortAnimTime"/> 26</set>