Added a No Transactions message to theTransactionsActivity when there are no transactions yet for the current account.
This commit is contained in:
parent
50526c6bda
commit
07fdab41a4
4 changed files with 32 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvTransactions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -9,3 +13,14 @@
|
|||
android:clipToPadding="false"
|
||||
tools:listitem="@layout/item_transaction"
|
||||
tools:itemCount="6"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvEmpty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/text__no_transactions"
|
||||
android:textAppearance="@style/TextAppearance.Bitsy.Body1"
|
||||
android:textSize="18sp"/>
|
||||
|
||||
</FrameLayout>
|
|
@ -47,6 +47,7 @@
|
|||
<string name="title_search">Buscar</string>
|
||||
<string name="title_filter">Filtrar</string>
|
||||
<string name="title_export">Exportar</string>
|
||||
<string name="text__no_transactions">Sin Transacciones</string>
|
||||
|
||||
<!-- Transactions filter options -->
|
||||
<string name="title_filter_options">Opciones de filtrado</string>
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
<string name="title_search">Search</string>
|
||||
<string name="title_filter">Filter</string>
|
||||
<string name="title_export">Export</string>
|
||||
<string name="text__no_transactions">No Transactions</string>
|
||||
|
||||
<!-- Transactions filter options -->
|
||||
<string name="title_filter_options">Filter options</string>
|
||||
|
|
Loading…
Reference in a new issue