有很多的app进入其他界面的时候,退出时是手向右一滑就退出了,现在让我们来看看这种效果是怎么实现的。
首先activity要继承库中的BaseSlideActivity
<activity
android:name="com.luo.ui.test.TransActivity"
android:label="@string/app_name"
android:theme="@style/TransParentActivity" > <!-- must use this theme -->
</activity> android:theme="@style/TransParentActivity" > <!-- must use this theme -->这个主题必须给activity加上
然后styles如下
<style name="TransParentActivity" parent="@android:style/Theme.NoTitleBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
图片延迟效果不好
下载地址http://download.youkuaiyun.com/detail/luozisonghao/8428759
本文详细介绍了如何在Android应用中实现滑动手势退出Activity的效果,通过继承特定库中的BaseSlideActivity并配置相应的主题来达到目标。同时提供了主题设置的代码示例,并讨论了图片延迟退出效果的调整。
925

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



