Skip to content

Instantly share code, notes, and snippets.

@sajjadyousefnia
Created July 18, 2018 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sajjadyousefnia/42aab8f7b39667e8e5e1cf65c15b6ea1 to your computer and use it in GitHub Desktop.
Save sajjadyousefnia/42aab8f7b39667e8e5e1cf65c15b6ea1 to your computer and use it in GitHub Desktop.
// روش معمول
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