mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-21 20:48:29 +00:00
55 lines
No EOL
3 KiB
XML
55 lines
No EOL
3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
|
|
<data>
|
|
<import type="android.view.View" />
|
|
<import type="org.linphone.core.SecurityLevel" />
|
|
<variable
|
|
name="model"
|
|
type="org.linphone.contacts.AbstractAvatarModel" />
|
|
</data>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content">
|
|
|
|
<ImageView
|
|
style="@style/avatar_imageview"
|
|
android:id="@+id/avatar"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:contentDescription="@null"
|
|
coilHugeAvatar="@{model}"
|
|
app:layout_constraintDimensionRatio="1:1"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
|
|
<ImageView
|
|
android:id="@+id/trust_overlay"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:contentDescription="@null"
|
|
android:src="@{model.trust == SecurityLevel.Unsafe ? @drawable/shape_circle_unsafe_contact_large_overlay : @drawable/shape_circle_trusted_contact_large_overlay, default=@drawable/shape_circle_trusted_contact_large_overlay}"
|
|
android:visibility="@{model.showTrust && (model.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.trust == SecurityLevel.Unsafe) ? View.VISIBLE : View.GONE, default=gone}"
|
|
app:layout_constraintEnd_toEndOf="@id/avatar"
|
|
app:layout_constraintStart_toStartOf="@id/avatar"
|
|
app:layout_constraintTop_toTopOf="@id/avatar"
|
|
app:layout_constraintBottom_toBottomOf="@id/avatar"/>
|
|
|
|
<ImageView
|
|
android:id="@+id/trust_badge"
|
|
android:layout_width="@dimen/avatar_presence_badge_in_call_size"
|
|
android:layout_height="@dimen/avatar_presence_badge_in_call_size"
|
|
android:layout_marginStart="@dimen/avatar_presence_badge_in_call_end_margin"
|
|
android:src="@{model.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @drawable/trusted : @drawable/not_trusted, default=@drawable/trusted}"
|
|
android:visibility="@{model.showTrust && (model.trust == SecurityLevel.EndToEndEncryptedAndVerified || model.trust == SecurityLevel.Unsafe) ? View.VISIBLE : View.GONE, default=gone}"
|
|
android:contentDescription="@{model.trust == SecurityLevel.EndToEndEncryptedAndVerified ? @string/content_description_trusted_contact_icon : @string/content_description_not_trusted_contact_icon}"
|
|
app:layout_constraintStart_toStartOf="@id/avatar"
|
|
app:layout_constraintBottom_toBottomOf="@id/avatar"/>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</layout> |