Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// روش معمول
fun createInstance(args: Bundle) : MyFragment {
val fragment = MyFragment()
fragment.arguments = args
return fragment
}
// روش پیشرفته
fun createInstance(args: Bundle)
= MyFragment().apply { arguments = args }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment