All Projects → sjthn → SwipeScreenBehavior

sjthn / SwipeScreenBehavior

Licence: MIT license
A CoordinatorLayout Behavior for implementing swipe screen transition behavior.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to SwipeScreenBehavior

NestedScrollingDemo
😋😋😋A good app for understanding android nested scrolling
Stars: ✭ 98 (+262.96%)
Mutual labels:  coordinatorlayout
Learn Coordinatorlayout Behavior
CoordinatorLayout 自定义Behavior 高仿美团商家详情界面 实现页面内容复杂联动效果
Stars: ✭ 527 (+1851.85%)
Mutual labels:  coordinatorlayout
Coordinatorexamples
Different CoordinatorLayout usages, tips & examples
Stars: ✭ 1,273 (+4614.81%)
Mutual labels:  coordinatorlayout
ELeMaList
仿饿了么商品列表页面
Stars: ✭ 43 (+59.26%)
Mutual labels:  coordinatorlayout
Coordinatortablayout
Combination of TabLayout and CoordinatorLayout./TabLayout和CoordinatorLayout相结合的折叠控件
Stars: ✭ 4,114 (+15137.04%)
Mutual labels:  coordinatorlayout
Titlebar
Android 标题栏框架,从此布局属性不用记
Stars: ✭ 980 (+3529.63%)
Mutual labels:  coordinatorlayout
CoolCoodinatorLayout
banner沉浸式+滚动视差+悬浮搜索框+标题置顶复杂联动效果
Stars: ✭ 46 (+70.37%)
Mutual labels:  coordinatorlayout
Alipayhome
高仿支付宝首页的头部伸缩动画(使用design实现效果,CoordinatorLayout+AppBarLayout+CollapsingToolbarLayout+Toolbar)
Stars: ✭ 164 (+507.41%)
Mutual labels:  coordinatorlayout
Simple View Behavior
Simple and easy way to deal with CoordinatorLayout Behavior
Stars: ✭ 434 (+1507.41%)
Mutual labels:  coordinatorlayout
Pinnedrecyclerview Android
Add a list pinned by a floating label (text or image)
Stars: ✭ 81 (+200%)
Mutual labels:  coordinatorlayout
React Native Collapsing Toolbar
react-native wrapper for android CollapsingToolbarLayout
Stars: ✭ 280 (+937.04%)
Mutual labels:  coordinatorlayout
Scalinglayout
With Scaling Layout scale your layout on user interaction.
Stars: ✭ 3,276 (+12033.33%)
Mutual labels:  coordinatorlayout
Coordinatorlayout.forms
CoordinatorLayout for Xamarin.Forms
Stars: ✭ 73 (+170.37%)
Mutual labels:  coordinatorlayout
KeepSafeNew
Sample app to demonstrate MVP (Model - View - Presenter), Android Architecture Components (Room Persistence, LiveData), RxJava2, ButterKnife in Android.
Stars: ✭ 58 (+114.81%)
Mutual labels:  coordinatorlayout
Instagramphotopicker
Photo-picker like Instagram
Stars: ✭ 144 (+433.33%)
Mutual labels:  coordinatorlayout
react-native-nested-scroll-view
react-native wrapper for android NestedScrollView
Stars: ✭ 77 (+185.19%)
Mutual labels:  coordinatorlayout
Materialdesignsamples
Material Design 系列控件samples,讲了Material Design 系列新控件的使用方法和一些场景示例,使用详情请看对应博客,持续更新中...
Stars: ✭ 900 (+3233.33%)
Mutual labels:  coordinatorlayout
Bottomsheetcoordinatorlayout
A handy CoordinatorLayout that works well when used in a bottom sheet, even with AppBarLayouts inside.
Stars: ✭ 241 (+792.59%)
Mutual labels:  coordinatorlayout
Coordinatormenu
The library creates a floating menu like the app momo, vtcpay, wepay
Stars: ✭ 160 (+492.59%)
Mutual labels:  coordinatorlayout
Mao Rn Android Kit
⚙️ Android Native (ui components and modules) wrap in React Native
Stars: ✭ 74 (+174.07%)
Mutual labels:  coordinatorlayout

Swipe Screen Behavior

A CoordinatorLayout Behavior for implementing swipe screen transition behavior.

screenshot

Usage

This CoordinatorLayout Behavior can be added either through XML or code.

XML

To add this Behavior, add the following line to the direct child of the CoordinatorLayout:

app:layout_behavior="@string/swipe_behavior"

Code

val layoutParams = constraintLayout.layoutParams as CoordinatorLayout.LayoutParams
layoutParams.behavior = SwipeScreenBehavior<ConstraintLayout>()

Then to get a callback when the screen needs to be dismissed add the below code:

(layoutParams.behavior as SwipeScreenBehavior).setOnDismissListener(object : SwipeCallback {
    override fun dismissListener(parent: View?) {
        exitActivity(parent)
    }
})

Install

Maven

<dependency>
  <groupId>com.sjthn.swipeablescreens</groupId>
  <artifactId>swipeablescreens</artifactId>
  <version>1.0.0</version>
  <type>pom</type>
</dependency>

Gradle

implementation 'com.sjthn.swipeablescreens:swipeablescreens:1.0.0'

Sample

Checkout the sample project for how this works.

License

MIT License

Copyright (c) 2018 Srijith
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].