Skip to content
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

[dualscreen] project/nuget for Surface Duo and other Android foldables #5020

Merged
merged 89 commits into from
Apr 5, 2022

Conversation

conceptdev
Copy link
Contributor

@conceptdev conceptdev commented Mar 2, 2022

Description of Change

Provides .NET MAUI support for Android dual-screen and foldable devices (eg. Surface Duo, Galaxy Fold). Builds upon the APIs previously available in Xamarin.Forms. The underlying support for hinge detection and angle should be a no-op on non-Android devices, but TwoPaneView will still work with configurable/proportional layout.

  • Adds .NET MAUI Controls.Foldable project - contains two main user-classes which keep the same name as the previous Xamarin version but with MAUI namespaces:
    • Microsoft.Maui.Controls.Foldable.TwoPaneView control
    • Microsoft.Maui.Foldable.DualScreenInfo class
    • Introduces a new initialization method - replace Init call with .UseFoldable() host builder extension
    • WindowJava NuGet dependency replaces DuoSDK and Xamarin.Forms.DualScreen
  • Adds Pages/Others/TwoPaneViewPage.xaml to the Maui.Controls.Sample app
    • Initialization via .UseFoldable() in Maui.Controls.Sample.MauiProgram (Startup.cs)

Issues Fixed

Fixes #1752 Make DualScreen controls work in MAUI
Fixes #1753 Update DualScreen controls to use new Jetpack Window Manager on Android

Notes

A few outstanding inconsistencies currently being addressed:

  • Initial view across a hinge does not detect the hinge
  • Unspanning app (on Surface Duo) or exiting multi-window mode (Galaxy Fold) does not redraw the second pane correctly
  • SpanMode on Sample.SingleProject test page does not get updated after spanning

Questions

  • Should we rename DualScreenInfo to FoldableInfo? Feels like a low impact change either way and without a strong reason to change it, easier to leave as-is and keep the 'backwards compat' associated with the original name...

cc @PureWeen

conceptdev and others added 30 commits October 13, 2021 14:50
Other > Dual Screen
based on changes in dotnet#3213 where APIs moved to Essentials
@dotnet dotnet deleted a comment from azure-pipelines bot Mar 24, 2022
@dotnet dotnet deleted a comment from azure-pipelines bot Mar 24, 2022
@dotnet dotnet deleted a comment from azure-pipelines bot Mar 24, 2022
@dotnet dotnet deleted a comment from azure-pipelines bot Mar 24, 2022
@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@dotnet dotnet deleted a comment from azure-pipelines bot Mar 24, 2022
@dotnet dotnet deleted a comment from azure-pipelines bot Mar 24, 2022
@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Apr 4, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Apr 4, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Apr 5, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@PureWeen PureWeen merged commit bef74cc into dotnet:main Apr 5, 2022
mattleibow added a commit that referenced this pull request Apr 7, 2022
Temporary removing the two pane page from the sample from #5020. Something is causing the build to fail with GENERATEPROJECTPRIFILE : error : PRI175: 0x80073b0f - Processing Resources failed with error: Duplicate Entry.
mattleibow added a commit that referenced this pull request Apr 7, 2022
Temporary removing the two pane page from the sample from #5020. Something is causing the build to fail with GENERATEPROJECTPRIFILE : error : PRI175: 0x80073b0f - Processing Resources failed with error: Duplicate Entry.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@samhouts samhouts added the fixed-in-6.0.300-rc.2 Look for this fix in 6.0.300-rc.2! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-6.0.300-rc.2 Look for this fix in 6.0.300-rc.2! legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Update DualScreen controls to use new Window Jetpack on Android Make DualScreen controls work in MAUI
8 participants