

The benefit of these manufacturer-agnostic APIs is that they respond to both hardware attributes and device posture to give your code a hint about what the user is trying to accomplish.

IsSeparating – Boolean if the hinge or fold is acting as a separator on the screen.Bounds – Rectangle that defines the coordinates of the hinge or fold.We are only interested in FoldingFeature instances for the purposes of updating layouts for dual-screen and foldable devices.

DisplayFeatures – Collection of features available for the device.MaximumWindowMetrics – Rectangle that represents the full size of the device screen.CurrentWindowMetrics – Rectangle that represents the current size of the application window.You can add the -1.0.0-alpha07 NuGet to your Android project in Visual Studio, and incorporate dual-screen and foldable support that works on a variety of different devices. The Xamarin.Android samples have been updated to use the WindowJava NuGet – changes to the underlying API are reflected in the code changes in this pull request. This package is better suited to Xamarin binding and is available in the NuGet. UPDATE: on August 18th, 2021 Google released beta01 of the Jetpack Window Manager package, which is bound in the NuGets.Īs part of the latest release, Google added a WindowJava package for better backwards compatibility. Window Manager is now available to test with Xamarin.Android apps via a prerelease NuGet. We’ve discussed Window Manager in previous blog posts – it’s an AndroidX library that brings dual-screen and foldable support to Android, across a variety of devices including Microsoft Surface Duo.
