Skip to content

Instantly share code, notes, and snippets.

@AhmedNMahran
Last active March 28, 2021 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AhmedNMahran/706d94e7a7f5cbc7ecb12b3cfb22322e to your computer and use it in GitHub Desktop.
Save AhmedNMahran/706d94e7a7f5cbc7ecb12b3cfb22322e to your computer and use it in GitHub Desktop.
class SampleListActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
setContentView(R.layout.list_activity)
val customAdapter = CustomAdapter(
arrayOf("item 1", "item2",...)
)
val recyclerView: RecyclerView =
findViewById(R.id.recycler_view)
recyclerView.adapter = customAdapter
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment