Android Studio Tutorial - Part 7 (2020 Edition)

Published: 08 April 2020
on channel: DJ Malone
13,833
136

Let's learn about Kotlin classes and files in Android Studio. In this tutorial we'll filter our list by cost and owner, using an if statement to construct our expression. We can use && and/or || to filter down our products. For example, we can do if it.cost is less than $200 then display that product, otherwise hide it.

I write at least dozens of if statements every day at my job and I bet you will too. Our if statement will go inside forEach loop so the statement is applied to each product.

This will become useful as we filter down data for our RecyclerView which we'll (hopefully) learn about in the next video. Android app development is fun and I hope you also like it.

Code for this tutorial can be found on GitHub, view the code and download the zip from this URL: https://github.com/danielmalone/Andro...

The above GitHub link contains direct links to every tutorial in this series. If you ever get lost click this link to see the entire codebase at the point each tutorial was recorded: https://github.com/danielmalone/Andro...

If you have questions about Kotlin lists, if statements, companion objects or want to know more about anything specific leave me a comment below. Enjoy :)

Connect with me on LinkedIn!   / danielmalone  


Watch video Android Studio Tutorial - Part 7 (2020 Edition) online without registration, duration hours minute second in high quality. This video was added by user DJ Malone 08 April 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 13,833 once and liked it 136 people.