From a209e13f58d27f8cf9dd7b1974da0dcb369e0858 Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 19 Nov 2020 18:48:44 +0100 Subject: [PATCH] Implemented showing unsupported banks in disabled state --- .../dankito/banking/ui/android/adapter/BankListAdapter.kt | 3 +++ .../color/text_color_primary_including_disabled_state.xml | 8 ++++++++ .../text_color_secondary_including_disabled_state.xml | 8 ++++++++ .../src/main/res/layout/list_item_bank_info.xml | 6 +++--- 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 ui/BankingAndroidApp/src/main/res/color/text_color_primary_including_disabled_state.xml create mode 100644 ui/BankingAndroidApp/src/main/res/color/text_color_secondary_including_disabled_state.xml diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/BankListAdapter.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/BankListAdapter.kt index 7f018316..90ca7fc8 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/BankListAdapter.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/adapter/BankListAdapter.kt @@ -27,10 +27,13 @@ open class BankListAdapter(protected val itemClicked: ((BankInfo) -> Unit)? = nu } viewHolder.txtvwBankName.text = item.name + viewHolder.txtvwBankName.isEnabled = item.supportsFinTs3_0 viewHolder.txtvwBankCode.text = item.bankCode + viewHolder.txtvwBankCode.isEnabled = item.supportsFinTs3_0 viewHolder.txtvwBankAddress.text = item.postalCode + " " + item.city + viewHolder.txtvwBankAddress.isEnabled = item.supportsFinTs3_0 viewHolder.itemView.setOnClickListener { itemClicked?.invoke(item) diff --git a/ui/BankingAndroidApp/src/main/res/color/text_color_primary_including_disabled_state.xml b/ui/BankingAndroidApp/src/main/res/color/text_color_primary_including_disabled_state.xml new file mode 100644 index 00000000..6742cb88 --- /dev/null +++ b/ui/BankingAndroidApp/src/main/res/color/text_color_primary_including_disabled_state.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ui/BankingAndroidApp/src/main/res/color/text_color_secondary_including_disabled_state.xml b/ui/BankingAndroidApp/src/main/res/color/text_color_secondary_including_disabled_state.xml new file mode 100644 index 00000000..14fee307 --- /dev/null +++ b/ui/BankingAndroidApp/src/main/res/color/text_color_secondary_including_disabled_state.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ui/BankingAndroidApp/src/main/res/layout/list_item_bank_info.xml b/ui/BankingAndroidApp/src/main/res/layout/list_item_bank_info.xml index fe6d037b..01bdb88d 100644 --- a/ui/BankingAndroidApp/src/main/res/layout/list_item_bank_info.xml +++ b/ui/BankingAndroidApp/src/main/res/layout/list_item_bank_info.xml @@ -48,7 +48,7 @@ style="@style/TextAppearance.AppCompat.Medium" android:gravity="center_vertical" android:textSize="@dimen/list_item_bank_info_bank_name_text_size" - android:textColor="@color/textColorPrimary" + android:textColor="@color/text_color_primary_including_disabled_state" />