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) super.bind(holder)
if (informationData.showInformation) { if (informationData.showInformation) {
val lp = holder.avatarImageView.layoutParams?.apply { holder.avatarImageView.layoutParams = holder.avatarImageView.layoutParams?.apply {
val size = dpToPx(avatarStyle.avatarSizeDP, holder.view.context) val size = dpToPx(avatarStyle.avatarSizeDP, holder.view.context)
height = size height = size
width = size width = size
} }
holder.avatarImageView.layoutParams = lp
holder.avatarImageView.visibility = View.VISIBLE holder.avatarImageView.visibility = View.VISIBLE
holder.avatarImageView.setOnClickListener(avatarClickListener) holder.avatarImageView.setOnClickListener(avatarClickListener)

View file

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

View file

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