diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/home/HomeFragment.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/home/HomeFragment.kt index 30cc59fd..f8ee61dc 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/home/HomeFragment.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/home/HomeFragment.kt @@ -95,6 +95,7 @@ class HomeFragment : Fragment() { } rootView.btnRetrieveTransactions.setOnClickListener { fetchTransactions() } + rootView.btnAddAccount.setOnClickListener { presenter.showAddAccountDialog() } return rootView } @@ -262,6 +263,7 @@ class HomeFragment : Fragment() { rcyvwAccountTransactions.visibility = if (haveTransactionsBeenRetrieved) View.VISIBLE else View.GONE lytNoTransactionsFetched.visibility = if (haveTransactionsBeenRetrieved || noAccountsAddedYet) View.GONE else View.VISIBLE btnRetrieveTransactions.visibility = if (transactionsRetrievalState == TransactionsRetrievalState.AccountDoesNotSupportFetchingTransactions) View.GONE else View.VISIBLE + btnAddAccount.visibility = if (noAccountsAddedYet) View.VISIBLE else View.GONE val transactionsRetrievalStateMessageId = when (transactionsRetrievalState) { TransactionsRetrievalState.AccountDoesNotSupportFetchingTransactions -> R.string.fragment_home_transactions_retrieval_state_account_does_not_support_retrieving_transactions diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/views/DrawerView.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/views/DrawerView.kt index 0a7e04e3..0a547575 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/views/DrawerView.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/views/DrawerView.kt @@ -90,7 +90,7 @@ open class DrawerView( , PrimaryDrawerItem() - .withName(R.string.drawer_menu_add_bank_account_title) + .withName(R.string.add_account) .withIdentifier(AddAccountId) .withLevel(AccountLevel) .withIcon(activity, GoogleMaterial.Icon.gmd_add, R.color.primaryTextColor_Dark) diff --git a/ui/BankingAndroidApp/src/main/res/layout/fragment_home.xml b/ui/BankingAndroidApp/src/main/res/layout/fragment_home.xml index 72a9af38..1c03edbf 100644 --- a/ui/BankingAndroidApp/src/main/res/layout/fragment_home.xml +++ b/ui/BankingAndroidApp/src/main/res/layout/fragment_home.xml @@ -100,6 +100,21 @@ +