From ecc2c18f4dabc442ca14607ec0c2cfe3e2fe4116 Mon Sep 17 00:00:00 2001 From: Naveen Date: Sat, 19 Nov 2022 01:34:46 +0530 Subject: [PATCH] Avoid overlapping views Also removed the unnecessary parent layout --- .../dialer/adapters/RecentCallsAdapter.kt | 2 +- app/src/main/res/layout/item_recent_call.xml | 227 +++++++++--------- 2 files changed, 114 insertions(+), 115 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/dialer/adapters/RecentCallsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/dialer/adapters/RecentCallsAdapter.kt index 98a01cea..66de686f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/dialer/adapters/RecentCallsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/dialer/adapters/RecentCallsAdapter.kt @@ -274,7 +274,7 @@ class RecentCallsAdapter( private fun setupView(view: View, call: RecentCall) { view.apply { - item_recents_frame.isSelected = selectedKeys.contains(call.id) + item_recents_holder.isSelected = selectedKeys.contains(call.id) var nameToShow = SpannableString(call.name) if (call.specificType.isNotEmpty()) { nameToShow = SpannableString("${call.name} - ${call.specificType}") diff --git a/app/src/main/res/layout/item_recent_call.xml b/app/src/main/res/layout/item_recent_call.xml index 0e35bccf..3bfae1d6 100644 --- a/app/src/main/res/layout/item_recent_call.xml +++ b/app/src/main/res/layout/item_recent_call.xml @@ -1,132 +1,131 @@ - + android:foreground="@drawable/selector" + android:paddingTop="@dimen/medium_margin" + android:paddingBottom="@dimen/medium_margin"> - + + + android:layout_marginStart="@dimen/small_margin" + android:layout_marginEnd="@dimen/small_margin" + android:ellipsize="end" + android:maxLines="1" + android:textSize="@dimen/bigger_text_size" + app:layout_constraintBottom_toTopOf="@id/item_recents_date_time" + app:layout_constraintEnd_toStartOf="@+id/overflow_menu_icon" + app:layout_constraintStart_toEndOf="@+id/item_recents_image" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_chainStyle="spread_inside" + tools:text="John Doe" /> - + - + - + - + - + - + - + - - - - - - +