Created
August 19, 2017 06:06
-
-
Save minibugdev/e48e3c14f72ccf51974822c5b8794341 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 ProductDetailFragment : MFragment() { | |
| companion object { | |
| const val ARG_PRODUCT_ID = "PRODUCT_ID" | |
| const val ARG_SOMETHING = " SOMETHING" | |
| fun badInstance(productId: String, something: String?): ProductDetailFragment { | |
| val bundle = MBundle() | |
| bundle.putString(ARG_PRODUCT_ID, productId) | |
| if (something != null) bundle.putString(ARG_SOMETHING, something) | |
| val fragment = ProductDetailFragment() | |
| fragment.arguments = bundle | |
| return fragment | |
| } | |
| fun badInstance(productId: String): ProductDetailFragment { | |
| return badInstance(productId, null) | |
| } | |
| fun miracleInstance(productId: String, something: String? = null): ProductDetailFragment { | |
| TODO("Make it happen") | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Admin Solution