Created
November 5, 2020 13:40
-
-
Save svinouze/d3c7b688d27c68082822ce773156b1ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FabulousActivity : Activity(), FabulousListener { | |
companion object { | |
fun newIntent(context: Context): Intent = Intent(context, FabulousActivity::class.java) | |
} | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
// Commit FabulousFragment instance into FragmentManager | |
} | |
override fun onAttachFragment(fragment: Fragment) { | |
super.onAttachFragment(fragment) | |
when (fragment) { | |
is FabulousListener -> fragment.listener = this | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment