mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
webview on Android with correct size
This commit is contained in:
1 parent
164f7c95bd
commit
7d447f8cf1
3 files changed
+6
-10
No files matched your search
@@ -33,8 +33,9 @@ span {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (width < 1000px) {
|
|
||||||
body {
|
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
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Hello World!"
|
android:text="Loading..."
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
|||||||
@@ -20,16 +20,11 @@ pub async fn init_yomitan(
|
|||||||
e.to_string()
|
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
|
// 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
|
// 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/
|
// @link https://v2.tauri.app/plugin/file-system/
|
||||||
// app.config().bundle.resources don't seem to resolve **/*
|
// 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")]
|
#[cfg(target_os = "android")]
|
||||||
let zip_dir = {
|
let zip_dir = {
|
||||||
let filename = "PixivLight_2026-02-24.zip";
|
let filename = "PixivLight_2026-02-24.zip";
|
||||||
|
|||||||
Reference in new issue
Block a user