Created
November 11, 2017 12:43
-
-
Save radityagumay/4174c878ef6bfa1674a765e4b45fb899 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 FooFragment : BaseFragment<FooPresenter.View, FooPresenter>() { | |
companion object { | |
fun newInstance(data: Bar): FooFragment { | |
val fragment = FooFragment() | |
val bundle = Bundle() | |
bundle.putParcelable("bar", data) | |
fragment.arguments = bundle | |
return fragment | |
} | |
} | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
presenter.push(arguments.getParcelable<Bar>("bar")) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment