Bug 124480 - Support Android system theme
Summary: Support Android system theme
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Android Viewer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: https://www.nature.com/articles/s4159...
Whiteboard: target:24.2.0
Keywords:
: 162151 (view as bug list)
Depends on:
Blocks: Dark-Mode
  Show dependency treegraph
 
Reported: 2019-04-01 17:04 UTC by paulystefan
Modified: 2024-07-24 04:11 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of LO test.odg in android 9 with viewer 6.1 (186.11 KB, image/png)
2019-05-03 15:24 UTC, paulystefan
Details
screenshot of acrobat reader test.pdf in android 9 with night modus (133.48 KB, image/png)
2019-05-03 15:42 UTC, paulystefan
Details
german pdf print of geo article against short sightedness (deleted)
2019-05-14 07:35 UTC, paulystefan
Details
science black background against short sightedness (3.54 MB, application/pdf)
2020-04-02 09:44 UTC, paulystefan
Details
Screencast of dark theme as of 2023-11-30 (11.80 MB, video/webm)
2023-11-30 15:51 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description paulystefan 2019-04-01 17:04:16 UTC
important enhancement for kids and teens against short sightedness.


dark theme  with black background against short sightedness, eye strain and better sleeping after late work

see science results in german:

https://www.geo.de/wissen/gesundheit/19282-rtkl-kurzsichtigkeit-warum-wir-zukuenftig-mehr-weiss-auf-schwarz-lesen

and in english:

https://www.nature.com/articles/s41598-018-28904-x


So in all software products with white background, a dark mode with dark theme against short sightedness and eye strain should be available in first step.

in android 10 a dark mode will be available. 
in iOS 11+ intelligent color invert without photo invert is available.

Also significant reduction of energy consumption in smartphones, tablets and laptops with OLED display with black background.
Comment 1 paulystefan 2019-04-02 17:52:04 UTC
in actual LO 6.2 themes from Firefox are not available, so dark theme of Firefox are not available.

working mode with inverted colors for white background and normal black types 
is not available.

in Android 10 dark mode is coming. 
in iOS 11+ intelligent color invert is available. 

So libre office viewer should have dark mode.

windows 10 goes with dark theme first steps into dark mode.
Comment 2 paulystefan 2019-04-02 17:52:29 UTC Comment hidden (obsolete)
Comment 3 Heiko Tietze 2019-05-03 10:09:37 UTC
LibreOffice aims to comply with the system theme (=> see also). So if you run your Android with a dark theme it should work also for this app. Please submit screenshots to illustrate the issue.
Comment 4 paulystefan 2019-05-03 11:38:02 UTC Comment hidden (off-topic)
Comment 5 paulystefan 2019-05-03 11:39:30 UTC Comment hidden (off-topic)
Comment 6 paulystefan 2019-05-03 11:47:21 UTC Comment hidden (off-topic)
Comment 7 paulystefan 2019-05-03 11:50:17 UTC Comment hidden (off-topic)
Comment 8 paulystefan 2019-05-03 11:54:03 UTC Comment hidden (off-topic)
Comment 9 paulystefan 2019-05-03 11:57:48 UTC Comment hidden (off-topic)
Comment 10 Heiko Tietze 2019-05-03 12:50:29 UTC
All your links are off-topic, sorry. If you run into trouble with LibreOffice Viewer please make a screenshot of the particular issue. Talking about the desktop version there are options to change the colors. And again, supporting the system theme / mode is what we aim for not a special solution with a button or the like to switch from a to b.
Comment 11 paulystefan 2019-05-03 15:24:09 UTC
Created attachment 151162 [details]
screenshot of LO test.odg in android 9 with viewer 6.1

see screenshot

no invert of odg with white background to black background possible.

in other apps like adobe reader with night modus is this possible.
Comment 12 paulystefan 2019-05-03 15:42:05 UTC
Created attachment 151164 [details]
screenshot of acrobat reader test.pdf in android 9 with night modus

see a screenshot with acrobat reader in night modus available in android 9 (and previous system versions)

smart invert of black and white for better healthiness of eyes.
Comment 13 QA Administrators 2019-05-08 21:49:15 UTC Comment hidden (obsolete)
Comment 14 paulystefan 2019-05-14 07:35:51 UTC Comment hidden (obsolete)
Comment 15 Xisco Faulí 2019-08-09 09:26:48 UTC
Bug 118320 for Windows and bug 118017 for Mac are confirmed, I guess we can do the same for this one...
Comment 16 paulystefan 2020-04-02 09:44:23 UTC Comment hidden (obsolete)
Comment 17 paulystefan 2020-04-02 09:57:53 UTC
in windows importance is high

and here is it only medium

