kopia lustrzana https://github.com/ryukoposting/Signal-Android
Do not allow BadgeImageView to control its own visibility.
rodzic
fb0b1af056
commit
997f6ef534
|
@ -31,7 +31,7 @@ class BadgeImageView @JvmOverloads constructor(
|
|||
fun setBadgeFromRecipient(recipient: Recipient?) {
|
||||
getGlideRequests()?.let {
|
||||
setBadgeFromRecipient(recipient, it)
|
||||
}
|
||||
} ?: setImageDrawable(null)
|
||||
}
|
||||
|
||||
fun setBadgeFromRecipient(recipient: Recipient?, glideRequests: GlideRequests) {
|
||||
|
@ -45,12 +45,10 @@ class BadgeImageView @JvmOverloads constructor(
|
|||
fun setBadge(badge: Badge?) {
|
||||
getGlideRequests()?.let {
|
||||
setBadge(badge, it)
|
||||
}
|
||||
} ?: setImageDrawable(null)
|
||||
}
|
||||
|
||||
fun setBadge(badge: Badge?, glideRequests: GlideRequests) {
|
||||
visible = badge != null
|
||||
|
||||
if (badge != null) {
|
||||
glideRequests
|
||||
.load(badge)
|
||||
|
@ -60,6 +58,7 @@ class BadgeImageView @JvmOverloads constructor(
|
|||
} else {
|
||||
glideRequests
|
||||
.clear(this)
|
||||
setImageDrawable(null)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,11 +26,9 @@
|
|||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:contentDescription="@string/ImageView__badge"
|
||||
android:visibility="gone"
|
||||
app:badge_size="medium"
|
||||
app:layout_constraintStart_toStartOf="@id/icon"
|
||||
app:layout_constraintTop_toTopOf="@id/icon"
|
||||
tools:visibility="visible" />
|
||||
app:layout_constraintTop_toTopOf="@id/icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:contentDescription="@string/ImageView__badge"
|
||||
android:visibility="gone"
|
||||
app:badge_size="medium"
|
||||
app:layout_constraintStart_toStartOf="@id/contact_photo_image"
|
||||
app:layout_constraintTop_toTopOf="@id/contact_photo_image"
|
||||
|
|
|
@ -23,11 +23,9 @@
|
|||
android:layout_marginStart="47dp"
|
||||
android:layout_marginTop="48dp"
|
||||
android:contentDescription="@string/ImageView__badge"
|
||||
android:visibility="gone"
|
||||
app:badge_size="large"
|
||||
app:layout_constraintStart_toStartOf="@id/message_request_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/message_request_avatar"
|
||||
tools:visibility="visible" />
|
||||
app:layout_constraintTop_toTopOf="@id/message_request_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/message_request_avatar_tap_to_view"
|
||||
|
|
|
@ -62,8 +62,7 @@
|
|||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone"
|
||||
app:badge_size="small"
|
||||
tools:background="@color/red" />
|
||||
app:badge_size="small" />
|
||||
|
||||
<org.thoughtcrime.securesms.conversation.ConversationItemBodyBubble
|
||||
android:id="@+id/body_bubble"
|
||||
|
|
|
@ -62,8 +62,7 @@
|
|||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone"
|
||||
app:badge_size="small"
|
||||
tools:background="@color/red" />
|
||||
app:badge_size="small" />
|
||||
|
||||
<org.thoughtcrime.securesms.conversation.ConversationItemBodyBubble
|
||||
android:id="@+id/body_bubble"
|
||||
|
|
|
@ -181,10 +181,8 @@
|
|||
android:layout_marginStart="26dp"
|
||||
android:layout_marginTop="26dp"
|
||||
android:contentDescription="@string/ImageView__badge"
|
||||
android:visibility="gone"
|
||||
app:badge_size="medium"
|
||||
app:layout_constraintStart_toStartOf="@id/conversation_list_item_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/conversation_list_item_avatar"
|
||||
tools:visibility="visible" />
|
||||
app:layout_constraintTop_toTopOf="@id/conversation_list_item_avatar" />
|
||||
|
||||
</org.thoughtcrime.securesms.conversationlist.ConversationListItem>
|
||||
|
|
|
@ -28,10 +28,8 @@
|
|||
android:layout_marginStart="47dp"
|
||||
android:layout_marginTop="48dp"
|
||||
android:contentDescription="@string/ImageView__badge"
|
||||
android:visibility="gone"
|
||||
app:badge_size="large"
|
||||
app:layout_constraintStart_toStartOf="@id/bio_preference_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/bio_preference_avatar"
|
||||
tools:visibility="visible" />
|
||||
app:layout_constraintTop_toTopOf="@id/bio_preference_avatar" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
|
@ -38,9 +38,7 @@
|
|||
android:layout_marginStart="22dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:contentDescription="@string/ImageView__badge"
|
||||
android:visibility="gone"
|
||||
app:badge_size="small"
|
||||
tools:visibility="visible" />
|
||||
app:badge_size="small" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -26,11 +26,9 @@
|
|||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:contentDescription="@string/ImageView__badge"
|
||||
android:visibility="gone"
|
||||
app:badge_size="medium"
|
||||
app:layout_constraintStart_toStartOf="@id/recipient_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/recipient_avatar"
|
||||
tools:visibility="visible" />
|
||||
app:layout_constraintTop_toTopOf="@id/recipient_avatar" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/recipient_selected"
|
||||
|
|
|
@ -37,11 +37,9 @@
|
|||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:contentDescription="@string/ImageView__badge"
|
||||
android:visibility="gone"
|
||||
app:badge_size="medium"
|
||||
app:layout_constraintStart_toStartOf="@id/message_details_recipient_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/message_details_recipient_avatar"
|
||||
tools:visibility="visible" />
|
||||
app:layout_constraintTop_toTopOf="@id/message_details_recipient_avatar" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.FromTextView
|
||||
android:id="@+id/message_details_recipient_name"
|
||||
|
|
|
@ -28,11 +28,9 @@
|
|||
android:layout_marginStart="47dp"
|
||||
android:layout_marginTop="48dp"
|
||||
android:contentDescription="@string/ImageView__badge"
|
||||
android:visibility="gone"
|
||||
app:badge_size="large"
|
||||
app:layout_constraintStart_toStartOf="@id/rbs_recipient_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/rbs_recipient_avatar"
|
||||
tools:visibility="visible" />
|
||||
app:layout_constraintTop_toTopOf="@id/rbs_recipient_avatar" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/rbs_admin_action_busy"
|
||||
|
|
Ładowanie…
Reference in New Issue