Skip to content

Instantly share code, notes, and snippets.

@patrick-elmquist
Last active December 16, 2018 20:51
Show Gist options
  • Select an option

  • Save patrick-elmquist/ce6ce62659231608c70ee29461d5eab1 to your computer and use it in GitHub Desktop.

Select an option

Save patrick-elmquist/ce6ce62659231608c70ee29461d5eab1 to your computer and use it in GitHub Desktop.

Revisions

  1. patrick-elmquist revised this gist Dec 16, 2018. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion Show.kt
    Original file line number Diff line number Diff line change
    @@ -1 +1,5 @@
    data class Show(@StringRes val title: Int, @StringRes val description: Int, @DrawableRes val image: Int)
    data class Show(
    @StringRes val title: Int,
    @StringRes val description: Int,
    @DrawableRes val image: Int
    )
  2. patrick-elmquist revised this gist Nov 21, 2018. 1 changed file with 1 addition and 23 deletions.
    24 changes: 1 addition & 23 deletions Show.kt
    Original file line number Diff line number Diff line change
    @@ -1,23 +1 @@
    data class Show(@StringRes val title: Int, @StringRes val description: Int, @DrawableRes val image: Int)

    object ShowRepository {
    fun getAll(): List<Show> {
    return listOf(
    Show(
    R.string.the_grand_tour_title,
    R.string.the_grand_tour_description,
    R.drawable.grandtour
    ),
    Show(
    R.string.daredevil_title,
    R.string.daredevil_description,
    R.drawable.daredevil
    ),
    Show(
    R.string.john_oliver_title,
    R.string.john_oliver_description,
    R.drawable.johnoliver
    )
    )
    }
    }
    data class Show(@StringRes val title: Int, @StringRes val description: Int, @DrawableRes val image: Int)
  3. patrick-elmquist renamed this gist Nov 21, 2018. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions Series.kt → Show.kt
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,19 @@
    data class Series(@StringRes val title: Int, @StringRes val description: Int, @DrawableRes val image: Int)
    data class Show(@StringRes val title: Int, @StringRes val description: Int, @DrawableRes val image: Int)

    object SeriesRepository {
    fun getAll(): List<Series> {
    object ShowRepository {
    fun getAll(): List<Show> {
    return listOf(
    Series(
    Show(
    R.string.the_grand_tour_title,
    R.string.the_grand_tour_description,
    R.drawable.grandtour
    ),
    Series(
    Show(
    R.string.daredevil_title,
    R.string.daredevil_description,
    R.drawable.daredevil
    ),
    Series(
    Show(
    R.string.john_oliver_title,
    R.string.john_oliver_description,
    R.drawable.johnoliver
  4. patrick-elmquist revised this gist Nov 20, 2018. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion Series.kt
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,5 @@ object SeriesRepository {
    R.drawable.johnoliver
    )
    )

    }
    }
  5. patrick-elmquist created this gist Nov 20, 2018.
    24 changes: 24 additions & 0 deletions Series.kt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    data class Series(@StringRes val title: Int, @StringRes val description: Int, @DrawableRes val image: Int)

    object SeriesRepository {
    fun getAll(): List<Series> {
    return listOf(
    Series(
    R.string.the_grand_tour_title,
    R.string.the_grand_tour_description,
    R.drawable.grandtour
    ),
    Series(
    R.string.daredevil_title,
    R.string.daredevil_description,
    R.drawable.daredevil
    ),
    Series(
    R.string.john_oliver_title,
    R.string.john_oliver_description,
    R.drawable.johnoliver
    )
    )

    }
    }