pub struct AndroidPlatform { /* private fields */ }Expand description
Android platform bridge.
In production, each method will call through JNI to the Kotlin/Java layer. For now, we maintain an in-memory view registry for testing and development.
Implementations§
Source§impl AndroidPlatform
impl AndroidPlatform
pub fn new() -> Self
pub fn with_screen(self, width: f32, height: f32, scale: f32) -> Self
pub fn view_count(&self) -> usize
Trait Implementations§
Source§impl Default for AndroidPlatform
impl Default for AndroidPlatform
Source§impl PlatformBridge for AndroidPlatform
impl PlatformBridge for AndroidPlatform
fn platform_id(&self) -> PlatformId
fn create_view(&self, view_type: ViewType, node_id: NodeId) -> NativeHandle
fn update_view( &self, handle: NativeHandle, _props: &PropsDiff, ) -> Result<(), PlatformError>
fn remove_view(&self, handle: NativeHandle)
fn insert_child(&self, parent: NativeHandle, child: NativeHandle, index: usize)
fn remove_child(&self, parent: NativeHandle, child: NativeHandle)
fn measure_text( &self, text: &str, style: &TextStyle, max_width: f32, ) -> TextMetrics
fn screen_size(&self) -> ScreenSize
fn scale_factor(&self) -> f32
fn supports(&self, capability: PlatformCapability) -> bool
Auto Trait Implementations§
impl !Freeze for AndroidPlatform
impl RefUnwindSafe for AndroidPlatform
impl Send for AndroidPlatform
impl Sync for AndroidPlatform
impl Unpin for AndroidPlatform
impl UnsafeUnpin for AndroidPlatform
impl UnwindSafe for AndroidPlatform
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