Created
March 10, 2019 06:42
-
-
Save fornewid/e2c5772c26913ea25b6291869614aa30 to your computer and use it in GitHub Desktop.
Navigation 훑어보기_1
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
// Generated by Navigation Architecture Components. | |
class SecondFragmentDirections private constructor() { | |
private data class ActionToThird(val label: String?) : NavDirections { | |
override fun getActionId(): Int = R.id.action_to_third | |
@Suppress("CAST_NEVER_SUCCEEDS") | |
override fun getArguments(): Bundle { | |
val result = Bundle() | |
if (Parcelable::class.java.isAssignableFrom(String::class.java)) { | |
result.putParcelable("label", this.label as Parcelable?) | |
} else if (Serializable::class.java.isAssignableFrom(String::class.java)) { | |
result.putSerializable("label", this.label as Serializable?) | |
} else { | |
throw UnsupportedOperationException(String::class.java.name +" 생략.") | |
} | |
return result | |
} | |
} | |
companion object { | |
fun actionToThird(label: String?): NavDirections = | |
ActionToThird(label) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment