You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.1. Put ARG as fragment argument with bundle.putParcelable(FRAGMENT_ARG, arg)
constvalFRAGMENT_ARG="FRAGMENT_ARG"inlinefun <ARG:Parcelable, reified T:BaseFragment<ARG>> newFragment(arg:ARG? = null): T {
val fragment =T::class.java.newInstance()
val bundle =Bundle()
bundle.putParcelable(FRAGMENT_ARG, arg)
fragment.arguments = bundle
return fragment
}
If I have no arguments, then this will crash at the
!!
, no?