use the newer contact thumbnail layout

This commit is contained in:
tibbi
2023-06-30 10:27:17 +02:00
parent 7b80aa1b9f
commit f2b0428679
3 changed files with 6 additions and 5 deletions

View File

@@ -62,7 +62,7 @@ android {
} }
dependencies { dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:6f69c8c105' implementation 'com.github.SimpleMobileTools:Simple-Commons:35d685c042'
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61' implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
implementation 'me.grantland:autofittextview:0.2.1' implementation 'me.grantland:autofittextview:0.2.1'
} }

View File

@@ -11,9 +11,9 @@ import android.view.Menu
import android.view.MotionEvent import android.view.MotionEvent
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.FrameLayout
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.ItemTouchHelper import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
@@ -270,7 +270,8 @@ class ContactsAdapter(
private fun setupView(view: View, contact: Contact, holder: ViewHolder) { private fun setupView(view: View, contact: Contact, holder: ViewHolder) {
view.apply { view.apply {
findViewById<FrameLayout>(R.id.item_contact_frame).isSelected = selectedKeys.contains(contact.rawId) setupViewBackground(activity)
findViewById<ConstraintLayout>(R.id.item_contact_frame).isSelected = selectedKeys.contains(contact.rawId)
findViewById<TextView>(R.id.item_contact_name).apply { findViewById<TextView>(R.id.item_contact_name).apply {
setTextColor(textColor) setTextColor(textColor)
setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize) setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize)

View File

@@ -33,9 +33,9 @@
android:layout_marginEnd="@dimen/small_margin" android:layout_marginEnd="@dimen/small_margin"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:textSize="@dimen/bigger_text_size"
android:textDirection="locale"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:textDirection="locale"
android:textSize="@dimen/bigger_text_size"
app:layout_constraintBottom_toTopOf="@id/item_recents_date_time" app:layout_constraintBottom_toTopOf="@id/item_recents_date_time"
app:layout_constraintEnd_toStartOf="@+id/overflow_menu_icon" app:layout_constraintEnd_toStartOf="@+id/overflow_menu_icon"
app:layout_constraintStart_toEndOf="@+id/item_recents_image" app:layout_constraintStart_toEndOf="@+id/item_recents_image"