diff --git a/CHANGELOG.md b/CHANGELOG.md index e445a3b0..a7e81eb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +- Implement `MonitorId::get_dimensions` for Android. + # Version 0.10.1 (2018-02-05) - Added method `os::macos::WindowBuilderExt::with_movable_by_window_background(bool)` that allows to move a window without a titlebar - `with_decorations(false)` diff --git a/src/platform/android/mod.rs b/src/platform/android/mod.rs index 1ebd534b..b559e11a 100644 --- a/src/platform/android/mod.rs +++ b/src/platform/android/mod.rs @@ -161,7 +161,10 @@ impl MonitorId { #[inline] pub fn get_dimensions(&self) -> (u32, u32) { - unimplemented!() + unsafe { + let window = android_glue::get_native_window(); + (ffi::ANativeWindow_getWidth(window) as u32, ffi::ANativeWindow_getHeight(window) as u32) + } } #[inline]