Advertisement
Guest User

Untitled

a guest
May 19th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. class MainActivity : AppCompatActivity() {
  2.  
  3. override fun onCreate(savedInstanceState: Bundle?) {
  4. super.onCreate(savedInstanceState)
  5. setContentView(R.layout.activity_main)
  6.  
  7. recyclerView.apply {
  8. adapter = TagAdapter(tagList)
  9. layoutManager = LinearLayoutManager(this@MainActivity)
  10. }
  11. }
  12.  
  13. private val tagList: MutableList<Tag>
  14. get() {
  15. return mutableListOf(
  16. Tag("Exercise"),
  17. Tag("Be Cool"),
  18. Tag("Floss"),
  19. Tag("Read the Sign"),
  20. Tag("Meditation"),
  21. Tag("Be Cool in an awesome way"),
  22. Tag("Go Crazy")
  23. )
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement