How can I get the context in a fragment?
I need to use my database whose constructor takes in the context, but getApplicationContext() and Fragmen
getApplicationContext()
Fragmen
With API 29+ on Kotlin, I had to do
activity?.applicationContext!!
An example would be
ContextCompat.getColor(activity?.applicationContext!!, R.color.colorAccent),