Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix disappearing cell issue for TableView on Android #19723

Merged
merged 1 commit into from Jan 9, 2024

Conversation

hartez
Copy link
Contributor

@hartez hartez commented Jan 5, 2024

Description of Change

Disables the native cell recycling mechanisms in favor of the renderer/handler reuse that's already built into .NET MAUI. Adds special casing to ensure that the behavior changes only apply to TableView; similar problems may exist in ListView, but that's beyond the scope of this change.

The native cell recycling relies on information that TableView was providing unreliably, and the old implementation of GetView() was removing cell contents from existing layouts so it could add the content to layouts it was measuring - this occasionally results in cells simply disappearing after they've been laid out. These changes clean up that implementation so that the cell content shifting no longer happens.

These changes also break down the TableView's cell creation methods for easier maintenance.

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho
Copy link
Member

rmarinho commented Jan 8, 2024

/Users/builder/azdo/_work/2/s/src/Compatibility/ControlGallery/src/Issues.Shared/Github6384.cs(76,48): error CS0234: The type or namespace name 'FailsOnMauiiOSAttribute' does not exist in the namespace 'Microsoft.Maui.Controls.Compatibility.UITests' (are you missing an assembly reference?) [/Users/builder/azdo/_work/2/s/src/Compatibility/ControlGallery/test/Android.UITests/Compatibility.ControlGallery.Android.UITests.csproj]

trying to run ControlGallery, can you rebase?

@PureWeen
Copy link
Member

PureWeen commented Jan 8, 2024

/rebase

Disables the native cell recycling mechanisms in favor of the renderer/handler reuse that's already built into
.NET MAUI. Adds special casing to ensure that the behavior changes only apply to TableView; similar problems may
exist in ListView, but that's beyond the scope of this change.

These changes also break down the TableView's cell creation methods for easier maintenance.
@github-actions github-actions bot force-pushed the fix-tableview-disappearing-cells branch from 0321b7b to 3e9152f Compare January 8, 2024 15:40
@rmarinho rmarinho merged commit 7af421e into main Jan 9, 2024
47 of 48 checks passed
@rmarinho rmarinho deleted the fix-tableview-disappearing-cells branch January 9, 2024 16:26
@janusw
Copy link
Contributor

janusw commented Jan 10, 2024

Thanks a lot for this PR, @hartez!

Two short questions: Does it actually fix #5924? And am I right in assuming that it will be included in the next MAUI 8 release?

@janusw janusw mentioned this pull request Jan 18, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants