Listener registration not working in fragment to D...
# codereview
a
Listener registration not working in fragment to Dialog fragment communication. Am I missing anything for registration ?
Copy code
override fun onAttach(context: Context) {
    AndroidSupportInjection.inject(this)
    super.onAttach(context)
    if (context is Listener) {
      listener = context
    }
  }

  override fun onDetach() {
    super.onDetach()
    listener = null
  }
d
Fragment is not a context iirc.