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 moresource§impl Debug for ConfigurationRef
impl Debug for ConfigurationRef
source§impl PartialEq for ConfigurationRef
impl PartialEq for ConfigurationRef
impl Eq for ConfigurationRef
impl Send for ConfigurationRef
impl Sync for ConfigurationRef
Auto Trait Implementations§
impl Freeze for ConfigurationRef
impl RefUnwindSafe for ConfigurationRef
impl Unpin for ConfigurationRef
impl UnwindSafe for ConfigurationRef
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more