Fix / ripple effect broken after merge

This commit is contained in:
Valere 2019-05-10 18:43:06 +02:00
parent 608bbdd4ee
commit 540989f38a
3 changed files with 10 additions and 8 deletions

View file

@ -44,12 +44,11 @@ abstract class AbsMessageItem<H : AbsMessageItem.Holder> : AEventItemBase<H>() {
super.bind(holder)
if (informationData.showInformation) {
val lp = holder.avatarImageView.layoutParams?.apply {
holder.avatarImageView.layoutParams = holder.avatarImageView.layoutParams?.apply {
val size = dpToPx(avatarStyle.avatarSizeDP, holder.view.context)
height = size
width = size
}
holder.avatarImageView.layoutParams = lp
holder.avatarImageView.visibility = View.VISIBLE
holder.avatarImageView.setOnClickListener(avatarClickListener)

View file

@ -4,6 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:addStatesFromChildren="true"
android:background="?attr/selectableItemBackground"
android:paddingLeft="8dp"
android:paddingRight="8dp">
@ -18,11 +20,11 @@
tools:src="@tools:sample/avatars" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/messageStartGuideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/messageStartGuideline"
tools:layout_constraintGuide_begin="44dp"
android:orientation="vertical"/>
android:orientation="vertical"
tools:layout_constraintGuide_begin="44dp" />
<TextView
android:id="@+id/messageMemberNameView"
@ -30,8 +32,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginEnd="4dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="4dp"
android:layout_marginRight="8dp"
android:ellipsize="end"
android:maxLines="1"
@ -58,12 +60,12 @@
<ViewStub
tools:visibility="visible"
android:id="@+id/messageContentTextStub"
style="@style/TimelineContentStubLayoutParams"
android:inflatedId="@id/messageTextView"
android:layout="@layout/item_timeline_event_text_message_stub"
tools:ignore="MissingConstraints"/>
tools:ignore="MissingConstraints"
tools:visibility="visible" />
<ViewStub
android:id="@+id/messageContentMediaStub"

View file

@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:addStatesFromChildren="true"
android:paddingLeft="8dp"
android:paddingRight="8dp">