Slide 64
Slide 64 text
// StartDestinationͷΓํ
private enum class Action {
TOP, SEARCH_RESULT, DETAIL, TOPIC_DETAIL
}
companion object {
fun createTopIntent(context: Context) =
Intent(context, CommunityActivity::class.java).apply {
putExtra(CommunityActivity::action.name, Action.TOP)
}
fun createSearchResultIntent(context: Context) =
Intent(context, CommunityActivity::class.java).apply {
putExtra(CommunityActivity::action.name, Action.SEARCH_RESULT)
}
fun createDetailIntent(context: Context) =
Intent(context, CommunityActivity::class.java).apply {
putExtra(CommunityActivity::action.name, Action.DETAIL)
}
fun createTopicDetailIntent(context: Context) =
Intent(context, CommunityActivity::class.java).apply {
putExtra(CommunityActivity::action.name, Action.TOPIC_DETAIL)
}
} 64