Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PullDownLayout is a small library that allows you to implement a view that can be dragged down your layout. PullDownLayout can also be used to implement Pull-To-Dismiss feature for your activities and fragments.

NotificationsYou must be signed in to change notification settings

tizisdeepan/pulldownlayout

Repository files navigation

License

Screenshot 2

What is Pull Down Layout?

PullDownLayout is a small library that allows you to implement a view that can be dragged down your layout. PullDownLayout can also be used to implement Pull-To-Dismiss feature for your activities and fragments.

Implementation

[1] In your app module gradle file

dependencies {    implementation'com.github.tizisdeepan:pulldownlayout:1.0.0'}

[2] In your project level gradle file

allprojects {    repositories {        maven { url'https://jitpack.io' }    }}

[3] Use PullBackLayout in your layout.xml

<com.layout.pulldown.PullDownLayoutandroid:id="@+id/pullDown"android:layout_width="match_parent"android:layout_height="wrap_content"><!--Your Views--></com.layout.pulldown.PullDownLayout>

[4] Set Callback for PullBackLayout in your Activity or Fragment

classFragmentClass:Fragment(), PullDownLayout.Callback {overridefunonPullStart() {    }overridefunonPull(progress:Float) {    }overridefunonPullCancel() {    }overridefunonPullComplete() {        (ctxasMainActivity).onBackPressed()    }...overridefunonViewCreated(view:View,savedInstanceState:Bundle?) {super.onViewCreated(view, savedInstanceState)        pullDown.setCallback(this)    }}

Note: Check out sample project for cool pull down transitions.

And that's it! You have now successfully implemented a cool PullDownLayout for your android project!

About

PullDownLayout is a small library that allows you to implement a view that can be dragged down your layout. PullDownLayout can also be used to implement Pull-To-Dismiss feature for your activities and fragments.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp