From 92aec5a736324a2b2252ee552d70d72f309f96fc Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 14 Aug 2023 12:12:20 -0600 Subject: [PATCH 1/2] Don't cover status bar on Android By default python-for-android appends `.Fullscreen` to the theme. On ChromeOS this has no effect, but on Android it makes the app cover the status bar. I don't believe Endless Key is so important that it needs that and it introduces a difference with ChromeOS where the app always runs windowed and the status bar color is used for the window decoration. Add the p4a `--window` option so that it doesn't append `.Fullscreen` to the theme. --- .p4a | 1 + 1 file changed, 1 insertion(+) diff --git a/.p4a b/.p4a index 91e496c3..3a9449a6 100644 --- a/.p4a +++ b/.p4a @@ -17,6 +17,7 @@ --icon assets/icon.png --icon-fg assets/icon-fg.png --icon-bg assets/icon-bg.png +--window --fileprovider-paths src/fileprovider_paths.xml --add-asset assets/_load.html:_load.html --add-asset assets/welcomeScreen:welcomeScreen From e6f1b7a3b23cbb6215bce925501c561540dd9096 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 14 Aug 2023 12:10:35 -0600 Subject: [PATCH 2/2] Add custom theme derived from Material Light This restores the attempt to use Material Light except that it overrides the status bar to black as the previous theme did. A custom theme using a resource value file is needed for that. This depends on the new `--res-values` option in python-for-android v2022.09.04-endless11. Fixes: #174 --- .p4a | 2 ++ requirements.txt | 2 +- res/values/styles.xml | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 res/values/styles.xml diff --git a/.p4a b/.p4a index 3a9449a6..81dcf37a 100644 --- a/.p4a +++ b/.p4a @@ -11,12 +11,14 @@ --allow-minsdk-ndkapi-mismatch --permission ACCESS_NETWORK_STATE --permission FOREGROUND_SERVICE +--android-apptheme "@style/KeyTheme" --service remoteshell:remoteshell.py --presplash assets/presplash.png --presplash-color #F15A22 --icon assets/icon.png --icon-fg assets/icon-fg.png --icon-bg assets/icon-bg.png +--res-values res/values/styles.xml --window --fileprovider-paths src/fileprovider_paths.xml --add-asset assets/_load.html:_load.html diff --git a/requirements.txt b/requirements.txt index 4ee5beb7..c753a1d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ cython~=0.29 virtualenv -git+https://github.com/endlessm/python-for-android@v2022.09.04-endless10#egg=python-for-android +git+https://github.com/endlessm/python-for-android@v2022.09.04-endless11#egg=python-for-android diff --git a/res/values/styles.xml b/res/values/styles.xml new file mode 100644 index 00000000..47268d34 --- /dev/null +++ b/res/values/styles.xml @@ -0,0 +1,6 @@ + + + +