Skip to content

IOnApplyWindowInsetsListener problem with Android 15. #9505

Open
@gmck

Description

@gmck

Android framework version

net9.0-android

Affected platform version

VS2022 17.12.0 Prev 4.0

Description

Since I worked around the problem I reported in #9244, rather than continuing to develop my app with net8-android, I thought I would look at the issues I might hit when moving to net9.0-android35 with a test project. Going edge-to-edge will mean reworking Material3 themes, especially since Android has not only deprecated but removed both SetStatusBarColor() and SetNavigationBarColor() from Android 15.

I encountered bizarre behaviour when closing the fragment when trying to get edge-to-edge to work correctly with a fragment containing a RecylerView on all devices Api 29 - 35. To get around the problem, I had to create a method to determine what mode of Navigation was being used, i.e. Gesture or 3-button.

I’m not sure if this should be classified as a bug, but as I’ve never had that requirement previously with any other IOnApplyWindowInsetsListener or read about any such requirement in the Android 15 docs, I thought I should raise it as an issue here.

The test project is at https://github.com/gmck/NavigationGraph9Net9. The readme explains the bizarre closing behaviour and the new method for circumventing it.

Steps to Reproduce

See the test project above.

Did you find any workaround?

Yes

Relevant log output

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: BindingsIssues in Java Library Binding projects.need-attentionA xamarin-android contributor needs to review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions