Address some issues with ResizeableItemFrame
1. Use rememberUpdatedState to remember the resize callback, and ensure we always use the latest one in the event of recomposition. 2. Make sure we clear anchors when the layout info becomes unknown, such as when the item is scrolled out-of-view. 3. Instead of using the index, use a key to locate items. The index may change if the item is moved as part of resizing, which will cause a recomposition. However, the key should remain stable. Bug: 368056517 Test: atest ResizeableItemFrameViewModelTest Flag: EXEMPT component is not yet used anywhere Change-Id: I17d4fc1180866d18bfb61f8de739e794e80da886
Loading
Please register or sign in to comment