this is not consistant.
Comment 18 Heiko Tietze 2020-04-02 11:06:06 UTC Comment hidden (off-topic)
Comment 19 paulystefan 2020-04-02 11:32:34 UTC Comment hidden (off-topic)
Comment 20 Buovjaga 2020-04-02 14:32:12 UTC Comment hidden (off-topic)
Comment 21 Heiko Tietze 2020-04-02 14:33:21 UTC Comment hidden (off-topic)
Comment 22 Commit Notification 2023-11-30 11:16:50 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/10cdb834281c0c37e6966173e67150e39917ccd7

tdf#124480 android: Use MaterialToolbar and drop manual bg color

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2023-11-30 11:16:52 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9e7df5bdf2c0e9585f01c16bbb5a377fe64299ca

tdf#124480 android: Replace hard-coded bg color with themeable one

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 24 Commit Notification 2023-11-30 11:16:54 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d82a9cb8d6a1e11663f19a85cfb98ce9a94692be

tdf#124480 android: Support dark theme

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 25 Commit Notification 2023-11-30 11:16:57 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/84996f452f86cb6e83ae0d86c1612e3f3c616a17

tdf#124480 android: Use theme bg color for bottom toolbars

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 26 Commit Notification 2023-11-30 11:17:00 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/26d06d6c881a0decb25b82eae1cee42fc6bc6a31

tdf#124480 android: Override icon color for dark theme

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 27 Commit Notification 2023-11-30 11:17:02 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fbca561b97e9669d6a2eaaf7db8c629036a393a0

tdf#124480 android: Drop unused icons

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 28 Commit Notification 2023-11-30 11:17:05 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f37dcb43c0373e75e92fabd82b4f2a17b1fe6055

tdf#124480 android: Use themed color for more icons

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 29 Commit Notification 2023-11-30 11:18:07 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/59093ecb1cdf0ba8c946dfdbe0ec7ee0e89cd6f6

tdf#124480 android: Rename icons no longer using hard-coded color

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 30 Commit Notification 2023-11-30 11:18:10 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/31a689b83112bfa057c2f7f8306b875b9a2ac7c7

tdf#124480 android: Use themed color for icon on start activity

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 31 Commit Notification 2023-11-30 11:18:13 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/322f8e8cb7d103a6666ceb212d43929aab2f111e

tdf#124480 android: Use an actual button for "Select file to open"

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 32 Commit Notification 2023-11-30 11:18:15 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c82a594da3189fe82052f8081fda16e9e3cb0c0f

tdf#124480 android: Avoid using color attr requiring API 23

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 33 Commit Notification 2023-11-30 11:18:18 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fa1f867caca9e5c6c0dbd4bcaf096f27077f363d

tdf#124480 android: Set bg color for calc formula bar

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 34 Michael Weghorn 2023-11-30 15:51:04 UTC
Created attachment 191145 [details]
Screencast of dark theme as of 2023-11-30

The commits/changes from the previous comments implement dark theme support for the native Android user interface elements (like toolbars, menus,...).

Changing the colors used for the document canvas is not implemented so far, but might follow at some point in the future.

Attached is a screencast showing what this looks like in the current development version of the app.

For implementing support for switching the document colors to dark mode, the ".uno:ChangeTheme" UNO command added in the following commit is probably useful:

commit 9310192a4a0af4e7e3e9ac6124cdd2a706dfedcb
Author: Paris Oplopoios
Date:   Thu Mar 16 03:55:34 2023 +0200

    Add uno command that changes the theme
Comment 35 Michael Weghorn 2024-07-23 06:24:52 UTC
*** Bug 162151 has been marked as a duplicate of this bug. ***
Comment 36 hank.tu.biz 2024-07-23 18:35:19 UTC
Mr. Weghorn,

Thanks for cleaning that up. I found that the LibreOffice Viewer app has been rebranded as Collabera Office. (Yes? No?) It's available on fdroid provided you add the Collabora repository.

Of course I didn't do it that way. I went to the Collabora site & downloaded the latest apk. It does support dark mode in the editing mode.

Regards,

•Hank
Comment 37 hank.tu.biz 2024-07-23 18:35:46 UTC Comment hidden (obsolete)
Comment 38 Michael Weghorn 2024-07-24 04:11:38 UTC
(In reply to hank.tu.biz from comment #36)
> Thanks for cleaning that up. I found that the LibreOffice Viewer app has
> been rebranded as Collabera Office. (Yes? No?) It's available on fdroid
> provided you add the Collabora repository.

Collabora Office is based on LibreOffice as well, and Collabora is one of the main contributors to LibreOffice. The Android version of it is based on Collabora Online, which uses LibreOffice core, too, but is different from the LibreOffice Viewer app provided by TDF. (It's more based on web technologies, see https://github.com/CollaboraOnline/online/ .)