aboutsummaryrefslogtreecommitdiff
path: root/cashier/src
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-09-08 16:49:28 -0300
committerTorsten Grote <t@grobox.de>2020-09-08 16:49:28 -0300
commitd351f89cce722485033711f90edaf5a0f28e81ae (patch)
tree50746414671125d5c35b3da8ae6799b8bc62c3c1 /cashier/src
parent310775d1cb7a177641c704efb1a98a7ccaac67b3 (diff)
downloadtaler-android-d351f89cce722485033711f90edaf5a0f28e81ae.tar.gz
taler-android-d351f89cce722485033711f90edaf5a0f28e81ae.tar.bz2
taler-android-d351f89cce722485033711f90edaf5a0f28e81ae.zip
Fix minor lint warnings
Diffstat (limited to 'cashier/src')
-rw-r--r--cashier/src/main/java/net/taler/cashier/BalanceFragment.kt6
-rw-r--r--cashier/src/main/java/net/taler/cashier/MainViewModel.kt2
-rw-r--r--cashier/src/main/res/layout-w550dp/fragment_balance.xml4
-rw-r--r--cashier/src/main/res/layout/fragment_balance.xml4
4 files changed, 8 insertions, 8 deletions
diff --git a/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt b/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt
index 1114080..541bca2 100644
--- a/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt
+++ b/cashier/src/main/java/net/taler/cashier/BalanceFragment.kt
@@ -62,10 +62,10 @@ class BalanceFragment : Fragment() {
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- withdrawManager.lastTransaction.observe(viewLifecycleOwner, Observer { lastTransaction ->
+ withdrawManager.lastTransaction.observe(viewLifecycleOwner, { lastTransaction ->
onLastTransaction(lastTransaction)
})
- viewModel.balance.observe(viewLifecycleOwner, Observer { result ->
+ viewModel.balance.observe(viewLifecycleOwner, { result ->
onBalanceUpdated(result)
})
ui.button5.setOnClickListener { onAmountButtonPressed(5) }
@@ -82,7 +82,7 @@ class BalanceFragment : Fragment() {
true
} else false
}
- configManager.currency.observe(viewLifecycleOwner, Observer { currency ->
+ configManager.currency.observe(viewLifecycleOwner, { currency ->
ui.currencyView.text = currency
})
ui.confirmWithdrawalButton.setOnClickListener { onAmountConfirmed(getAmountFromView()) }
diff --git a/cashier/src/main/java/net/taler/cashier/MainViewModel.kt b/cashier/src/main/java/net/taler/cashier/MainViewModel.kt
index 2cce8cd..253c7d5 100644
--- a/cashier/src/main/java/net/taler/cashier/MainViewModel.kt
+++ b/cashier/src/main/java/net/taler/cashier/MainViewModel.kt
@@ -69,7 +69,7 @@ class MainViewModel(private val app: Application) : AndroidViewModel(app) {
val result = when (val response = makeJsonGetRequest(url, config)) {
is HttpJsonResult.Success -> {
try {
- val balanceObj = response.json.getJSONObject("balance");
+ val balanceObj = response.json.getJSONObject("balance")
val balanceAmount = balanceObj.getString("amount")
val positive = when (val creditDebitIndicator =
balanceObj.getString("credit_debit_indicator")) {
diff --git a/cashier/src/main/res/layout-w550dp/fragment_balance.xml b/cashier/src/main/res/layout-w550dp/fragment_balance.xml
index 40fa6af..bcfffc7 100644
--- a/cashier/src/main/res/layout-w550dp/fragment_balance.xml
+++ b/cashier/src/main/res/layout-w550dp/fragment_balance.xml
@@ -27,13 +27,13 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?attr/colorPrimaryDark"
- android:drawableStart="@drawable/ic_check_circle"
android:drawablePadding="8dp"
- android:drawableTint="?attr/colorOnPrimarySurface"
android:gravity="center_vertical"
android:padding="8dp"
android:textColor="?attr/colorOnPrimarySurface"
android:visibility="gone"
+ app:drawableStartCompat="@drawable/ic_check_circle"
+ app:drawableTint="?attr/colorOnPrimarySurface"
app:layout_constraintEnd_toStartOf="@+id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
diff --git a/cashier/src/main/res/layout/fragment_balance.xml b/cashier/src/main/res/layout/fragment_balance.xml
index fcd0e0a..5a11b2a 100644
--- a/cashier/src/main/res/layout/fragment_balance.xml
+++ b/cashier/src/main/res/layout/fragment_balance.xml
@@ -27,13 +27,13 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?attr/colorPrimaryDark"
- android:drawableStart="@drawable/ic_check_circle"
android:drawablePadding="8dp"
- android:drawableTint="?attr/colorOnPrimarySurface"
android:gravity="center_vertical"
android:padding="8dp"
android:textColor="?attr/colorOnPrimarySurface"
android:visibility="gone"
+ app:drawableStartCompat="@drawable/ic_check_circle"
+ app:drawableTint="?attr/colorOnPrimarySurface"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"