diff --git a/Source/Fuse.Android/AndroidApp.uno b/Source/Fuse.Android/AndroidApp.uno index 9d7e9f6c8..663734788 100644 --- a/Source/Fuse.Android/AndroidApp.uno +++ b/Source/Fuse.Android/AndroidApp.uno @@ -53,7 +53,7 @@ namespace Fuse Uno.Platform.Displays.MainDisplay.Tick += OnTick; } - + public sealed override IList Children { get { return RootVisual.Children; } @@ -66,6 +66,7 @@ namespace Fuse void OnTick(object sender, Uno.Platform.TimerEventArgs args) { + RootViewport.InvalidateLayout(); try { PropagateBackground(); diff --git a/Source/Fuse.Controls.Native/Fuse.Controls.Native.unoproj b/Source/Fuse.Controls.Native/Fuse.Controls.Native.unoproj index 59d3063b3..91249d905 100644 --- a/Source/Fuse.Controls.Native/Fuse.Controls.Native.unoproj +++ b/Source/Fuse.Controls.Native/Fuse.Controls.Native.unoproj @@ -21,14 +21,13 @@ "Uno.Threading", ], "Projects": [ - "../Fuse.Common/Fuse.Common.unoproj", + "../Fuse.Drawing.Surface/Fuse.Drawing.Surface.unoproj", "../Fuse.Drawing/Fuse.Drawing.unoproj", "../Fuse.Drawing.Planar/Fuse.Drawing.Planar.unoproj", - "../Fuse.Drawing.Surface/Fuse.Drawing.Surface.unoproj", + "../Fuse.Triggers/Fuse.Triggers.unoproj", "../Fuse.Elements/Fuse.Elements.unoproj", "../Fuse.Nodes/Fuse.Nodes.unoproj", - "../Fuse.Platform/Fuse.Platform.unoproj", - "../Fuse.Triggers/Fuse.Triggers.unoproj", + "../Fuse.Common/Fuse.Common.unoproj", ], "Includes": [ "*", diff --git a/Source/Fuse.Controls.Native/NativeRootViewport.uno b/Source/Fuse.Controls.Native/NativeRootViewport.uno index fe61aba6c..d5b44551f 100644 --- a/Source/Fuse.Controls.Native/NativeRootViewport.uno +++ b/Source/Fuse.Controls.Native/NativeRootViewport.uno @@ -21,12 +21,5 @@ namespace Fuse.Controls.Native { _rootView = rootView; } - - extern(Android) - internal override bool IsViewportReady - { - get { return Fuse.Platform.SystemUI.IsReady; } - } - } } \ No newline at end of file diff --git a/Source/Fuse.Nodes/RootViewport.uno b/Source/Fuse.Nodes/RootViewport.uno index 25dfa35b0..6eedbaf5d 100644 --- a/Source/Fuse.Nodes/RootViewport.uno +++ b/Source/Fuse.Nodes/RootViewport.uno @@ -85,15 +85,9 @@ namespace Fuse OnInvalidateLayout(); } - internal virtual bool IsViewportReady - { - get { return true; } - } - protected override void OnInvalidateLayout() { - if (IsViewportReady) - UpdateManager.AddOnceAction(PerformLayout, UpdateStage.Layout); + UpdateManager.AddOnceAction(PerformLayout, UpdateStage.Layout); } void IDisposable.Dispose() diff --git a/Source/Fuse.Platform/Android/SystemUI.uno b/Source/Fuse.Platform/Android/SystemUI.uno index 53b8e1c3c..efb902397 100644 --- a/Source/Fuse.Platform/Android/SystemUI.uno +++ b/Source/Fuse.Platform/Android/SystemUI.uno @@ -81,9 +81,16 @@ namespace Fuse.Platform static public Rect Frame { get { return _frame; } + private set + { + if (Rect.Equals(_frame, value)) + return; + + _frame = value; + OnFrameChanged(); + } } - //Whenever frame changes, includes IsReady status change static public event EventHandler FrameChanged; static private void OnFrameChanged() { @@ -438,21 +445,23 @@ namespace Fuse.Platform @} - static internal bool IsReady { get; private set; } - [Require("Source.Include", "Uno/Graphics/GLHelper.h")] static void cppOnConfigChanged() { extern "GLHelper::SwapBackToBackgroundSurface()"; - + ResetGeometry(); + } + + [Require("Source.Include", "Uno/Graphics/GLHelper.h")] + static void ResetGeometry() + { + extern "GLHelper::SwapBackToBackgroundSurface()"; var density = GetDensity(); var pos = float2(0f, 0f); var size = _GetRootDisplaySize(); var frame = new Rect(pos, size); + Frame = frame; Density = density; - _frame = frame; - IsReady = true; - OnFrameChanged(); } [Foreign(Language.Java)] diff --git a/Source/Fuse.Platform/Fuse.Platform.unoproj b/Source/Fuse.Platform/Fuse.Platform.unoproj index cbb38080f..2490521ab 100644 --- a/Source/Fuse.Platform/Fuse.Platform.unoproj +++ b/Source/Fuse.Platform/Fuse.Platform.unoproj @@ -9,7 +9,6 @@ "Fuse.Views", "Fuse.Android", "Fuse.Common", - "Fuse.Controls.Native", "Fuse.Controls.Panels", "Fuse.Controls.WebView", "Fuse.Elements", diff --git a/Tests/ManualTests/ManualTestingApp/InterceptPanel.uno b/Tests/ManualTests/ManualTestingApp/InterceptPanel.uno deleted file mode 100644 index 71fd4daa1..000000000 --- a/Tests/ManualTests/ManualTestingApp/InterceptPanel.uno +++ /dev/null @@ -1,22 +0,0 @@ -using Fuse; -using Fuse.Controls; -using Fuse.Triggers; - -public class InterceptPanel : LayoutControl -{ - public WhileTrue Invalid { get; set; } - - protected override float2 OnArrangeMarginBox(float2 position, LayoutParams lp) - { - if( lp.Size.X == 0 || lp.Size.Y == 0) { - UpdateManager.AddDeferredAction(MarkInvalid); //defer to not invalidate during layout - } - return base.OnArrangeMarginBox(position, lp); - } - - void MarkInvalid() - { - Invalid.Value = true; - } - -} \ No newline at end of file diff --git a/Tests/ManualTests/ManualTestingApp/TestApp.ux b/Tests/ManualTests/ManualTestingApp/TestApp.ux index 6618c4d9b..1f201c02f 100644 --- a/Tests/ManualTests/ManualTestingApp/TestApp.ux +++ b/Tests/ManualTests/ManualTestingApp/TestApp.ux @@ -2,15 +2,7 @@ - - - - - - - - - + diff --git a/Tests/ManualTests/ManualTestingApp/UnoComponents.unoproj b/Tests/ManualTests/ManualTestingApp/UnoComponents.unoproj index 1bc2de57e..619a24f8b 100644 --- a/Tests/ManualTests/ManualTestingApp/UnoComponents.unoproj +++ b/Tests/ManualTests/ManualTestingApp/UnoComponents.unoproj @@ -28,7 +28,6 @@ "HttpXml/HttpXmlView.ux:UX", "HttpXml/ResultItem.ux.uno:Source", "HttpXml/ResultItem.ux:UX", - "InterceptPanel.uno:Source", "IsEnabled/IsEnabled2.ux:UX", "IsEnabled/IsEnabled.ux.uno:Source", "IsEnabled/IsEnabled.ux:UX",