Group Group Group Group Group Group Group Group Group

Android RecyclerView Tutorial with Kotlin | raywenderlich.com

#1

In this Android RecyclerView tutorial, learn how to use Kotlin to display datasets of a large or unknown size!


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1560485-android-recyclerview-tutorial-with-kotlin
#2

Thank you for this tutorial. I believe arrayListOf is the more Kotlin way of declaring the list of Photo objs, rather than ArrayList<Photo> like you recommended.

#3

Thank you for that. You are correct.

#4

Hey ! Your tutorial was really awesome. I loved it but I am having a bit of a problem, When I compile my project, it shows unresolved reference : PhotoHolder. Please help.
Thank you!

#5

Could you give me more information on which version of Android Studio you are using and the exact error message you are seeing?

#6

When running outside USA, the date string will be rejected as it will be out of current acceptable range from NASA server. TimeZone has to be added:

private val calendar: Calendar = Calendar.getInstance(TimeZone.getTimeZone(“America/New_York”))

and dateFormat has to be set to use its time zone in init:

dateFormat.setCalendar(calendar)

#7

Thanks for letting us know!

#8

Hey guys,
In my honest opinion, despite this is a good use case for a real world app, I think it is over complicated for introducing a beginners topic.

Why choose to include networking with API, parsing JSON, etc in a tutorial specific for RecyclerView tutorial?
The data could have been in a local storage and the project could have been much smaller and simpler (by choosing a different kind of data to showcase, like pets)

#9

Using the network calls gives us data to show and since the user doesn’t need to know how to use the API code (it’s already there for them), it can just provide a reference for them if they are interested.