Implemented showing unsupported banks in disabled state

This commit is contained in:
dankito 2020-11-19 18:48:44 +01:00
parent 8aa1820e9c
commit a209e13f58
4 changed files with 22 additions and 3 deletions

View File

@ -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)

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/disabledColor" />
<item android:color="@color/textColorPrimary" />
</selector>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/disabledColor" />
<item android:color="@color/textColorSecondary" />
</selector>

View File

@ -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"
/>
<TextView
@ -61,7 +61,7 @@
android:layout_alignParentBottom="true"
android:gravity="center_vertical"
style="@style/TextAppearance.AppCompat.Small"
android:textColor="@color/textColorPrimary"
android:textColor="@color/text_color_primary_including_disabled_state"
/>
<TextView
@ -78,7 +78,7 @@
android:lines="1"
android:ellipsize="end"
style="@style/TextAppearance.AppCompat.Small"
android:textColor="@color/textColorSecondary"
android:textColor="@color/text_color_secondary_including_disabled_state"
/>
</RelativeLayout>