Implemented displaying bank and bank account data

This commit is contained in:
dankito 2020-09-28 16:58:26 +02:00
parent 25089558c1
commit 74d30df248
10 changed files with 137 additions and 5 deletions

View File

@ -43,6 +43,12 @@ open class BankAccountSettingsDialog : SettingsDialogBase() {
} }
edtxtBankAccountName.text = account.displayName edtxtBankAccountName.text = account.displayName
lvlAccountHolderName.value = account.accountHolderName
lvlAccountIdentifier.value = account.identifier
lvlSubAccountNumber.setValueAndVisibilityIfValueIsSet(account.subAccountNumber)
lvlIban.setValueAndVisibilityIfValueIsSet(account.iban)
lvlAccountType.value = account.type.toString() // TODO: translate
} }
} }

View File

@ -65,6 +65,11 @@ open class BankSettingsDialog : SettingsDialogBase() {
bankAccountsAdapter.onClickListener = { navigationToBankAccountSettingsDialog(it.account) } bankAccountsAdapter.onClickListener = { navigationToBankAccountSettingsDialog(it.account) }
bankAccountsAdapter.itemDropped = { oldPosition, oldItem, newPosition, newItem -> reorderedBankAccounts(oldPosition, oldItem.account, newPosition, newItem.account) } bankAccountsAdapter.itemDropped = { oldPosition, oldItem, newPosition, newItem -> reorderedBankAccounts(oldPosition, oldItem.account, newPosition, newItem.account) }
lvlBankCode.value = bank.bankCode
lvlBic.value = bank.bic
lvlCustomerName.value = bank.customerName
lvlFinTsServerAddress.value = bank.finTsServerAddress
btnDeleteAccount.setOnClickListener { askUserToDeleteAccount() } btnDeleteAccount.setOnClickListener { askUserToDeleteAccount() }
} }
} }

View File

@ -19,6 +19,7 @@
<net.dankito.banking.ui.android.views.FormSectionTitle <net.dankito.banking.ui.android.views.FormSectionTitle
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/form_section_title_margin_bottom_for_subsequent_edit_text"
android:text="@string/online_banking_credentials_section_title" android:text="@string/online_banking_credentials_section_title"
/> />

View File

@ -63,6 +63,57 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<net.dankito.banking.ui.android.views.FormSectionTitle
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dialog_bank_account_settings_account_data_section_title"
/>
<net.dankito.banking.ui.android.views.FormLabelledValue
android:id="@+id/lvlAccountHolderName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:label="@string/dialog_bank_account_setting_account_holder_name"
/>
<net.dankito.banking.ui.android.views.FormLabelledValue
android:id="@+id/lvlAccountIdentifier"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:label="@string/dialog_bank_account_setting_bank_account_identifier"
/>
<net.dankito.banking.ui.android.views.FormLabelledValue
android:id="@+id/lvlSubAccountNumber"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:label="@string/dialog_bank_account_setting_sub_account_number"
/>
<net.dankito.banking.ui.android.views.FormLabelledValue
android:id="@+id/lvlIban"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:label="@string/iban"
/>
<net.dankito.banking.ui.android.views.FormLabelledValue
android:id="@+id/lvlAccountType"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:label="@string/dialog_bank_account_setting_bank_account_type"
/>
</LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

View File

@ -65,6 +65,7 @@
<net.dankito.banking.ui.android.views.FormSectionTitle <net.dankito.banking.ui.android.views.FormSectionTitle
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/form_section_title_margin_bottom_for_subsequent_edit_text"
android:text="@string/online_banking_credentials_section_title" android:text="@string/online_banking_credentials_section_title"
/> />
@ -92,7 +93,50 @@
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dialog_bank_settings_bank_accounts_section_margin_bottom" >
<net.dankito.banking.ui.android.views.FormSectionTitle
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dialog_bank_settings_bank_data_section_title"
/>
<net.dankito.banking.ui.android.views.FormLabelledValue
android:id="@+id/lvlBankCode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:label="@string/bank_code"
/>
<net.dankito.banking.ui.android.views.FormLabelledValue
android:id="@+id/lvlBic"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:label="@string/bic"
/>
<net.dankito.banking.ui.android.views.FormLabelledValue
android:id="@+id/lvlCustomerName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:label="@string/customer_name"
/>
<net.dankito.banking.ui.android.views.FormLabelledValue
android:id="@+id/lvlFinTsServerAddress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:label="@string/fints_server_address"
/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/form_section_extra_margin_top"
> >
<net.dankito.banking.ui.android.views.FormSectionTitle <net.dankito.banking.ui.android.views.FormSectionTitle
@ -114,6 +158,7 @@
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dialog_bank_settings_delete_account_margin_top"
android:gravity="center" android:gravity="center"
> >

View File

@ -11,7 +11,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/form_section_title_margin_top" android:layout_marginTop="@dimen/form_section_title_margin_top"
android:layout_marginBottom="@dimen/form_section_title_margin_bottom"
android:textSize="@dimen/form_section_title_text_size" android:textSize="@dimen/form_section_title_text_size"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
/> />

View File

