Improving readability on large devices #77

Open
opened 3 months ago by eUgEntOptIc44 · 10 comments

Hi 👋

first of all thanks for the adaption of the canvas text rendering in #71.

The app looks even better now.

Here comes another idea to improve readability: adding a few pixels (about 5 to 10px) of padding below the highlighted (see orange arrows) parts in the attached screenshot might significantly increase readability of the displayed values

I'll add my display specs from the logs below as another screenshot. I'd like to copy the log content as text using the "copy to clipboard" button but it failed and the app crashed :(

Hi 👋 first of all thanks for the adaption of the canvas text rendering in [#71](https://codeberg.org/Starfish/TinyWeatherForecastGermany/issues/71). The app looks even better now. Here comes another idea to improve readability: adding a few pixels (about 5 to 10px) of padding below the highlighted (see orange arrows) parts in the attached screenshot might significantly increase readability of the displayed values I'll add my display specs from the logs below as another screenshot. I'd like to copy the log content as text using the "copy to clipboard" button but it failed and the app crashed :(
Poster

Off topic:
I recently found the website dezip.org being recommended somewhere on codeberg.org as a (rather) easy option to search the content of repos on codeberg for less tech savy users (as in having little knowledge of e.g. git).
See dezip.org/v1/9/https/codeberg.org/Starfish/TinyWeatherForecastGermany/archive/master.tar.gz/ to start

I thought this might be helpful for others as well. And the latter of the two links might be added to the README.md

**Off topic:** I recently found the website [dezip.org](https://dezip.org) being recommended somewhere on codeberg.org as a (rather) easy option to search the content of repos on codeberg for less tech savy users (as in having little knowledge of e.g. git). See [dezip.org/v1/9/https/codeberg.org/Starfish/TinyWeatherForecastGermany/archive/master.tar.gz/](https://www.dezip.org/v1/9/https/codeberg.org/Starfish/TinyWeatherForecastGermany/archive/master.tar.gz/) to start I thought this might be helpful for others as well. And the latter of the two links might be added to the README.md
Poster

Regarding my (first) use of the logview I faced a few challenges apart from the strange crash while trying to copy the contents via this button.

  • On my tablet the text size is rather difficult to read (compared to the appearance on my mobile). -> text size is controlled via the dimension 'licence_textsize' (see here and here) -> 10sp right now -> might consider increasing to 12sp for large devices?
  • I could not select and copy the contents of the TextView 'logview' to my understanding this might be changed by adapting the attributes of the TextView in activity_logging.xml according to this source is seems to be rather easy
Regarding my (first) use of the logview I faced a few challenges apart from the strange crash while trying to copy the contents via this [button](https://codeberg.org/Starfish/TinyWeatherForecastGermany/src/branch/master/app/src/main/java/de/kaffeemitkoffein/tinyweatherforecastgermany/LoggingActivity.java#L64). * On my tablet the **text size** is rather difficult to read (compared to the appearance on my mobile). -> text size is controlled via the dimension *'licence_textsize'* (see [here](https://codeberg.org/Starfish/TinyWeatherForecastGermany/src/branch/master/app/src/main/res/layout/activity_logging.xml#L70) and [here](https://codeberg.org/Starfish/TinyWeatherForecastGermany/src/branch/master/app/src/main/res/values/dimens.xml#L46)) -> 10sp right now -> might consider increasing to 12sp for large devices? * I could not **select and copy** the contents of the TextView [*'logview'*](https://codeberg.org/Starfish/TinyWeatherForecastGermany/src/branch/master/app/src/main/java/de/kaffeemitkoffein/tinyweatherforecastgermany/LoggingActivity.java#L39) to my understanding this might be changed by adapting the attributes of the TextView in [activity_logging.xml](https://codeberg.org/Starfish/TinyWeatherForecastGermany/src/branch/master/app/src/main/res/layout/activity_logging.xml#L61) according to this [source](https://stackoverflow.com/a/8969000) is seems to be rather easy
Poster

Here's another idea to further improve readability of the logview's contents -> what about using colored output?

I figured the following might be a possible workflow:

  1. 'define' list of keywords e.g. (ALARM MANAGER, UPDATESERVICE, UPDATEJOBSERVICE, WIDGET, TEXTS, WEATHER ALERTS, ...) and assert a color to each of them

  2. 'search' log plaintext content for the keywords using regular expressions -> see here for intel about substitutions using regular expressions in android java

  3. and replace matches with the following 'html(-like) code' -> from this source

<font color="COLOR">KEYWORD</font>
  1. make java render the 'html code' in the proper way:
logview.setText(Html.fromHtml(htmlresult));

-> also see here

Why regular expressions?

The keywords are expected to occur multiple times -> target: reducing load and keeping app run snappy

Why colors at all?

To increase readability of output while trying to keep required changes and future resource footprint as low as possible.

Does this even work?

Sorry no idea. I hope so. I don't have the experience and knowhow needed to know that.

Here's another idea to further improve readability of the logview's contents -> what about using **colored output**? I figured the following might be a possible workflow: 1. 'define' list of keywords e.g. (`ALARM MANAGER, UPDATESERVICE, UPDATEJOBSERVICE, WIDGET, TEXTS, WEATHER ALERTS, ...`) and assert a **color** to each of them 2. 'search' log plaintext content for the keywords using regular expressions -> see [here](https://stackoverflow.com/questions/12377838/android-replace-with-regex) for intel about substitutions using regular expressions in android java 3. and replace matches with the following 'html(-like) code' -> from this [source](https://riptutorial.com/android/example/19946/single-textview-with-two-different-colors) ```html <font color="COLOR">KEYWORD</font> ``` 4. make java render the 'html code' in the proper way: ```java logview.setText(Html.fromHtml(htmlresult)); ``` -> also see [here](https://codeberg.org/Starfish/TinyWeatherForecastGermany/src/branch/master/app/src/main/java/de/kaffeemitkoffein/tinyweatherforecastgermany/LoggingActivity.java#L45) ### Why regular expressions? The keywords are expected to occur multiple times -> target: reducing load and keeping app run snappy ### Why colors at all? To increase readability of output while trying to keep required changes and future resource footprint as low as possible. ### Does this even work? Sorry no idea. I hope so. I don't have the experience and knowhow needed to know that.
Poster

I think @arwagner might find this useful to check the logs as he seems to be facing a few bugs recently.

I think @arwagner might find this useful to check the logs as he seems to be facing a few bugs recently.
Owner

@eUgEntOptIc44

I think @arwagner might find this useful to check the logs as he seems to be facing a few bugs recently.

Currently, the log is pretty simple. Copy&Paste likely fails due to the fact that this is really a simple copy&paste that probably has some limitations regarding the size.

I will improve the logs, colored output is s good idea. An other thing to help arwanger will be, that if the log records a critical error, it will display it it debug versions before the app starts.

So you will not get stuck in app crashes without access to the log. (At least, for the average user.)

@eUgEntOptIc44 >I think @arwagner might find this useful to check the logs as he seems to be facing a few bugs recently. Currently, the log is pretty simple. Copy&Paste likely fails due to the fact that this is really a simple copy&paste that probably has some limitations regarding the size. I will improve the logs, colored output is s good idea. An other thing to help arwanger will be, that if the log records a critical error, it will display it it debug versions before the app starts. So you will not get stuck in app crashes without access to the log. (At least, for the average user.)

An other thing to help arwanger will be, that if the log records a critical error, it will display it it debug versions before the app starts.

I think this is actually the major thing. Right now even if it records the log (it's on here) I'll not have easy access to it as I can not even open the app.

Back in the day one could write some pid file and if is is still there the application knows something bad happend (or it's already running) and could divert from usual startup. (Or for those really in the know if really bad thing happend there would be a huge core file.) But I don't know how much of this is left in Android.

As someone once said: the nice thing about a gui is that you can set/access everything you can click on. The bad thing about a gui is that you can only set/access things you can click on ;)

@eUgEntOptIc44 so in a way, I have a race condition on layer 8 ;)

> An other thing to help arwanger will be, that if the log records a critical error, it will display it it debug versions before the app starts. I think this is actually the major thing. Right now even if it records the log (it's on here) I'll not have easy access to it as I can not even open the app. _Back in the day_ one could write some `pid` file and if is is still there the application knows something bad happend (or it's already running) and could divert from usual startup. (Or for those _really_ in the know if really bad thing happend there would be a huge `core` file.) But I don't know how much of this is left in Android. As someone once said: the nice thing about a gui is that you can set/access everything you can click on. The bad thing about a gui is that you can only set/access things you can click on ;) @eUgEntOptIc44 so in a way, I have a race condition on layer 8 ;)
Starfish added the
enhancement
label 2 months ago
Poster

I add a screenshot captured using release 0.57.1 as an update on this issue:

screenshot apk release 0.57.1

So in general it looks great. A bit packed but having the possiblity to use the simplified view that shouldn't be an issue.

I add a screenshot captured using release [0.57.1](https://codeberg.org/Starfish/TinyWeatherForecastGermany/releases/tag/0.57.1) as an update on this issue: ![screenshot apk release 0.57.1](https://codeberg.org/attachments/35c2026d-6472-4f48-9422-2e9c193557d3) So in general it looks great. A bit packed but having the possiblity to use the simplified view that shouldn't be an issue.
Poster

But when trying to view the logs from within the app it still crashed -> probably caused by the size of the log as mentioned by @Starfish above.

As the use of adb is still a feasable option this issue is rather low-prio. But for a quick look into e.g. the update process it'd be still nice to have. Especially when having colored output as suggested above.

But when trying to view the logs from within the app it still crashed -> probably caused by the size of the log as mentioned by @Starfish [above](https://codeberg.org/Starfish/TinyWeatherForecastGermany/issues/77#issuecomment-240839). As the use of `adb` is still a feasable option this issue is rather low-prio. But for a quick look into e.g. the update process it'd be still nice to have. Especially when having colored output as suggested [above](https://codeberg.org/Starfish/TinyWeatherForecastGermany/issues/77#issuecomment-240833).
Poster

Just spotted commit #ec1f7f771d by @Starfish 🥳 looks like colored log output is on its way!

👍

Just spotted commit [#ec1f7f771d](https://codeberg.org/Starfish/TinyWeatherForecastGermany/commit/ec1f7f771d94a8f857e6f9cd2fbcfba7e742be37) by @Starfish 🥳 looks like [**colored log output**](https://codeberg.org/Starfish/TinyWeatherForecastGermany/issues/77#issuecomment-240833) is on its way! 👍
Owner

Yes, looks like :-) Will be accompained by a slightly better share function that copies the logs directly to the body of an e-mail without bothering with the clipboard.

Also fixed an app crash in 0.57.0 & .1 that occurs when opening the logs activity.

Yes, looks like :-) Will be accompained by a slightly better share function that copies the logs directly to the body of an e-mail without bothering with the clipboard. Also fixed an app crash in 0.57.0 & .1 that occurs when opening the logs activity.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.