Skip to content

Bhanditz/SlideBack

 
 

Repository files navigation

SlideBack

使用Kotlin实现的一个简单的拖拽关闭Activity的库,实现原理主要参考ikew0ng巨巨的SwipBackLayout

Usage

1.在你想要具备滑动删除功能的ActivityonCreate方法中增加

Slider.INSTANCE$.attachToScreen(this, edge, SlideShadow.FULL);

或者

Slider.INSTANCE$.attachToScreen(this);

2.同时你的Activity对应的Theme需要具有下面的属性

<style name="AppTranslucentTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowBackground">@android:color/transparent</item>
</style>

Members

成员 Github
Kesco https://github.com/kesco
Troy https://github.com/troytang

About

使用Kotlin编写的滑动手势UI库

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 97.9%
  • Java 2.1%