Commit Graph
66 Commits
Author SHA1 Message Date
Sylvia van Os 6b24f56c79 Fix unit tests 2020-11-10 22:25:16 +01:00
Sylvia van Os e601d1a659 Editable card ID and barcode type 2020-11-10 22:05:53 +01:00
Sylvia van Os 1641631bdc Get rid of headingStoreTextColorValue 2020-11-10 19:11:57 +01:00
Sylvia van Os 4bbeb27714 Feature/groups (#71)
* Basic group management

* Assign cards to groups

* Fix lint

* Fix findbugs 'dodgy code'

* Group name as unique key

* More group tests

* Import/export groups

* Implement group renaming and deleting

* Fix findBugs

* Fix chip marking in edit activity

* Group import/export tests

* Fix some state bugs

* Some last fixes

* Remove redundant if statement

* Fix findBugs

* Deduplicate code

* Cleanup

* Fix groups not showing up with new card

* Fix capture and enter button touching

* Fix dialog button look
2020-11-06 18:12:06 +01:00
Sylvia van Os 70251d7ea8 Fix app bypassing Android orientation confirmation 2020-10-26 18:48:57 +01:00
t351206 c9f3054682 New feature: Favorite cards (#70) 2020-10-25 18:01:26 +01:00
Sylvia van Os efae7bda4c Modernize UI with FABs 2020-10-22 19:36:00 +02:00
Sylvia van Os 9d4529b06b Initial rebrand 2020-10-22 18:15:07 +02:00
Sylvia van Os 454052638f Fix barcode centering 2020-01-28 17:32:57 +01:00
Sylvia van Os fd6c66a86a Improve documentation 2020-01-21 20:12:15 +01:00
Sylvia van Os 4a7e8b6eba Reset state on paused to prevent layout glitches 2020-01-19 19:07:06 +01:00
Sylvia van Os f8943af402 Tap barcode to align to top 2020-01-19 16:45:17 +01:00
Sylvia van Os ca12f8f914 Fix some of the errors Travis reported 2019-12-28 21:19:00 +01:00
Branden Archer b9d158583b Update to AndroidX
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
2019-12-28 19:57:27 +01:00
Sylvia van Os 32b4178950 Fix some warnings 2019-12-27 17:40:12 +01:00
Sylvia van Os d9f97380d9 Fix status bar being white 2019-12-27 17:34:58 +01:00
Sylvia van Os c0d1b446d1 Make same text and header color at least slightly visible 2019-12-16 13:23:16 +01:00
Sylvia van Os d24a418beb Fix status bar icon colors 2019-12-16 11:36:23 +01:00
Sylvia van Os 1f348295a0 Merge branch 'master' of ssh://github.com/brarcher/loyalty-card-locker into fix/white_on_white_icons 2019-12-15 21:36:56 +01:00
Sylvia van Os 280fe76609 Use DrawableCompat tinting instead 2019-12-15 21:29:34 +01:00
Sylvia van Os a642b12795 Use a const for luminance halfway point 2019-12-15 12:50:08 +01:00
Sylvia van Os 7b7624a3e0 Fix white on white icons 2019-12-11 17:42:56 +01:00
Sylvia van Os 33b84ad4c3 Allow barcodeless cards 2019-12-04 15:59:49 +01:00
Sylvia van Os 5e836758e5 Fix function calls 2019-12-02 12:57:44 +01:00
Sylvia van Os 28b3aa2018 Add ability to share and receive loyalty cards 2019-12-01 18:22:55 +01:00
Branden Archer 10e720de91 Add option to lock orientation state
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.
2018-10-06 15:27:36 -07:00
Branden Archer 4de952ba2d Set rotation state in onCreate()
The menu creation need not change this state
2018-10-06 14:24:50 -07:00
Branden Archer c5de27abe3 Move orientation locking code to separate method 2018-10-06 14:24:05 -07:00
Branden Archer 34c07800dd Configure brightening screen when display a barcode
When a barcode is displayed the screen's brightness is set to
the maximum, in an attempt to provide the best chance for a barcode
scanner to capture the barcode. However, it may not always
be desired to increase the brightness, for example when using
the app in low light.

This change adds a setting to control the screen brightening
behavior when a barcode is viewed.
2018-07-25 22:24:27 -04:00
Branden Archer 9951999ca4 Add settings for font sizes 2018-02-17 16:05:10 -05:00
Branden Archer a4bde722a6 Add config for text and background colors
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.
2018-02-17 15:50:32 -05:00
Branden Archer 12440346fa Replace letter icon with store name 2018-02-10 13:37:17 -05:00
Branden Archer 870e4d0c4a Add note text to card view layout 2018-02-10 13:37:17 -05:00
Branden Archer 6ed96393d5 Change layout of single card view
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.
2018-01-31 22:49:31 -05:00
Branden Archer 388a0723dc Remove support for adding shortcuts from within the app
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.
2017-11-29 19:03:34 -05:00
Branden Archer e0915578ba Redraw card info when launched by a shortcut
When a shortcut launches the view activity, if the activity
already exists it will get onNewIntent() called. This needs to
clear out the view items so the next card will be redrawn.
2017-11-25 14:33:59 -05:00
Branden Archer c733a6c3b9 Start shortcuts with singleTop, but not all launches
This will prevent shortcuts from creating many views, and causing
them to leak. However, do not use singleTop for all launches
of the view activity, else the edit mode cannot be entered.
2017-11-25 14:33:59 -05:00
Branden Archer ec17255a43 Remove unneeded local variables
The global variables have the same information; no need to look
up the information again.
2017-11-25 14:33:59 -05:00
Branden Archer 1fc7baa5a0 Capture view items in onCreate
Some of these will need to be accessed prior to onResume()
2017-11-25 14:33:59 -05:00
Branden Archer 23178d9694 Optionally add shortcut when creating/editing a card
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.
2017-11-25 14:33:59 -05:00
Branden Archer ce1acb83f0 Add card shortcuts for most recently used cards
This adds app shortcuts for the most recently used cards.
When a new card is accessed, it is added to the shortcuts list.
When the list exceeds its maximum size, the least recently
used shortcut is discarded.

Android limits the maximum number of shortcuts to 5, however
it recommends in its documentation to limit this to 4. This
commit limits this to 3, however, as that is aesthetically pleasing.
2017-09-26 22:52:32 -04:00
Branden Archer 4143e5c286 Bail if loyalty card could not be found
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.
2017-07-23 10:05:05 -04:00
Branden Archer 15425d51aa Add debugging when entering view activity 2017-07-22 23:52:21 -04:00
Branden Archer fb7e3e12f2 Add menu option to lock screen when viewing card
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.
2017-07-16 21:26:40 -04:00
Branden Archer ac495e1bf2 Add missing card add menu
There was no save button when creating a new card.
2017-06-18 23:05:22 -04:00
Branden Archer abdde45669 Update card view layout
This layout uses a TableLayout and shows lines dividing the
different parts of an entry.
2017-06-18 20:47:37 -04:00
Branden Archer 13b2faab39 Use save button in action bar 2017-06-18 15:37:40 -04:00
Branden Archer 433d31c30f Add super call in onCreateOptionsMenu 2017-06-18 15:37:40 -04:00
Branden Archer fa7dcd253a Change menus names to focus where they are, not what they contain 2017-06-18 15:37:40 -04:00
Branden Archer 0a9124c834 Update "Enter card" button if card id exists
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.
2017-06-11 15:06:10 -04:00