Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
/ DialogPro Public archive

Dialog contains multiple fragments which can be explored by swiping.

License

Notifications You must be signed in to change notification settings

stevelukis/DialogPro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DialogPro

Dialog contains multiple fragments which can be explored by swiping.

Example

Implementation

Add this depedency in your app level gradle file :

dependencies {
    ...
    implementation 'com.stevelukis.dialogpro:Dialog-Pro:1.0.0'
    ...
}

Flag

There are two flags available.

  • FLAG_KEEP This is the default flag. The fragments will be kept in memory after being swiped through. Suitable if you only have a few fragments.
  • FLAG_DESTROY_IMMEDIATELY The fragments will be removed from memory after being swiped through. Suitable if you have a lot of fragments.

Usage

Kotlin

DialogPro()
        .setFlag(DialogPro.FLAG_KEEP) // setting the flag
        .setFragments(fragments) // passing an array of Fragment
        .setOnPageSelectedListener(object : OnPageSelectedListener {
             override fun onPageSelected(pagePosition: Int) {
                   // logic
             }
        }) // implementing the listener
        .show(this) //showing the dialog

Java

new DialogPro()
        .setFlag(DialogPro.FLAG_KEEP) // setting the flag
        .setFragments(fragments) // passing an array of Fragment
        .setOnPageSelectedListener(new OnPageSelectedListener() {
             override fun onPageSelected(int pagePosition) {
                   // logic
             }
        }) // implementing the listener
        .show(this); //showing the dialog

About

Dialog contains multiple fragments which can be explored by swiping.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published