Closed Diy2210 closed 4 years ago
@Diy2210 widget creation called only on create of Table item, but when UITableView/RecyclerView reuse already created item you got notification in data: LiveData<StatusModel>
, so you should use not image = const(image)
but image = data.map { .... }
where in map you convert StatusModel
to correct Image
Cool!!! All works! TNX!!!
upd code:
result:
@Diy2210 instead of data.value
use it
- already passed into lambda
@Diy2210 instead of
data.value
useit
- already passed into lambda
OK, TNX again!!!
Hi, how I can check value in override fun createWidget like if/else or something like that and select one or another image.
I use List Widget and Table Units:
My ListWidget:
Fun Table Units:
My class Unit Items where I make image:
Result: