Skip to content

Latest commit

 

History

History

fragment-ktx

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

fragment-ktx

Version License

A set of extensions in addition to androidx fragment-ktx.


Installation

Add the dependency:

repositories {
    mavenCentral()
    google()
}

dependencies {
    implementation("com.redmadrobot.extensions:fragment-ktx:1.3.6-0")
}

Extensions

Extensions for Fragment:

  • Fragment.addOnBackPressedCallback(enabled: Boolean = true, onBackPressed: OnBackPressedCallback.() -> Unit)

    Create and add a new OnBackPressedCallback tied to Fragment.viewLifecycleOwner that calls onBackPressed in OnBackPressedCallback.handleOnBackPressed.

Contributing

Merge requests are welcome. For major changes, please open an issue first to discuss what you would like to change.