]> git.ktnx.net Git - mobile-ledger.git/commit
move sample text scanning to the template activity
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sun, 21 Feb 2021 10:30:25 +0000 (12:30 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 1 Mar 2021 06:00:42 +0000 (06:00 +0000)
commit086190fcb88b75bf3df3eeeb6357f15ed1127f4f
treea8299075752f79f1ecbe047b726210215cdf2d00
parentd0c7376f092d1778ec8bab43cd2017eab723d521
move sample text scanning to the template activity

the initial idea was to have an abstract fragment class that could
handle the details about launching the QR scanner and accept the result.

however, the right place to do this is the activity, because only an
activity can receive the scan result, and launch the QR app.

Before, this was worked around by a LiveData thing that the activity
observed, and which the "Scan" buttons triggered. This has a nasty side
effect that the LiveData is triggered whenever the activity is
re-instantiated
app/src/main/java/net/ktnx/mobileledger/ui/QR.java
app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsAdapter.java
app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplateDetailsFragment.java
app/src/main/java/net/ktnx/mobileledger/ui/templates/TemplatesActivity.java