Socheat KHAUV
05/30/2020, 3:54 PMAdam Powell
05/30/2020, 4:00 PMModelList
in a state
, just remember
it.launchInComposition
API; there's some streamlining that could be done in the implementation too 🙂Socheat KHAUV
05/30/2020, 4:26 PMVinay Gaba
05/30/2020, 9:09 PMlaunchInComposition
looks interesting. I’ll try updating them to use it!Socheat KHAUV
05/31/2020, 10:00 AMallan.conda
06/01/2020, 4:13 AMVinay Gaba
06/01/2020, 3:42 PMSocheat KHAUV
06/01/2020, 4:52 PMVinay Gaba
06/01/2020, 4:52 PMallan.conda
06/01/2020, 5:00 PMSocheat KHAUV
06/01/2020, 5:01 PMallan.conda
06/01/2020, 5:14 PMVinay Gaba
06/01/2020, 5:33 PMallan.conda
06/01/2020, 6:34 PMVinay Gaba
06/01/2020, 8:43 PMAndrey Kulikov
06/03/2020, 3:44 PMVinay Gaba
06/03/2020, 3:52 PMallan.conda
06/04/2020, 3:50 AMSocheat KHAUV
06/04/2020, 3:14 PMAdapterList(data = (1..100).map { it }.toList()) { it ->
var a = "test "
onCommit {
val picasso = Picasso.get()
val target = object : Target {
override fun onPrepareLoad(placeHolderDrawable: Drawable?) {
a = "onPrepareLoad"
}
override fun onBitmapFailed(e: Exception?, errorDrawable: Drawable?) {
a = "onBitmapFailed"
}
override fun onBitmapLoaded(bitmap: Bitmap?, from: Picasso.LoadedFrom?) {
a = "onBitmapLoaded"
}
}
picasso
.load("<http://image.tmdb.org/t/p/w185/eifGNCSDuxJeS1loAXil5bIGgvC.jpg>")
.into(target)
}
Text("Loading $a $it")
}
Example 2 - having crush randomly when scroll
AdapterList(data = (1..100).map { it }.toList()) { it ->
var b by state { "test " }
onCommit {
val picasso = Picasso.get()
val target = object : Target {
override fun onPrepareLoad(placeHolderDrawable: Drawable?) {
b = "onPrepareLoad"
}
override fun onBitmapFailed(e: Exception?, errorDrawable: Drawable?) {
b = "onBitmapFailed"
}
override fun onBitmapLoaded(bitmap: Bitmap?, from: Picasso.LoadedFrom?) {
b = "onBitmapLoaded"
}
}
picasso
.load("<http://image.tmdb.org/t/p/w185/eifGNCSDuxJeS1loAXil5bIGgvC.jpg>")
.into(target)
}
Text("Loading $b $it")
}
Exmaple 3 - No Error, I am not why, It is just only 1 line different between example 2 at onBitmapLoaded func
AdapterList(data = (1..100).map { it }.toList()) { it ->
var c by state { "test " }
onCommit {
val picasso = Picasso.get()
val target = object : Target {
override fun onPrepareLoad(placeHolderDrawable: Drawable?) {
c = "onPrepareLoad"
}
override fun onBitmapFailed(e: Exception?, errorDrawable: Drawable?) {
c = "onBitmapFailed"
}
override fun onBitmapLoaded(bitmap: Bitmap?, from: Picasso.LoadedFrom?) {
}
}
picasso
.load("<http://image.tmdb.org/t/p/w185/eifGNCSDuxJeS1loAXil5bIGgvC.jpg>")
.into(target)
}
Text("Loading $c $it")
}
Andrey Kulikov
06/04/2020, 4:36 PMSocheat KHAUV
06/04/2020, 4:54 PMAndrey Kulikov
06/04/2020, 6:45 PM