brarcher / loyalty-card-locker

Stores your barcode-based store/loyalty cards on your phone
GNU General Public License v3.0
171 stars 29 forks source link

Reduce header size in landscape mode #341

Closed TheLastProject closed 4 years ago

TheLastProject commented 4 years ago

Improves #268

Before: photo_2020-01-07_20-35-20 After: photo_2020-01-07_20-35-19

It's a small but good difference, a "start" so to say (Android layout code is very frustrating and I don't feel like spending more time on it).

The code changes may seem very big, but they are in fact pretty small:

The other option was to write code in the LoyaltyCardViewActivity class to check the orientation and make some UI changes. While this would be less code and less (UI) code duplication, I felt patching around in the UI like that when Android provides a native mechanism would be less maintainable, which is why I opted for this way of implementing the change.

If you have any more suggestions on how the landscape UI can be tweaked please mention it, I'm honestly not quite sure what to do while keeping it as pretty as it currently is.