https://unsplash.com/photos/DJ7bWa-Gwks
  1. Displays “Unpaid” label at the top right corner of the card view
  2. Displays “Pay” button at the bottom of the card view
  3. Displays due date in “dd-MM-yyyy” format
  1. Displays “Paid” label at the top right corner of the card view
  2. Displays “View” button at the bottom of the card…


https://unsplash.com/photos/t6Wmvbw_MdI
  1. Display items
  2. Handle item clicks
  1. Let’s create our item layout. For this one, let’s assume we will display a list of news articles. …



Photo by Jason Strull on Unsplash


Photo by Dayne Topkin on Unsplash
fun areItemsTheSame(oldItem: Item, newItem: Item): Boolean {
return oldItem.id == newItem.id
}
fun areContentsTheSame(oldItem: Item, newItem: Item): Boolean {
return oldItem.id == newItem.id
}


https://unsplash.com/photos/zNRITe8NPqY

Problem

Workaround

data class Notification(
val id: Int,
var read: Boolean <-- Emphasis on the "var"
...
)


https://unsplash.com/photos/9rClrXXi7ys

Problem

Possible solution

Jermaine Dilao

A Work in Progress Android Developer. You can check me at https://jermainedilao.github.io/.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store