Column{ mainPagesEntries.forEachIndexed { index, page -> HeightSpacer(height = 10.dp) Text(page.title) HeightSpacer(height = 10.dp) Button("Click", onClick = { TODO()}) HeightSpacer(height = 10.dp) Divider(color = dividerColor, height = 0.5.dp) } } } } val mainPagesEntries = listOf( Page("AppBarDemo"), Page("TextDemo"), Page(“ButtonDemo”) } class MyAdapter(private val myDataset: Array<String>) : RecyclerView.Adapter<MyAdapter.MyViewHol der>() { class MyViewHolder(val textView: TextView) : RecyclerView.ViewHolder(textView) override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyAdapter.MyViewHolder { val textView = LayoutInflater.from(parent.context) .inflate(R.layout.my_tex t_view, parent, false) as TextView return MyViewHolder(textView) } override fun onBindViewHolder(holder: MyViewHolder, position: Int) { holder.textView.text = myDataset[position] } override fun getItemCount() = myDataset.size }