Chachako
04/24/2021, 6:59 PMLazyColumn
. I compared it today to RecyclerView
and it's really bad...Halil Ozercan
04/24/2021, 8:38 PMLazyColumn
and those will sure continue. The best thing we developers can do is sharing our findings with the team. Would you be able to share your comparison code with the RecyclerView
?romainguy
04/24/2021, 9:15 PMSamir Basnet
04/25/2021, 12:18 AMTimo Drick
04/25/2021, 12:30 AMChachako
04/25/2021, 5:27 AMRecyclerView
(1) and LazyColumn
(2) respectively.
Just fill the LazyColumn
with a randomly generated list:
val tests by lazy {
(0..400).map {
val length = (2..15).random()
val allowedChars = ('A'..'Z') + ('a'..'z') + ('0'..'9')
val prefix = if (length < 5) "." else ""
val suffix = if (length > 7) ".${(1..5).map { allowedChars.random() }}" else ""
val name = prefix + (1..length)
.map { allowedChars.random() }
.joinToString("") + suffix
val isDirectory = (0..1).random() == 1
FileItem(
name = name,
time = abs(System.currentTimeMillis() - Random().nextLong()).asMilliInstant().format("yyyy-MM-dd HH:mm"),
size = (0L..1855425871872L).random().toReadableSize(),
isDirectory = isDirectory
)
}
}