Skip to content

Commit

Permalink
add fun proxyFragmentFactory/setupReportFragmentManager in Fragivity
Browse files Browse the repository at this point in the history
see: #51
  • Loading branch information
qdsfdhvh committed Aug 13, 2021
1 parent 4e97853 commit f11f680
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions library/src/main/java/com/github/fragivity/Fragivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,27 @@ package com.github.fragivity

import android.os.Bundle
import androidx.arch.core.util.Function
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.Fragment
import androidx.fragment.app.*
import androidx.navigation.fragment.NavHostFragment
import com.github.fragivity.dialog.showDialog

object Fragivity {

@JvmStatic
fun proxyFragmentFactory(activity: FragmentActivity) {
activity.proxyFragmentFactory()
}

@JvmStatic
fun proxyFragmentFactory(manager: FragmentManager) {
manager.proxyFragmentFactory()
}

@JvmStatic
fun setupReportFragmentManager(navHost: NavHostFragment) {
navHost.setupReportFragmentManager()
}

@JvmStatic
fun <T : Fragment> loadRoot(
navHost: NavHostFragment,
Expand Down

0 comments on commit f11f680

Please sign in to comment.