Master OOP languages with tutorials from someone who actually cares if you understand how to write beautiful code:
Java Desktop Programming w/ JavaFX (Intermediate) - https://skl.sh/31pzCa1
Complete Beginner Introduction To Java Programming (Beginner - Intermediate) - https://skl.sh/3fZbjos
Android Apps With Kotlin & Android Studio (Beginner) - https://skl.sh/2ZU6ZT9
Material Design Android Programming w/ Kotlin (Intermediate) - https://skl.sh/2OrwrYZ
All the above courses are available for 2.99 a month via a youtube subscription to this channel too!
/ rkay301
/ wiseassblog
/ wiseass301
rkay301.medium.com/follow
In this part of my 2019 Android Tutorial series, I show you how to build a RecyclerView using ListAdapter, and how to integrate it properly with architecture components such as LiveData, ViewModel, Model-View-ViewModel architecture, and much more.
Timestamps:
0:00 Introduction and how to get the code
3:12 Overview of the layout (XML) files which we use for the RecyclerView and its Items, and setting a LayoutManager declaritively (DON'T SKIP THAT STEP UNLESS YOU SET IT PROGRAMATICALLY)
6:00 Tips on how to figure out design, formatting, padding margins, and so forth for your RecyclerView and its items. Basically, just visit the website below and use whatever specifications they suggest; adjusting for personal taste.
https://material.io/design/components...
7:15 Setting up a DiffUtil and providing a unique identifier for your RecyclerView items (Don't skip this either, you'll need it later)
9:10 Diving in to the source of RecyclerView.Adapter and it's child ListAdapter in order to understand why we bother using ListAdapter and DiffUtil (you can skip from here until 15:05 as it's just me explaining source code; I think you may benefit from learning this though!)
15:05 Implementing our ListAdapter from scratch
15:51 Creating the ViewHolder
17:45 Explanation of how RecyclerView works in general, and why it has the name RecyclerView to begin with
18:21 Creating the class declaration for the Adapter
20:47 An easier and safer way to handle Click Events in the Adapter using LiveData
Check out videos #6 and #7 for more info on LiveData and using Sealed Classes for Events
22:25 Implementing onCreateViewHolder override function (in this function, the adapter inflates the View Holders)
24:32 What is the deal with setting attachToRoot to false for Inflater.inflate()?
25:34 Implementing onBindViewHolder override function
28:09 a brief look at our NoteListEvent Sealed class
29:02 How to avoid Memory Leaks for your RecyclerView and Adapter!!!
30:55 Setting up the Adapter and RecyclerView in the Fragment; listening for Click events from Adapter
32:08 How to actually get your List Data (from the ViewModel) in to the Adapter using ListAdapter.submitList
Repository link:
https://github.com/BracketCove/Jetpac...
Follow the wiseAss Community:
/ wiseassbrand
/ wiseassblog
/ wiseass301
http://wiseassblog.com/
/ ryan-kay-808388114
Support wiseAss here:
https://www.paypal.me/ryanmkay