Status Update
Comments
vi...@google.com <vi...@google.com>
vi...@google.com <vi...@google.com> #2
compose version - 1.7.0-beta02
tv foundation - 1.0.0-alpha10
rv...@google.com <rv...@google.com>
bu...@google.com <bu...@google.com> #3
the older rows getting recomposed while the new lazy row is not. each new item that added to the list causes to each row (expect the new one) to recompose, while some of them getting skipped some components are not.
The main property of Lazy layouts is that it will only compose the items that are in the view. If they are not in the view, they won't be composed. Once you scroll to those items, then they will get composed/re-composed. If you want to compose all the items for whatever reason, consider using Row
or Column
instead (remember this will impact performance a lot if you have a lot of items within the row/columns).
Also and very important unhealthy behavior that you can see in this video you can also see that using 'androidx.tv.material3.Card' library for Card, each focus movement causing recomposition to the card the focus has left and a composition for the incoming card. also by disabling the
cardScale
the behavior stays the same (can be seen in "recomposition on focus tv").
This is expected behaviour. Card scale is not the only property listening to the focus events. There are other properties as well, that are listening to focus events like shape
, colors
, border
. Why do you think this is "unhealthy" behaviour?
Description
please use Modifier.drawWithCache() in
Tv CheckBox
Tv RadioButton
In order to not allocate a Stroke on every draw