build + android + wallet + ui: new lib to get IPs, egui, android and grin deps, add input from soft keyboard to text edit, receive txs, filter txs by account, finalize input (in rework), wallet creation copy/paste buttons

This commit is contained in:
ardocrat
2024-04-16 15:24:22 +03:00
parent 02a79188bf
commit b93a2efd5e
32 changed files with 1518 additions and 743 deletions
+32 -2
View File
@@ -30,11 +30,41 @@ impl Android {
impl PlatformCallbacks for Android {
fn show_keyboard(&self) {
self.android_app.show_soft_input(true);
// Disable NDK soft input show call before fix for egui.
// self.android_app.show_soft_input(false);
use jni::objects::{JObject};
let vm = unsafe { jni::JavaVM::from_raw(self.android_app.vm_as_ptr() as _) }.unwrap();
let mut env = vm.attach_current_thread().unwrap();
let activity = unsafe {
JObject::from_raw(self.android_app.activity_as_ptr() as jni::sys::jobject)
};
let _ = env.call_method(
activity,
"showKeyboard",
"()V",
&[]
).unwrap();
}
fn hide_keyboard(&self) {
self.android_app.hide_soft_input(true);
// Disable NDK soft input hide call before fix for egui.
// self.android_app.hide_soft_input(false);
use jni::objects::{JObject};
let vm = unsafe { jni::JavaVM::from_raw(self.android_app.vm_as_ptr() as _) }.unwrap();
let mut env = vm.attach_current_thread().unwrap();
let activity = unsafe {
JObject::from_raw(self.android_app.activity_as_ptr() as jni::sys::jobject)
};
let _ = env.call_method(
activity,
"hideKeyboard",
"()V",
&[]
).unwrap();
}
fn copy_string_to_buffer(&self, data: String) {