Added button to add account if no accounts have been added yet
This commit is contained in:
parent
f811d25ffd
commit
e78e0e93f9
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -100,6 +100,21 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnAddAccount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/fragment_account_transaction_fetch_transactions_button_height"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"
|
||||
android:textAlignment="gravity"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:textSize="@dimen/textAppearanceMediumTextSize"
|
||||
android:textColor="@color/linkColor"
|
||||
android:text="@string/add_account"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
<string name="search">Suchen</string>
|
||||
|
||||
<string name="add_account">Konto hinzufügen</string>
|
||||
|
||||
<string name="online_banking_credentials_section_title">Online-Banking Zugangsdaten</string>
|
||||
<string name="online_banking_credentials_login_name">Login Name</string>
|
||||
<string name="online_banking_credentials_password">Passwort</string>
|
||||
|
@ -23,7 +25,6 @@
|
|||
<string name="nav_header_version_label">Version\u0020</string>
|
||||
<string name="nav_header_desc">Navigationsbereich</string>
|
||||
<string name="drawer_menu_bank_accounts_section_title">Konten</string>
|
||||
<string name="drawer_menu_add_bank_account_title">Konto hinzufügen</string>
|
||||
<string name="drawer_menu_all_bank_accounts_title">Alle Konten</string>
|
||||
<string name="drawer_menu_send_message_log_title">Message Log senden</string>
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<dimen name="fragment_account_transaction_transactions_summary_height">24dp</dimen>
|
||||
<dimen name="fragment_account_transaction_fetch_transactions_button_height">40dp</dimen>
|
||||
<dimen name="fragment_account_transaction_fetch_transactions_button_margin_top">18dp</dimen>
|
||||
<dimen name="fragment_account_transaction_add_account_button_height">40dp</dimen>
|
||||
<dimen name="fragment_account_transaction_fetch_all_transactions_overlay_height">48dp</dimen>
|
||||
<dimen name="fragment_account_transaction_button_close_fetch_all_transactions_overlay_size">20dp</dimen>
|
||||
<dimen name="fragment_account_transaction_button_close_fetch_all_transactions_overlay_margin_end">6dp</dimen>
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
<string name="search">Search</string>
|
||||
|
||||
<string name="add_account">Add account</string>
|
||||
|
||||
<string name="online_banking_credentials_section_title">Online banking login data</string>
|
||||
<string name="online_banking_credentials_login_name">Login name</string>
|
||||
<string name="online_banking_credentials_password">Password</string>
|
||||
|
@ -24,7 +26,6 @@
|
|||
<string name="nav_header_desc">Navigation header</string>
|
||||
<string name="drawer_menu_bank_accounts_section_title">Accounts</string>
|
||||
<string name="drawer_menu_all_bank_accounts_title">All accounts</string>
|
||||
<string name="drawer_menu_add_bank_account_title">Add account</string>
|
||||
<string name="drawer_menu_send_message_log_title">Send message log</string>
|
||||
|
||||
<string name="floating_action_menu_add_account">Account</string>
|
||||
|
|
Loading…
Reference in New Issue