onAttach

open override fun onAttach(context: Context)

This method attaches the fragment to its content which will be called after onCreate() method Since it is overridden method super class implementation must be called.

Parameters

context

: Context to attach the fragment