webview on Android with correct size

This commit is contained in:
polv committed 2026-02-27 12:03:20 +07:00
1 parent 164f7c95bd
commit 7d447f8cf1
3 files changed
+6 -10

No files matched your search

+4 -3
View File
@@ -33,8 +33,9 @@ span {
}
}
@media screen and (width < 1000px) {
body {
padding-top: 2em;
}
padding-top: env(safe-area-inset-top);
padding-bottom: env(safe-area-inset-bottom);
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
@@ -9,7 +9,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:text="Loading..."
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
+1 -6
View File
@@ -20,16 +20,11 @@ pub async fn init_yomitan(
e.to_string()
})?;
let config = app.config();
println!("{:#?}", app.asset_resolver());
if let Some(r) = &config.bundle.resources {
println!("{:?}", r);
}
// Embedded files cannot be read with std fs directly, not to mention read_dir
// It need to be copied with app.fs().read(...) one-by-one, and no read_dir here
// @link https://v2.tauri.app/plugin/file-system/
// app.config().bundle.resources don't seem to resolve **/*
// utils::resources::ResourcePaths::new(&["pattern*".to_string()], true); didn't work correctly in Android
#[cfg(target_os = "android")]
let zip_dir = {
let filename = "PixivLight_2026-02-24.zip";