Mike Palarz
12/08/2018, 9:35 PMval fragmentManager = supportFragmentManager
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val sectionsFragment: SectionsFragment? = SectionsFragment()
fragmentManager.beginTransaction()
.add(R.id.activity_main_fragment_container, sectionsFragment)
.commit()
}
I get the error that:
None of the following functions can be called with the arguments supplied:
public abstract fun add(p0: Fragment!, p1: String!): FragmentTransaction! defined in android.support.v4.app.FragmentTransaction
public abstract fun add(@IdRes p0: Int, p1: Fragment!): FragmentTransaction! defined in android.support.v4.app.FragmentTransaction
I've just started using Kotlin. However, I can't recall what Fragment!
indicates... Would anyone have any insight into this?