Fixed list_item_bank_info: - Texts now align well - Added icons for supported and unsupported banks

This commit is contained in:
dankl 2019-12-31 00:28:52 +01:00 committed by dankito
parent dab5de1c12
commit 579250fdb8
14 changed files with 53 additions and 34 deletions

View File

@ -11,6 +11,7 @@ import net.dankito.banking.fints4java.android.R
import net.dankito.banking.fints4java.android.ui.adapter.filter.BankInfoFilter
import net.dankito.fints.banks.BankFinder
import net.dankito.fints.model.BankInfo
import net.dankito.utils.android.extensions.setTintColor
import net.dankito.utils.android.ui.adapter.ListAdapter
@ -24,7 +25,14 @@ open class BankListAdapter(protected val bankFinder: BankFinder = BankFinder())
val view = convertView ?: inflater?.inflate(R.layout.list_item_bank_info, parent, false)
view?.let {
// view.imgSupportsFints30.setImageResource(if (item.supportsFinTs3_0) ) // TODO
if (item.supportsFinTs3_0) {
view.imgSupportsFints30.setImageResource(R.drawable.ic_check_circle_white_48dp)
view.imgSupportsFints30.setTintColor(R.color.list_item_bank_info_bank_supported)
}
else {
view.imgSupportsFints30.setImageResource(R.drawable.ic_clear_white_48dp)
view.imgSupportsFints30.setTintColor(R.color.list_item_bank_info_bank_not_supported)
}
view.txtvwBankName.text = item.name

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

View File

@ -16,55 +16,62 @@
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:src="@android:drawable/ic_delete"
/>
<LinearLayout
android:orientation="vertical"
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/imgSupportsFints30"
android:layout_toEndOf="@+id/imgSupportsFints30"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@+id/imgSupportsFints30"
android:layout_toEndOf="@+id/imgSupportsFints30"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
>
>
<TextView
android:id="@+id/txtvwBankName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_above="@+id/txtvwBankCode"
style="@style/TextAppearance.AppCompat.Medium"
/>
android:gravity="center_vertical"
android:textSize="@dimen/list_item_bank_info_bank_name_text_size"
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
<TextView
android:id="@+id/txtvwBankCode"
android:layout_width="@dimen/list_item_bank_info_bank_code_width"
android:layout_height="@dimen/list_item_bank_info_bank_code_and_address_height"
>
android:layout_marginBottom="@dimen/list_item_bank_info_bank_name_margin_bottom"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
style="@style/TextAppearance.AppCompat.Small"
android:gravity="center_vertical"
/>
<TextView
android:id="@+id/txtvwBankCode"
android:layout_width="@dimen/list_item_bank_info_bank_code_width"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/list_item_bank_info_bank_name_margin_bottom"
style="@style/TextAppearance.AppCompat.Small"
android:gravity="center_vertical"
/>
<TextView
android:id="@+id/txtvwBankAddress"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_toRightOf="@id/txtvwBankCode"
android:layout_toEndOf="@id/txtvwBankCode"
android:layout_alignTop="@id/txtvwBankCode"
android:layout_alignBottom="@id/txtvwBankCode"
style="@style/TextAppearance.AppCompat.Small"
android:gravity="center_vertical"
/>
<TextView
android:id="@+id/txtvwBankAddress"
android:layout_width="wrap_content"
android:layout_height="match_parent"
style="@style/TextAppearance.AppCompat.Small"
android:gravity="center_vertical"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

View File

@ -6,4 +6,7 @@
<color name="view_tan_generator_marker_background">@android:color/darker_gray</color>
<color name="list_item_bank_info_bank_supported">#ff669900</color>
<color name="list_item_bank_info_bank_not_supported">#ffcc0000</color>
</resources>

View File

@ -25,9 +25,10 @@
<dimen name="list_item_bank_info_height">60dp</dimen>
<dimen name="list_item_bank_info_icon_supports_fints_30_height">60dp</dimen>
<dimen name="list_item_bank_info_icon_supports_fints_30_width">60dp</dimen>
<dimen name="list_item_bank_info_bank_name_margin_bottom">12dp</dimen>
<dimen name="list_item_bank_info_bank_code_and_address_height">30dp</dimen>
<dimen name="list_item_bank_info_bank_code_width">80dp</dimen>
<dimen name="list_item_bank_info_bank_name_text_size">16sp</dimen>
<dimen name="list_item_bank_info_bank_name_margin_bottom">4dp</dimen>
<dimen name="list_item_bank_info_bank_code_and_address_height">18dp</dimen>
<dimen name="list_item_bank_info_bank_code_width">74dp</dimen>
<dimen name="view_successfully_added_account_padding">12dp</dimen>
<dimen name="view_successfully_added_account_message_margin_bottom">12dp</dimen>