Skip to content

Instantly share code, notes, and snippets.

@RafaRuiz
Last active January 4, 2018 15:57
Show Gist options
  • Select an option

  • Save RafaRuiz/7976398431c4c4bea3128dfc34d5c3ad to your computer and use it in GitHub Desktop.

Select an option

Save RafaRuiz/7976398431c4c4bea3128dfc34d5c3ad to your computer and use it in GitHub Desktop.
Initial Code
class SimpleListActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_simple_list)
ButterKnife.bind(this)
}
companion object {
val SIMPLE_LIST_KEY = "SIMPLE_LIST_KEY"
fun goToSimpleListActivity(context: Context, content: ArrayList<String>) {
context.startActivity(
Intent(context, SimpleListActivity::class.java)
.putExtra(SIMPLE_LIST_KEY, content)
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment