Struct android_activity::ConfigurationRef
source · pub struct ConfigurationRef { /* private fields */ }Expand description
A (cheaply clonable) reference to this application’s ndk::configuration::Configuration
This provides a thread-safe way to access the latest configuration state for
an application without deeply copying the large ndk::configuration::Configuration struct.
If the application is notified of configuration changes then those changes will become visible via pre-existing configuration references.
Implementations§
source§impl ConfigurationRef
impl ConfigurationRef
pub fn copy(&self) -> Configuration
sourcepub fn country(&self) -> Option<String>
pub fn country(&self) -> Option<String>
Returns the country code, as a String of two characters, if set
sourcepub fn density(&self) -> Option<u32>
pub fn density(&self) -> Option<u32>
Returns the screen density in dpi.
On some devices it can return values outside of the density enum.
Returns keyboard visibility/availability.
sourcepub fn language(&self) -> Option<String>
pub fn language(&self) -> Option<String>
Returns the language, as a String of two characters, if a language is set
sourcepub fn layout_direction(&self) -> LayoutDir
pub fn layout_direction(&self) -> LayoutDir
Returns the layout direction
pub fn orientation(&self) -> Orientation
pub fn screen_height_dp(&self) -> Option<i32>
pub fn screen_width_dp(&self) -> Option<i32>
pub fn screen_long(&self) -> ScreenLong
pub fn screen_size(&self) -> ScreenSize
pub fn sdk_version(&self) -> i32
pub fn smallest_screen_width_dp(&self) -> Option<i32>
pub fn touchscreen(&self) -> Touchscreen
pub fn ui_mode_night(&self) -> UiModeNight
pub fn ui_mode_type(&self) -> UiModeType
Trait Implementations§
source§impl Clone for ConfigurationRef
impl Clone for ConfigurationRef
source§fn clone(&self) -> ConfigurationRef
fn clone(&self) -> ConfigurationRef
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more