This case was hit at least once by a user, though the scenario
is not known. If it is hit, post a message and bail gracefully,
until the reason can be determined.
When passing a phone to a clerk to scan the barcode, if the
phone is rotated and the screen reloads it can be bothersome
or confusion. To avoid this situation, a new option is
added to lock the screen.
A menu icon is now added which defaults as unlocked. When
touched the app sets its orientation to the "natural" orientation
of the device. When touched again the sensor dictates the
orientation of the device.
Even with passing a bundle with the layout ID sometimes
some users will encounter a situation where the _layout
variable is null. To avoid further issues, creating a
class for each intro slide, so the layout is encoded
into the class itself.
When reducing the pixel size of the width, if the height is not
scaled to match then 1D barcodes end up being squished and are
too narrow to scan. To avoid this, scale the height to match.
Then, when the barcode is loaded into a Bitmap it will scale up
to the correct size.
It was found that on a Galaxy S4 a barcode width of 400 px started
to see some blurriness, but 500 px still looked sharp. Reducing
the maximum width to 500 px.
If orientation and resize are not handled if the screen is
rotate or resized the IntroSlide fragment loses its layout,
and when it tries inflates the layout it fails to do so.
This is necessary, as Robolectric 3.0 did not work
with the newer Android SDK. Further, Robolectric 3.3.2
did not like running tests at SDK 17, so this was
also bumped.
If someone is editing an existing card, or is adding a card
and wants to change the value, update the name of the button
from "Enter card" to "Edit card", to give the impression that
a new card id need not by typed from scratch.
To reduce the amount of memory used in generating barcodes, limit
the width of the barcodes to no more than 3x the height.
This should be plenty sufficient to generate a usable barcode.
On devices with a really long width generating a barcode of 200x2560
is not useful and can result in an OutOfMemoryError.
If the user enters the barcode selector view with a pre-existing
id, the barcodes are immediately drawn. However, if the ImageViews
were invisible their initial size is not known, and as such the
generated barcode images are fuzzy or not as expected. To avoid this,
all images are set to be visible. The expectation is that once the
barcodes are drawn for the first time if they are invalid the images
will be made invisible anyway.
If a user is attempting to update a card id of an existing card,
before when the Enter Card button was selected the barcode selector
view would be empty. To be more useful, the view will now be
pre-populated with the existing card id.
Earlier when a card was viewed it was shown in an EditView which
was disabled. This was not optimal, as the resulting text was
dimmed. To help the text be easier to read, a TextView is now
used to display the data.
In addition, the layout of the card viewing screen has been adjusted
The application is now "Loyalty Card Keychain", but "Locker"
still appears in the application's default import/export
file. Updating the file to match the new name of the application.
The icon on the application is no longer a locker, so the
Locker part of the name no longer makes sense. Changing it
to Keychain, as it may make more sense.
With this change once data is exported it can be sent to
another application.
Translation contributions:
Clonewayx: cs
PanderMusubi: nl
pbeckmann: de
Airon90: it
arno-github : fr
# Conflicts:
# app/src/main/res/values-it/strings.xml