-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Android: Basic support configuration changes #7435
Conversation
To support viewmodel and proper lifecycle management, the main activity now derives from AppCompatActivity. This made the ResourceDesigner.cs file to grow quite large. |
You can test this PR using the following package version. |
Note that xamarin sdk will be replaced soon |
Ok, that would make it much easier to build on linux. |
You can test this PR using the following package version. |
What's the status on that PR and it's dependency? Will they be merged soon? |
@emmauss #6922 PR is blocked by #7347, which is blocked by #5831. We plan to have all of these changes for next major release. |
I'll rebase over your PR as the Xamarin SDK has a few thing that makes working with it harder, compared to the dotnet sdk. Also, the dotnet sdk added support for android on linux on the preview |
rebased over #6922 . |
2aa7d3d
to
d105504
Compare
You can test this PR using the following package version. |
PR ready for review |
You can test this PR using the following package version. |
What does the pull request do?
This add basic support for configuration changes, enough to prevent recreating the main activities when such changes occur, such as rotating the device. Only orientation change and resizing are handled.
Also, removes the view from logical tree when the activity is destroyed due to an unhandled configuration change, or by the os due to resource constraints. When the activity is recreated, the view is restored from the viewmodel. There is a rendering bug that occurs after recreating the activity, when the screen is black, and updates to the scene will only make it show the background with outlines of some controls, This requires further investigation.
What is the current behavior?
Currently, rotating the device will cause the activity to be recreated, which causes the bug noted above.
What is the updated/expected behavior with this PR?
Rotating the device will only update the size of the main view
How was the solution implemented (if it's not obvious)?
Checklist
Fixed issues