Android App: Make an ArrayList of Objects from a Kotlin Class using Data from Raw Text File

Опубликовано: 19 Октябрь 2024
на канале: Thomas Blum
991
10

This video describes making a simple Kotlin class, just associated properties and a constructor. It reads a raw text file using a buffered reader's readLines() method. It then parses those lines on an additional delimiter (/). It uses that info to instatntiate an object of the class (in this case a Dog). It then adds the dog object to an ArrayList of dogs. The interface has a spinner that shows dog breed names, and then when a user selects a breed the app display the associated information of the correspoding dog object.