rust-mobile / android-activity

Glue for building Rust applications on Android with NativeActivity or GameActivity
251 stars 49 forks source link

`ContentRectChanged` never getting triggered so `AndroidApp::content_rect` is always zero. #65

Closed ArthurKValladares closed 1 year ago

ArthurKValladares commented 1 year ago

On a winit application. Not sure if I'm missing something to cause the event to get triggered.

rib commented 1 year ago

Hey @ArthurKValladares

By default many config changes simply result in an Android application being restarted instead of notifying you of the change.

It might be that you need to update your manifest to declare that you'd like to get notified about things like orientation and screen size changes without being restarted. See here: https://developer.android.com/guide/topics/resources/runtime-changes

ArthurKValladares commented 1 year ago

Thank you!