File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Controls/tests/TestCases.Shared.Tests/Tests/Issues Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1- using NUnit . Framework ;
1+ #if ANDROID || IOS
2+ using NUnit . Framework ;
23using UITest . Appium ;
34using UITest . Core ;
45
@@ -22,7 +23,8 @@ public void ScrollViewShouldWorkInRTL()
2223 App . ScrollLeft ( "RTLScrollView" ) ;
2324 App . ScrollRight ( "LTRScrollView" ) ;
2425 }
25- App . WaitForElement ( "Tab5RTL" ) ;
26- App . WaitForElement ( "Tab5LTR" ) ;
26+ Assert . That ( App . FindElement ( "Tab5LTR" ) . GetRect ( ) . X , Is . LessThan ( App . FindElement ( "RTLScrollView" ) . GetRect ( ) . Width * 1.2f ) ) ;
27+ Assert . That ( App . FindElement ( "Tab5RTL" ) . GetRect ( ) . X , Is . GreaterThan ( - 50f ) ) ;
2728 }
28- }
29+ }
30+ #endif
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public override void LayoutSubviews()
5656 // For Right-To-Left (RTL) layouts, we need to adjust the content arrangement and offset
5757 // to ensure the content is correctly aligned and scrolled. This involves a second layout
5858 // arrangement with an adjusted starting point and recalculating the content offset.
59- if ( _previousEffectiveUserInterfaceLayoutDirection is not null && _previousEffectiveUserInterfaceLayoutDirection != EffectiveUserInterfaceLayoutDirection )
59+ if ( _previousEffectiveUserInterfaceLayoutDirection != EffectiveUserInterfaceLayoutDirection )
6060 {
6161 // In mac platform, Scrollbar is not updated based on FlowDirection, so resetting the scroll indicators
6262 // It's a native limitation; to maintain platform consistency, a hack fix is applied to show the Scrollbar based on the FlowDirection.
@@ -78,7 +78,7 @@ public override void LayoutSubviews()
7878 crossPlatformLayout . CrossPlatformArrange ( new Rect ( new Point ( - horizontalOffset , 0 ) , crossPlatformBounds ) ) ;
7979 ContentOffset = new CGPoint ( horizontalOffset , 0 ) ;
8080 }
81- else
81+ else if ( _previousEffectiveUserInterfaceLayoutDirection is not null )
8282 {
8383 ContentOffset = new CGPoint ( 0 , ContentOffset . Y ) ;
8484 }
You can’t perform that action at this time.
0 commit comments