From 07fdab41a4806b99b4948db838d1dd9552ccec80 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Wed, 20 Mar 2019 14:29:11 -0600 Subject: [PATCH] Added a No Transactions message to theTransactionsActivity when there are no transactions yet for the current account. --- .../fragments/TransactionsFragment.kt | 8 +++++ .../main/res/layout/fragment_transactions.xml | 29 ++++++++++++++----- app/src/main/res/values-es/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/TransactionsFragment.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/TransactionsFragment.kt index bcd7cf5..6315017 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/TransactionsFragment.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/TransactionsFragment.kt @@ -86,6 +86,14 @@ class TransactionsFragment : Fragment(), FilterOptionsDialog.OnFilterOptionsSele this.transfersDetails.clear() this.transfersDetails.addAll(transfersDetails) applyFilterOptions(false) + + if (transfersDetails.isEmpty()) { + rvTransactions.visibility = View.GONE + tvEmpty.visibility = View.VISIBLE + } else { + rvTransactions.visibility = View.VISIBLE + tvEmpty.visibility = View.GONE + } }) // Set custom touch listener to handle bounce/stretch effect diff --git a/app/src/main/res/layout/fragment_transactions.xml b/app/src/main/res/layout/fragment_transactions.xml index 430ce36..f378a15 100644 --- a/app/src/main/res/layout/fragment_transactions.xml +++ b/app/src/main/res/layout/fragment_transactions.xml @@ -1,11 +1,26 @@ - \ No newline at end of file + android:layout_height="match_parent"> + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 2400bee..47803ed 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -47,6 +47,7 @@ Buscar Filtrar Exportar + Sin Transacciones Opciones de filtrado diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4a11ce1..86c153a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -47,6 +47,7 @@ Search Filter Export + No Transactions Filter options