Add Iris Android APK tooling
This commit is contained in:
1 parent
e137f38a5d
commit
df1290904b
24 files changed
+1814
-63
No files matched your search
@@ -112,8 +112,8 @@ fn battery_line(samples: &[i32]) -> String {
|
||||
)
|
||||
}
|
||||
|
||||
impl AndroidAppState for BenchClient {
|
||||
fn new(mut ui_state: AndroidUiState, rsc: &mut StdRsc<Self>) -> Self {
|
||||
impl BenchClient {
|
||||
pub(super) fn new(mut ui_state: AndroidUiState, rsc: &mut StdRsc<Self>) -> Self {
|
||||
let content = WidgetPtr::new().add(rsc);
|
||||
let loading = placeholder(rsc, "Loading fixture...");
|
||||
content(rsc).set(loading);
|
||||
@@ -186,16 +186,24 @@ impl AndroidAppState for BenchClient {
|
||||
}
|
||||
client
|
||||
}
|
||||
}
|
||||
|
||||
fn platform_ready(&mut self, _rsc: &mut StdRsc<Self>, vm: JavaVM, view: GlobalRef) {
|
||||
impl AndroidAppState for BenchClient {
|
||||
type Resources = StdRsc<Self>;
|
||||
|
||||
fn platform_ready(&mut self, _rsc: &mut Self::Resources, vm: JavaVM, view: GlobalRef) {
|
||||
self.platform = Some(Arc::new(PlatformHandle::new(vm, view)));
|
||||
}
|
||||
|
||||
fn back_pressed(&mut self, _rsc: &mut StdRsc<Self>) -> bool {
|
||||
fn back_pressed(&mut self, _rsc: &mut Self::Resources) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn on_insets_changed(&mut self, rsc: &mut StdRsc<Self>, insets: iris::android::WindowInsets) {
|
||||
fn on_insets_changed(
|
||||
&mut self,
|
||||
rsc: &mut Self::Resources,
|
||||
insets: iris::android::WindowInsets,
|
||||
) {
|
||||
if insets.top != self.last_top_pad {
|
||||
self.last_top_pad = insets.top;
|
||||
let controls = bench_controls(rsc, insets.top);
|
||||
|
||||
Reference in new issue
Block a user