This is mostly the work of Android Studio's
Refactor > Migrate to AndroidX...
option. That mostly worked. The two places which were manually updated
were:
- The reference to AppBarLayout$ScrollingViewBehavior in
loyalty_card_edit_activity.xml
- The suggested constraintlayout version, 2.0.0-beta4 caused build
issues that 1.1.3 avoids
This new option will control if the screen orientation
lock option is displayed or not. If set, the orientation lock
is forced and the unlock option is hidden.
This adds config options for the colors used for the store text
and background when displaying the store name in the single
card view or the thumbnail for the card list.
This changes the layout when viewing a single card. The new layout
will have a colored area at the top which displays the first letter
of the company, and after that the barcode. The note will be displayed
on the card list screen and is presently omitted here.
As this layout is experimental, the layout for editing a card is
not yet updated. To achieve this the card viewing activity is split
into two separate classes, where one handles viewing and one handles
editing. When the view layout finalizes the edit icon can be updated
as time allows.
The preferred way to create a shortcut is through the launcher.
Although it is possible for an app to create shortcuts, there is
concern that allowing the app to do so may not be desirable
due to potentials for abuse.
As there is support now for adding shortcuts through the launcher,
this app do not need to also support creating them itself.
When a card is being added or created, a checkbox will now
be presented asking if a shortcut should be made. If selected,
when saving a shortcut will be added to the home screen. The
shortcut will directly launch the given card in view mode.
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.
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.
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