SwipeBackLayout的使用方法,右滑返回

使用方法:

需要右滑返回的activity继承baseActivity就可以,

如:

public class SettingActivity extends BaseActivity
{}

 

为防止滑动出现黑屏效果,记得需要定义

<!-- 滑动activity必须使用该主题,防侧滑时黑屏 -->
    <style name="NoTitleBarTheme" parent="AppBaseThemeSwipe"></style>
    <style name="AppBaseThemeSwipe" parent="android:Theme.Light.NoTitleBar">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:textColor">#000000</item>
    </style>

并在清单文件中引用:

如:

<activity
            android:name="com.carspeak.client.activity.SettingActivity"
            android:screenOrientation="portrait"
            android:theme="@style/NoTitleBarTheme"
            android:windowSoftInputMode="adjustUnspecified|stateHidden" >
        </activity>

 

 

demo下载地址:https://files.cnblogs.com/files/feijian/SwipeBackDemo.rar

posted @ 2015-05-22 14:12  飞剑  阅读(1357)  评论(0编辑  收藏  举报