Updating a Border.TranslationY does not work in Android #24818
Labels
area-layout
StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter
migration-compatibility
Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
p/2
Work that is important, but is currently not scheduled for release
platform/android 🤖
potential-regression
This issue described a possible regression on a currently supported version., verification pending
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
We have a custom "BottomSheetControl" implemented in Xamarin Forms that works in both iOS and Android. We are portiung it and the rest of the App to MAUI.
I have a repro of the issue in this git repo, https://github.com/munkii/MauiAppBottomSheetIssue
The only change we have made to it is that we have swuicthed from using a Frame to a Border for the elment named "Sheet". This problem existed in MAUI even with Frame.
When the Sheet is "opened" we update the TranslationY. We were animating the value but for the sake of simplicitly during this debugging process I have switched to setting directly.
This approach works fine on an iOS device but in Android the content that has been translated up is not visible. If you navigate to the Border via "Live Visual Tree" you can see that it's TranslateY is 0 as expected.
If you edit the TranslateY to 1 (or any value) the content is immediatly available, if you set it back to 0 it is still fine.
It's as if the Border needs a signal to repaint
Steps to Reproduce
Using the linked repro you can see that the Label in the grid is displayed when you press "Click me" in iOS. Pressing anywhere outside of the Label will cause it to animate away.
Try the same thing in Android and the Label is not visible. Until you fiddle with the TranslateY via the Live Property explorer
Link to public reproduction project repository
https://github.com/munkii/MauiAppBottomSheetIssue
Version with bug
8.0.82 SR8.2
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
No response
The text was updated successfully, but these errors were encountered: