Implemented displaying account features

This commit is contained in:
dankito 2020-09-28 21:14:11 +02:00
parent b3d92d4e64
commit 364b818d84
4 changed files with 43 additions and 0 deletions

View File

@ -7,6 +7,8 @@ import kotlinx.android.synthetic.main.dialog_bank_account_settings.*
import kotlinx.android.synthetic.main.dialog_bank_account_settings.view.*
import kotlinx.android.synthetic.main.dialog_bank_settings.view.toolbar
import net.dankito.banking.ui.android.R
import net.dankito.banking.ui.android.adapter.CheckableValueAdapterItem
import net.dankito.banking.ui.android.adapter.FastAdapterRecyclerView
import net.dankito.banking.ui.model.TypedBankAccount
@ -49,6 +51,15 @@ open class BankAccountSettingsDialog : SettingsDialogBase() {
lvlSubAccountNumber.setValueAndVisibilityIfValueIsSet(account.subAccountNumber)
lvlIban.setValueAndVisibilityIfValueIsSet(account.iban)
lvlAccountType.value = account.type.toString() // TODO: translate
val context = rootView.context
val accountFeaturesItems = listOf(
CheckableValueAdapterItem(account.supportsRetrievingBalance, context, R.string.dialog_bank_account_settings_account_features_supports_retrieving_balance),
CheckableValueAdapterItem(account.supportsRetrievingAccountTransactions, context, R.string.dialog_bank_account_settings_account_features_supports_retrieving_account_transactions),
CheckableValueAdapterItem(account.supportsTransferringMoney, context, R.string.dialog_bank_account_settings_account_features_supports_money_transfer),
CheckableValueAdapterItem(account.supportsRealTimeTransfer, context, R.string.dialog_bank_account_settings_account_features_supports_real_time_transfer)
)
FastAdapterRecyclerView(rootView.rcyAccountFeatures, accountFeaturesItems)
}
}

View File

@ -114,6 +114,28 @@
</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
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dialog_bank_account_settings_account_features_section_title"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcyAccountFeatures"
android:layout_width="match_parent"
android:layout_height="@dimen/dialog_bank_accounts_settings_list_account_features_height"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@ -120,6 +120,11 @@
<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="dialog_bank_account_settings_account_features_section_title">Unterstützt</string>
<string name="dialog_bank_account_settings_account_features_supports_retrieving_balance">Kontostand abrufen</string>
<string name="dialog_bank_account_settings_account_features_supports_retrieving_account_transactions">Kontoumsätze abrufen</string>
<string name="dialog_bank_account_settings_account_features_supports_money_transfer">Überweisen</string>
<string name="dialog_bank_account_settings_account_features_supports_real_time_transfer">Echtzeitüberweisung</string>
<string name="alert_ask_discard_changes_title">Nicht gespeicherte Änderungen</string>

View File

@ -120,6 +120,11 @@
<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="dialog_bank_account_settings_account_features_section_title">Supports</string>
<string name="dialog_bank_account_settings_account_features_supports_retrieving_balance">Retrieve balance</string>
<string name="dialog_bank_account_settings_account_features_supports_retrieving_account_transactions">Retrieve transactions</string>
<string name="dialog_bank_account_settings_account_features_supports_money_transfer">Money transfer</string>
<string name="dialog_bank_account_settings_account_features_supports_real_time_transfer">Real-time transfer</string>
<string name="alert_ask_discard_changes_title">Unsaved changed</string>