Last active
January 24, 2020 02:57
-
-
Save danielmalone/c9facd9338082c22136de8aa0974a256 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.danielmalone.podcast | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.recyclerview.widget.LinearLayoutManager | |
import kotlinx.android.synthetic.main.activity_main.* | |
import kotlinx.android.synthetic.main.content_main.* | |
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
setSupportActionBar(toolbar) | |
val podcasts = | |
listOf( | |
Podcast("What's up with Justin Bieber?", "145 minutes"), | |
Podcast("Taylor Swift giving me a blank space", "145 minutes"), | |
Podcast("Is Nick Jonas a Sucker?", "145 minutes"), | |
Podcast("Is Christmas music real?", "145 minutes"), | |
Podcast("Why am I overthinking these podcasts?", "145 minutes"), | |
Podcast("Is Comedy the Answer?", "145 minutes"), | |
Podcast("But don't we need more Podcasts?", "145 minutes"), | |
Podcast("I'm running out of things to say", "145 minutes"), | |
Podcast("How about one more?", "145 minutes") | |
) | |
podcastEpisodes.apply { | |
layoutManager = LinearLayoutManager(this@MainActivity) | |
adapter = PodcastsAdapter(podcasts) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment