SwipeScreenBehavior:一个CoordinatorLayout行为,用于实现滑动屏幕过渡行为

时间:2021-05-12 05:51:51
【文件属性】:
文件名称:SwipeScreenBehavior:一个CoordinatorLayout行为,用于实现滑动屏幕过渡行为
文件大小:1.36MB
文件格式:ZIP
更新时间:2021-05-12 05:51:51
android android-library coordinatorlayout Kotlin 滑动屏幕行为 一个CoordinatorLayout行为,用于实现滑动屏幕过渡行为。 用法 可以通过XML或代码添加此CoordinatorLayout行为。 XML格式 要添加此行为,请将以下行添加到CoordinatorLayout的直接子级中: app:layout_behavior="@string/swipe_behavior" 代码 val layoutParams = constraintLayout.layoutParams as CoordinatorLayout.LayoutParams layoutParams.behavior = SwipeScreenBehavior() 然后在需要关闭屏幕时获取回调,添加以下代码: (layoutParams.behavior as SwipeScreenBehavior).setOnD
【文件预览】:
SwipeScreenBehavior-master
----gradlew.bat(2KB)
----gradlew(5KB)
----example()
--------proguard-rules.pro(751B)
--------src()
--------.gitignore(7B)
--------build.gradle(2KB)
----gradle.properties(2KB)
----screenshots()
--------swipescreenbehavior.gif(1.27MB)
----swipeablescreens()
--------proguard-rules.pro(751B)
--------src()
--------.gitignore(15B)
--------build.gradle(2KB)
----gradle()
--------wrapper()
----.gitignore(86B)
----README.md(1KB)
----settings.gradle(1KB)
----LICENSE.txt(1KB)
----build.gradle(2KB)

网友评论