From db74eccf779ac0dd33081fe4c4e8709197259449 Mon Sep 17 00:00:00 2001 From: dom Date: Mon, 6 Apr 2026 15:16:09 +0800 Subject: [PATCH] android shortcut Signed-off-by: dom --- android/app/src/main/AndroidManifest.xml | 171 +++++++++++------- .../app/src/main/res/drawable/download.xml | 10 + android/app/src/main/res/drawable/search.xml | 10 + android/app/src/main/res/values/string.xml | 2 + .../app/src/main/res/xml-v25/shortcuts.xml | 20 ++ lib/utils/app_scheme.dart | 3 + 6 files changed, 154 insertions(+), 62 deletions(-) create mode 100644 android/app/src/main/res/drawable/download.xml create mode 100644 android/app/src/main/res/drawable/search.xml create mode 100644 android/app/src/main/res/xml-v25/shortcuts.xml diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index d67a772ca..a74f0afb2 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,6 @@ + @@ -16,8 +17,7 @@ - + @@ -35,56 +35,62 @@ - + android:supportsPictureInPicture="true" + android:theme="@style/LaunchTheme" + android:windowSoftInputMode="adjustResize"> - + + + + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" /> + - - + + + - - - - - - - - + + + + + + + + + @@ -100,36 +106,56 @@ + + - + + + - - - + - + - - - + - + - - - + @@ -147,28 +173,44 @@ - - - - + + + - - + - + - + - + - @@ -177,32 +219,37 @@ + android:theme="@style/Ucrop.CropTheme" /> - - + + - + - - - - - - + + + + + + - + diff --git a/android/app/src/main/res/drawable/download.xml b/android/app/src/main/res/drawable/download.xml new file mode 100644 index 000000000..487998bf4 --- /dev/null +++ b/android/app/src/main/res/drawable/download.xml @@ -0,0 +1,10 @@ + + + + diff --git a/android/app/src/main/res/drawable/search.xml b/android/app/src/main/res/drawable/search.xml new file mode 100644 index 000000000..d6f0b1dc5 --- /dev/null +++ b/android/app/src/main/res/drawable/search.xml @@ -0,0 +1,10 @@ + + + + diff --git a/android/app/src/main/res/values/string.xml b/android/app/src/main/res/values/string.xml index 7827e9219..cf338c230 100644 --- a/android/app/src/main/res/values/string.xml +++ b/android/app/src/main/res/values/string.xml @@ -1,3 +1,5 @@ PiliPlus + 搜索 + 离线视频 \ No newline at end of file diff --git a/android/app/src/main/res/xml-v25/shortcuts.xml b/android/app/src/main/res/xml-v25/shortcuts.xml new file mode 100644 index 000000000..0d7fab8ad --- /dev/null +++ b/android/app/src/main/res/xml-v25/shortcuts.xml @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/lib/utils/app_scheme.dart b/lib/utils/app_scheme.dart index 174a045d0..678808488 100644 --- a/lib/utils/app_scheme.dart +++ b/lib/utils/app_scheme.dart @@ -397,6 +397,9 @@ abstract final class PiliScheme { } } return false; + case 'download': + Get.toNamed('/download'); + return true; default: if (!selfHandle) { // if (kDebugMode) debugPrint('$uri');