-
Notifications
You must be signed in to change notification settings - Fork 730
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
[Android] TextBlocks in a StackPanel are cropped when dimensions are changed #2879
Closed
1 of 12 tasks
Labels
kind/bug
Something isn't working
kind/regression
Something was working, now it isn't
platform/android 🤖
Categorizes an issue or PR as relevant to the Android platform
triage/untriaged
Indicates an issue requires triaging or verification
Comments
carlh98
added
kind/bug
Something isn't working
platform/android 🤖
Categorizes an issue or PR as relevant to the Android platform
triage/untriaged
Indicates an issue requires triaging or verification
kind/regression
Something was working, now it isn't
labels
Mar 25, 2020
@carlh98 |
carldebilly
added a commit
that referenced
this issue
Mar 27, 2020
carldebilly
added a commit
that referenced
this issue
Mar 27, 2020
The problem was caused by a cache in Android layout system. Was appearing when the `DesiredSize` is required to layout an element, like in the `<StackPanel>`. In this case, the `Measure()` were not properly called at the right time, causing the panel (`<StackPanel>` here) to use the previous (wrong) measured/desired size. The fix is to call `ForceLayout()`, causing Android to bypass the cache during the `Measure()` phase.
carldebilly
added a commit
that referenced
this issue
Mar 27, 2020
We must do this because we're using the Mewasure Spec "`AtMost`" instead of "`Exactly`". That was causing the reported bug. Fix #2879
carldebilly
added a commit
that referenced
this issue
Mar 30, 2020
carldebilly
added a commit
that referenced
this issue
Mar 30, 2020
The problem was caused by a cache in Android layout system. Was appearing when the `DesiredSize` is required to layout an element, like in the `<StackPanel>`. In this case, the `Measure()` were not properly called at the right time, causing the panel (`<StackPanel>` here) to use the previous (wrong) measured/desired size. The fix is to call `ForceLayout()`, causing Android to bypass the cache during the `Measure()` phase.
carldebilly
added a commit
that referenced
this issue
Mar 30, 2020
We must do this because we're using the Mewasure Spec "`AtMost`" instead of "`Exactly`". That was causing the reported bug. Fix #2879
carldebilly
added a commit
that referenced
this issue
Mar 31, 2020
…-cache fix(android): Fix for bug #2879
mergify bot
pushed a commit
that referenced
this issue
Mar 31, 2020
(cherry picked from commit ff3a8b1)
mergify bot
pushed a commit
that referenced
this issue
Mar 31, 2020
The problem was caused by a cache in Android layout system. Was appearing when the `DesiredSize` is required to layout an element, like in the `<StackPanel>`. In this case, the `Measure()` were not properly called at the right time, causing the panel (`<StackPanel>` here) to use the previous (wrong) measured/desired size. The fix is to call `ForceLayout()`, causing Android to bypass the cache during the `Measure()` phase. (cherry picked from commit c4dd713)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/bug
Something isn't working
kind/regression
Something was working, now it isn't
platform/android 🤖
Categorizes an issue or PR as relevant to the Android platform
triage/untriaged
Indicates an issue requires triaging or verification
Current behavior
TextBlocks in a StackPanel are cropped horizontally or vertically after dimensions are changed
Expected behavior
TextBlocks in a StackPanel are not cropped when the dimensions are changed
How to reproduce it (as minimally and precisely as possible)
Press the "Click Me" button multiple times to display the red stackpanel on the right (invisible at start)
Sample: TextCropped.zip
Environment
Nuget Package: Uno.UI
Package Version(s): 2.2.0.dev-256
Affected platform(s):
Visual Studio:
Relevant plugins:
Anything else we need to know?
Internal issue:
https://nventive.visualstudio.com/Umbrella/_workitems/edit/177488
The text was updated successfully, but these errors were encountered: