使用方法:

需要右滑返回的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

相关文章:

  • 2021-08-01
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2021-07-26
猜你喜欢
  • 2021-04-30
  • 2022-12-23
  • 2021-08-19
  • 2022-02-19
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
相关资源
相似解决方案