原因有两个:
1.style里面设置了android:windowIsTranslucent这个属性
2.windowAnimationStyle需要继承Animation.Translucent
<style name="AppTranslateTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowAnimationStyle">@style/animation_translucent_translate</item>
</style><style name="animation_translucent_translate" parent="@android:style/Animation.Translucent">
<item name="android:windowEnterAnimation">@anim/activity_open_in_anim</item>
<item name="android:windowExitAnimation">@anim/activity_open_out_anim</item>
</style>
本文详细解读了Android开发中使用style设置窗口透明度和动画效果的方法,通过实例展示了如何配置AppTranslateTheme和animation_translucent_translate样式来实现窗口的透明背景和自定义动画效果。

1857

被折叠的 条评论
为什么被折叠?



