Skip to content

Implement an Android view in Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

mwcampbell/android-view

Repository files navigation

WIP: Implement an Android view in Rust

This doesn't work yet.

This will be a reusable library that can be reused to implement an Android view in Rust. Things that will distinguish it from android-activity:

  • No C++ code.
  • Meant to be usable for both pure-Rust Android applications and embedding Rust widgets in existing applications.
  • Event handlers and other view callbacks run directly on the UI thread; there is no sending events to a separate Rust event loop thread.
  • This crate intends to stick as close as possible to the Android framework. This will be especially important for text input support.

So far, glue code has been written for implementing several Android framework methods (on both View and SurfaceHolder.Callback) in Rust, but it's not fully wired up yet, and the plumbing for InputConnection still needs to be done.

Open questions

  • Do we need to be able to handle the view being reattached to a window after it has been detached? If not, then onDetachedFromWindow is the logical place to sever the connection between Java and native.

About

Implement an Android view in Rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published