With the release of targetSdk 36, the Android platform will no longer
always apply rotation. To lower the chance of user confusion, this
support is being removed completely.
I know some of you really love this, but I can't do anything about this.
This is Google's decision and my opinion doesn't matter.
This isn't as automatic as I would've liked, but with some manual
trial-and-error I think this works well enough in keeping the aspect
ratio while somewhat "scaling" based on size (at least the number of
columns are scaled)
We've been running an old version for very long because there hasn't
been any time to update it. A newer version doesn't support Java 21.
Given Java 21 ihas more priority, let's just get rid of spotBugs.
It's extremely hard to perfectly reach the 85.6:53.98 ratio, so if the
image is cropped close enough to it, we enable center cropping. This
allows a bit of the edges to be cut off to fully fill the image area.
We apply window insets to basically not draw behind the top and bottom
bar. While this is a slight visual downgrade (we used to draw behind the
top bar before), it at least allows us to target Android 15.
While espass files aren't pkpass files, they are so similar we can
generally parse them fine with the pkpass parser. While this feature
shouldn't be advertised as it is kinda hacky, it does make it easier for
PassAndroid users to share cards with Catima users.
Currently, this just allows us to remove the donation button on Google
Play without using the deprecated installer APIs.
In the future, this should allow us to also release multiple versions of
Catima (for example: WearOS is a commonly requested feature, but this
needs non-free dependencies, which may not be okay to all users).
When you turn a LoyaltyCard into a bundle, it writes the files to
storage as it can't otherwise fit in the limited storage size. This
means that, on rotation, you write all images to storage and load them
again. Using a ViewModel prevents that storage hit due to holding it in
memory (as a ViewModel has a longer lifecycle).