@ -22,6 +22,12 @@
<string name="accounts">Konten</string> <string name="accounts">Konten</string>
<string name="bank_credentials">Bankzugänge</string> <string name="bank_credentials">Bankzugänge</string>
<string name="bank_code">Bankleitzahl</string>
<string name="bic">BIC</string>
<string name="iban">IBAN</string>
<string name="customer_name">Kontoinhaber</string>
<string name="fints_server_address">FinTS Server</string>
<string name="navigation_drawer_open">Seitenleiste öffnen</string> <string name="navigation_drawer_open">Seitenleiste öffnen</string>
<string name="navigation_drawer_close">Seitenleiste schließen</string> <string name="navigation_drawer_close">Seitenleiste schließen</string>
<string name="nav_header_title">@string/app_name</string> <string name="nav_header_title">@string/app_name</string>
@ -104,9 +110,15 @@
<string name="dialog_bank_settings_bank_name">Name</string> <string name="dialog_bank_settings_bank_name">Name</string>
<string name="dialog_bank_settings_bank_data_section_title">Bankdaten</string>
<string name="dialog_bank_settings_delete_account">Konto löschen</string> <string name="dialog_bank_settings_delete_account">Konto löschen</string>
<string name="dialog_bank_account_settings_account_name">Name</string> <string name="dialog_bank_account_settings_account_name">Name</string>
<string name="dialog_bank_account_settings_account_data_section_title">Kontodaten</string>
<string name="dialog_bank_account_setting_account_holder_name">Kontoinhaber</string>
<string name="dialog_bank_account_setting_bank_account_identifier">Kontonummer</string>
<string name="dialog_bank_account_setting_sub_account_number">Unterkontenmerkmal</string>
<string name="dialog_bank_account_setting_bank_account_type">Typ</string>
<string name="alert_ask_discard_changes_title">Nicht gespeicherte Änderungen</string> <string name="alert_ask_discard_changes_title">Nicht gespeicherte Änderungen</string>

View File

@ -19,6 +19,7 @@
<dimen name="form_padding">12dp</dimen> <dimen name="form_padding">12dp</dimen>
<dimen name="form_section_height">60dp</dimen> <dimen name="form_section_height">60dp</dimen>
<dimen name="form_section_margin_top">6dp</dimen> <dimen name="form_section_margin_top">6dp</dimen>
<dimen name="form_section_extra_margin_top">8dp</dimen>
<dimen name="form_section_margin_bottom">6dp</dimen> <dimen name="form_section_margin_bottom">6dp</dimen>
<dimen name="form_section_title_text_size">15sp</dimen> <dimen name="form_section_title_text_size">15sp</dimen>
<dimen name="form_section_title_margin_top">18dp</dimen> <dimen name="form_section_title_margin_top">18dp</dimen>
@ -158,10 +159,10 @@
<dimen name="list_item_bank_data_icon_margin_right">8dp</dimen> <dimen name="list_item_bank_data_icon_margin_right">8dp</dimen>
<dimen name="list_item_bank_data_bank_name_text_size">16sp</dimen> <dimen name="list_item_bank_data_bank_name_text_size">16sp</dimen>
<dimen name="dialog_bank_settings_bank_accounts_section_margin_bottom">18dp</dimen> <dimen name="dialog_bank_settings_delete_account_margin_top">18dp</dimen>
<dimen name="dialog_bank_settings_delete_account_button_height">50dp</dimen> <dimen name="dialog_bank_settings_delete_account_button_height">50dp</dimen>
<dimen name="list_item_draggable_bank_account_height">35dp</dimen> <dimen name="list_item_draggable_bank_account_height">32dp</dimen>
<dimen name="list_item_draggable_bank_account_padding">2dp</dimen> <dimen name="list_item_draggable_bank_account_padding">2dp</dimen>
<dimen name="list_item_draggable_bank_account_account_name_text_size">16sp</dimen> <dimen name="list_item_draggable_bank_account_account_name_text_size">16sp</dimen>

View File

@ -22,6 +22,12 @@
<string name="accounts">Accounts</string> <string name="accounts">Accounts</string>
<string name="bank_credentials">Bank credentials</string> <string name="bank_credentials">Bank credentials</string>
<string name="bank_code">Bank code</string>
<string name="bic">BIC</string>
<string name="iban">IBAN</string>
<string name="customer_name">Customer name</string>
<string name="fints_server_address">FinTS server</string>
<string name="navigation_drawer_open">Open navigation drawer</string> <string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string> <string name="navigation_drawer_close">Close navigation drawer</string>
<string name="nav_header_title">@string/app_name</string> <string name="nav_header_title">@string/app_name</string>
@ -104,9 +110,15 @@
<string name="dialog_bank_settings_bank_name">Name</string> <string name="dialog_bank_settings_bank_name">Name</string>
<string name="dialog_bank_settings_bank_data_section_title">Bank data</string>
<string name="dialog_bank_settings_delete_account">Delete account</string> <string name="dialog_bank_settings_delete_account">Delete account</string>
<string name="dialog_bank_account_settings_account_name">Name</string> <string name="dialog_bank_account_settings_account_name">Name</string>
<string name="dialog_bank_account_settings_account_data_section_title">Account data</string>
<string name="dialog_bank_account_setting_account_holder_name">Account holder name</string>
<string name="dialog_bank_account_setting_bank_account_identifier">Account identifier</string>
<string name="dialog_bank_account_setting_sub_account_number">Sub account number</string>
<string name="dialog_bank_account_setting_bank_account_type">Type</string>
<string name="alert_ask_discard_changes_title">Unsaved changed</string> <string name="alert_ask_discard_changes_title">Unsaved changed</string>

View File

@ -164,7 +164,7 @@ Unfortunately, Bankmeister cannot know whether a bank charges for real-time tran
"Credentials" = "Credentials"; "Credentials" = "Credentials";
"Customer name" = "Customer name"; "Customer name" = "Customer name";
"FinTS server address" = "FinTS server address"; "FinTS server address" = "FinTS server";
"Delete account" = "Delete account"; "Delete account" = "Delete account";