有很多的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.csdn.net/detail/luozisonghao/8428759