In this Android Studio tutorial we'll filter our list of products using Kotlin's filter helper method. First we'll add two new Buttons to our content_main.xml then add setOnClickListeners to them. In MainActivity we'll create multiple functions for our filters. This refactor helps keep our Android code clean.
We'll show inexpensive products and products owned by Daniel, myself. Click a Button and we'll show just those products and nothing else.
Keeping methods small helps us maintain our codebase. A month from now you'll appreciate how easy it is to add another button, another filter, more products, etc. Enjoy!
Connect with me on LinkedIn! / danielmalone
Смотрите видео Android Studio Tutorial - Part 8 (2020 Edition) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь DJ Malone 10 Апрель 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 19,347 раз и оно понравилось 176 людям.