SecUSo / privacy-friendly-sudoku

Privacy Friendly App to play Sudoku on Android.
https://secuso.org/pfa-sudoku
GNU General Public License v3.0
144 stars 55 forks source link

Use human-readable relative times in LoadGameActivity. #70

Closed hugomg closed 3 years ago

hugomg commented 3 years ago

When loading a saved game, display the last time played in human readable relative time. For example, "5 minutes ago" or "Yesterday". This matches the template from list_entry_layout.xml

The current implementation writes the date in full, including day, month, year, hours, minutes, and seconds. Not only is that more information than we really need, but in devices with a narrower screen this can cause the date to be drawn on top of the difficulty.

sudoku-bug

hugomg commented 3 years ago

By the way, while this patch helps a lot with the problem, it doesn't solve it completely. In some languages the difficulty and the last time played can still overlap a bit. I suppose that a more complete fix would be to write the difficulty name under the block of stars instead of to its right. However, I couldn't figure out how to do that without messing up the ConstraintLayout in the list_entry_layout. I imagine that someone with more experience using ContraintLayout might know how to do it.

Kamuno commented 3 years ago

Yea. We are having a lot of trouble with narrow and small screens. This definitely helps, though.

Kamuno commented 3 years ago

I couldn't figure out how to do that without completely messing up the ConstraintLayout in the list_entry_layout. I imagine that someone with more experience using ContraintLayout might know how to do it.

I'll look into that. Ty