Message Details: Always use same text style for email address
This commit is contained in:
parent
169152e46f
commit
54bba36fc0
2 changed files with 30 additions and 17 deletions
|
@ -39,11 +39,11 @@ internal class ParticipantItem(
|
|||
|
||||
if (participant.displayName != null) {
|
||||
name.text = participant.displayName
|
||||
email.text = participant.emailAddress
|
||||
} else {
|
||||
name.text = participant.emailAddress
|
||||
email.isVisible = false
|
||||
name.isVisible = false
|
||||
}
|
||||
email.text = participant.emailAddress
|
||||
|
||||
menuAddContact.isVisible = !participant.isInContacts
|
||||
|
||||
if (item.showContactsPicture) {
|
||||
|
@ -60,8 +60,8 @@ internal class ParticipantItem(
|
|||
|
||||
override fun unbindView(item: ParticipantItem) {
|
||||
name.text = null
|
||||
name.isVisible = true
|
||||
email.text = null
|
||||
email.isVisible = true
|
||||
contactPicture.isVisible = true
|
||||
itemView.background = originalBackground
|
||||
itemView.isClickable = true
|
||||
|
|
|
@ -14,19 +14,14 @@
|
|||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:src="@drawable/ic_contact_picture"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="@+id/top_guideline" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constrainedWidth="true"
|
||||
|
@ -34,8 +29,8 @@
|
|||
app:layout_constraintEnd_toStartOf="@+id/menu_add_contact"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toEndOf="@id/contact_picture"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/start_guideline"
|
||||
app:layout_constraintTop_toTopOf="@+id/top_guideline"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:layout_goneMarginBottom="12dp"
|
||||
tools:text="Alice" />
|
||||
|
@ -45,17 +40,14 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bottom_guideline"
|
||||
app:layout_constraintEnd_toStartOf="@+id/menu_add_contact"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="@+id/name"
|
||||
app:layout_constraintStart_toEndOf="@id/start_guideline"
|
||||
app:layout_constraintTop_toBottomOf="@+id/name"
|
||||
tools:text="alice@domain.example" />
|
||||
|
||||
|
@ -88,4 +80,25 @@
|
|||
app:layout_constraintVertical_bias="0.0"
|
||||
app:srcCompat="@drawable/dots_vertical" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/start_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="72dp" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/top_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="16dp" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/bottom_guideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_end="16dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
Loading…
Reference in a new issue