Skip to content

Commit 6844b43

Browse files
committed
Rename attachment layout resource
1 parent 2535774 commit 6844b43

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

samplejava/src/main/java/com/example/chattutorial/ImgurAttachmentViewFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import android.widget.ImageView;
88

99
import com.getstream.sdk.chat.adapter.MessageListItem;
10-
import com.example.chattutorial.databinding.ListItemAttachmentImgurBinding;
10+
import com.example.chattutorial.databinding.AttachmentImgurBinding;
1111
import com.google.android.material.shape.ShapeAppearanceModel;
1212

1313
import org.jetbrains.annotations.NotNull;
@@ -44,7 +44,7 @@ public View createAttachmentView(@NotNull MessageListItem.MessageItem data,
4444
}
4545

4646
private View createImgurAttachmentView(Attachment imgurAttachment, ViewGroup parent) {
47-
ListItemAttachmentImgurBinding binding = ListItemAttachmentImgurBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false);
47+
AttachmentImgurBinding binding = AttachmentImgurBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false);
4848

4949
float cornerRadius = binding.getRoot()
5050
.getResources()

samplejava/src/main/res/layout/list_item_attachment_imgur.xml renamed to samplejava/src/main/res/layout/attachment_imgur.xml

File renamed without changes.

samplekotlin/src/main/java/com/example/chattutorial/ImgurAttachmentViewFactory.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import android.view.LayoutInflater
55
import android.view.View
66
import android.view.ViewGroup
77
import coil.load
8-
import com.example.chattutorial.databinding.ListItemAttachmentImgurBinding
8+
import com.example.chattutorial.databinding.AttachmentImgurBinding
99
import com.getstream.sdk.chat.adapter.MessageListItem
1010
import io.getstream.chat.android.client.models.Attachment
1111
import io.getstream.chat.android.ui.message.list.adapter.MessageListListenerContainer
@@ -30,7 +30,7 @@ class ImgurAttachmentViewFactory : AttachmentViewFactory() {
3030
private fun Attachment.isImgurAttachment(): Boolean = imageUrl?.contains("imgur") == true
3131

3232
private fun createImgurAttachmentView(imgurAttachment: Attachment, parent: ViewGroup): View {
33-
val binding = ListItemAttachmentImgurBinding
33+
val binding = AttachmentImgurBinding
3434
.inflate(LayoutInflater.from(parent.context), null, false)
3535

3636
binding.ivMediaThumb.apply {

samplekotlin/src/main/res/layout/list_item_attachment_imgur.xml renamed to samplekotlin/src/main/res/layout/attachment_imgur.xml

File renamed without changes.

0 commit comments

Comments
 (0)