Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding = true
}
dataBinding {
enabled = true
}
}

dependencies {
Expand All @@ -41,4 +47,6 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'androidx.databinding:databinding-runtime:8.10.0'
implementation 'it.xabaras.android:recyclerview-swipedecorator:1.4'
}
51 changes: 51 additions & 0 deletions app/src/main/java/otus/gpb/recyclerview/ChatAdapter.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package otus.gpb.recyclerview

import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.ListAdapter
import otus.gpb.recyclerview.databinding.ChatItemBinding
import android.view.View.INVISIBLE
import android.view.View.VISIBLE

class ChatAdapter: ListAdapter<ChatItem, ChatViewHolder>(ChatDiffCallback()) {

override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ChatViewHolder {
val binding = ChatItemBinding.inflate(LayoutInflater.from(parent.context), parent, false)
return ChatViewHolder(binding)
}

override fun onBindViewHolder(holder: ChatViewHolder, position: Int) {
val chatItem = getItem(position)
val binding = holder.binding
binding.textName.setText(chatItem.name)
binding.textStatus.setText(chatItem.status)
binding.message.setText(chatItem.message)
binding.time.setText(chatItem.time)

binding.iconVerified.visibility = if (chatItem.verified) VISIBLE else INVISIBLE
binding.iconScam.visibility = if (chatItem.scam) VISIBLE else INVISIBLE
binding.iconMute.visibility = if (chatItem.mute) VISIBLE else INVISIBLE
binding.counter.visibility = if (chatItem.counter > 0) VISIBLE else INVISIBLE
binding.counter.text = chatItem.counter.toString()
binding.time.text = chatItem.time
binding.delivered.visibility = if (chatItem.delivered && !chatItem.read) VISIBLE else INVISIBLE

val id: Int? = if (chatItem.read) R.drawable.doublecheck
else if (chatItem.delivered && !chatItem.read) R.drawable.check
else if (chatItem.delivered && chatItem.read) R.drawable.doublecheck
else null

if (id != null) {
binding.delivered.setImageResource(id)
binding.delivered.visibility = VISIBLE
}
else{
binding.delivered.visibility = INVISIBLE
}
}

fun submitNewList(list: List<ChatItem>){
submitList(list)
}
}
13 changes: 13 additions & 0 deletions app/src/main/java/otus/gpb/recyclerview/ChatDiffCallback.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package otus.gpb.recyclerview

import androidx.recyclerview.widget.DiffUtil

class ChatDiffCallback: DiffUtil.ItemCallback<ChatItem>() {
override fun areItemsTheSame(oldItem: ChatItem, newItem: ChatItem): Boolean {
return oldItem.id == newItem.id
}

override fun areContentsTheSame(oldItem: ChatItem, newItem: ChatItem): Boolean {
return oldItem == newItem
}
}
15 changes: 15 additions & 0 deletions app/src/main/java/otus/gpb/recyclerview/ChatItem.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package otus.gpb.recyclerview

data class ChatItem(
val id: Int,
val name: String,
val status: String,
val message: String,
val counter: Int,
val verified: Boolean,
val mute: Boolean,
val scam: Boolean,
val delivered: Boolean,
val read: Boolean,
val time: String,
)
6 changes: 6 additions & 0 deletions app/src/main/java/otus/gpb/recyclerview/ChatViewHolder.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package otus.gpb.recyclerview

import androidx.recyclerview.widget.RecyclerView.ViewHolder
import otus.gpb.recyclerview.databinding.ChatItemBinding

class ChatViewHolder(val binding: ChatItemBinding): ViewHolder(binding.root)
122 changes: 121 additions & 1 deletion app/src/main/java/otus/gpb/recyclerview/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,131 @@ package otus.gpb.recyclerview

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import otus.gpb.recyclerview.databinding.ActivityMainBinding
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.RecyclerView
import it.xabaras.android.recyclerview.swipedecorator.RecyclerViewSwipeDecorator
import android.graphics.Canvas
import androidx.recyclerview.widget.LinearLayoutManager
import kotlin.random.Random

class MainActivity : AppCompatActivity() {
private val binding: ActivityMainBinding by lazy {
ActivityMainBinding.inflate(layoutInflater)
}
private var chatList: MutableList<ChatItem> = mutableListOf()
private lateinit var adapter: ChatAdapter
var lastId = 0
var previousItemsCount = 0
private var pageLoad = false

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
setContentView(binding.root)
adapter = ChatAdapter()
binding.recyclerView.adapter = adapter

val itemTouchHelper = ItemTouchHelper(object : ItemTouchHelper.SimpleCallback(
0, ItemTouchHelper.LEFT or ItemTouchHelper.RIGHT
) {
override fun onMove(
recyclerView: RecyclerView,
viewHolder: RecyclerView.ViewHolder,
target: RecyclerView.ViewHolder
): Boolean {
return false
}

override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) {
val position = viewHolder.adapterPosition
when(direction){
ItemTouchHelper.LEFT -> {
removeItem(position)
}
ItemTouchHelper.RIGHT -> {
removeItem(position)
}
}
}

override fun onChildDraw(
c: Canvas,
recyclerView: RecyclerView,
viewHolder: RecyclerView.ViewHolder,
dX: Float,
dY: Float,
actionState: Int,
isCurrentlyActive: Boolean
) {
RecyclerViewSwipeDecorator.Builder(
c,
recyclerView,
viewHolder,
dX,
dY,
actionState,
isCurrentlyActive
).create().decorate()
super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive)
}
})
itemTouchHelper.attachToRecyclerView(binding.recyclerView)
createItems(20)
setScrollListener()
}

private fun setScrollListener(){
binding.recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() {

override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
val layoutManager = recyclerView.layoutManager as LinearLayoutManager
val itemsCount = layoutManager.itemCount
val lastVisibleItem = layoutManager.findLastCompletelyVisibleItemPosition()
if (pageLoad && itemsCount > previousItemsCount) {
pageLoad = false
previousItemsCount = itemsCount
}
if (!pageLoad && lastVisibleItem >= itemsCount - 5) {
getNextPage()
}
}
})
}


private fun getNextPage() {
pageLoad = true
createItems(20)
}

private fun removeItem(position: Int){
val item = adapter.currentList[position]
chatList.apply {
remove(item)
}
adapter.notifyItemRemoved(position)
}

private fun createItems(size: Int){
for (i in 1..size) {
chatList.add(
ChatItem(
lastId++,
"Name " + "$lastId",
"status " + "$lastId",
"Message " + "$lastId",
Random.nextInt(10),
Random.nextBoolean(),
Random.nextBoolean(),
Random.nextBoolean(),
Random.nextBoolean(),
Random.nextBoolean(),
"12:10"
)
)
}
adapter.submitList(chatList)
adapter.notifyDataSetChanged()
}
}
Binary file added app/src/main/res/drawable/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/src/main/res/drawable/check.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="20dp" android:width="20dp" android:viewportWidth="24" android:viewportHeight="24"><path android:fillColor="#4994CB" android:pathData="M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M6,10L12,16L18,10L16.6,8.6L12,13.2L7.4,8.6L6,10Z" /></vector>
14 changes: 14 additions & 0 deletions app/src/main/res/drawable/check1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="18"
android:viewportHeight="18">
<path
android:pathData="M3.176,9.842L6.37,12.706L14.823,5.294"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#48A938"
android:strokeLineCap="round"/>
</vector>
2 changes: 2 additions & 0 deletions app/src/main/res/drawable/circle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24"><path android:fillColor="#000000" android:pathData="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" /></vector>
14 changes: 14 additions & 0 deletions app/src/main/res/drawable/doublecheck.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="18"
android:viewportHeight="18">
<path
android:pathData="M1.059,9.776L4.014,12.533L11.77,5.294M16.941,5.466L9.185,12.706L8.261,11.844"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#48A938"
android:strokeLineCap="round"/>
</vector>
14 changes: 14 additions & 0 deletions app/src/main/res/drawable/mute.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="19dp"
android:viewportWidth="18"
android:viewportHeight="19">
<path
android:pathData="M4.235,7.842C4.235,7.545 4.485,7.305 4.791,7.305H5.745L11.462,13.141V14.573C11.462,15.305 10.906,15.58 10.35,15.043L6.702,11.97H4.791C4.485,11.97 4.235,11.728 4.235,11.432V7.842Z"
android:fillColor="#BDC1C4"
android:fillType="evenOdd"/>
<path
android:pathData="M4.898,3.678C4.796,3.696 4.702,3.741 4.625,3.808C4.548,3.875 4.492,3.961 4.463,4.057C4.434,4.153 4.434,4.255 4.462,4.351C4.489,4.447 4.544,4.534 4.62,4.602L13.836,13.507C13.885,13.566 13.946,13.614 14.016,13.648C14.085,13.682 14.161,13.702 14.239,13.705C14.317,13.709 14.394,13.697 14.467,13.67C14.54,13.643 14.606,13.602 14.661,13.549C14.716,13.495 14.759,13.432 14.787,13.361C14.815,13.291 14.827,13.216 14.823,13.141C14.819,13.066 14.798,12.992 14.763,12.925C14.727,12.858 14.678,12.799 14.617,12.752L12.402,10.611V4.751C12.402,3.712 11.33,3.723 10.547,4.365L8.026,6.383L5.402,3.846C5.345,3.787 5.274,3.741 5.196,3.712C5.118,3.683 5.034,3.672 4.95,3.678C4.933,3.678 4.915,3.678 4.898,3.678Z"
android:fillColor="#BDC1C4"/>
</vector>
27 changes: 27 additions & 0 deletions app/src/main/res/drawable/scam.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="44dp"
android:height="17dp"
android:viewportWidth="44"
android:viewportHeight="17">
<path
android:pathData="M11.281,10.343C11.281,9.989 11.156,9.716 10.906,9.524C10.661,9.332 10.215,9.138 9.57,8.943C8.925,8.747 8.411,8.53 8.03,8.29C7.3,7.829 6.936,7.227 6.936,6.486C6.936,5.836 7.198,5.301 7.722,4.881C8.25,4.46 8.934,4.25 9.774,4.25C10.331,4.25 10.828,4.353 11.264,4.56C11.7,4.766 12.043,5.062 12.292,5.445C12.542,5.825 12.667,6.248 12.667,6.713H11.281C11.281,6.292 11.149,5.964 10.884,5.728C10.624,5.488 10.25,5.368 9.762,5.368C9.308,5.368 8.954,5.466 8.701,5.661C8.452,5.857 8.327,6.13 8.327,6.48C8.327,6.775 8.463,7.022 8.734,7.222C9.005,7.417 9.453,7.609 10.076,7.797C10.699,7.982 11.2,8.194 11.578,8.434C11.955,8.67 12.232,8.943 12.408,9.253C12.584,9.559 12.672,9.919 12.672,10.332C12.672,11.003 12.415,11.538 11.902,11.936C11.392,12.331 10.699,12.529 9.823,12.529C9.244,12.529 8.71,12.422 8.222,12.208C7.739,11.99 7.361,11.691 7.089,11.311C6.822,10.931 6.688,10.488 6.688,9.983H8.08C8.08,10.441 8.23,10.795 8.531,11.046C8.831,11.296 9.262,11.422 9.823,11.422C10.307,11.422 10.67,11.324 10.912,11.129C11.158,10.929 11.281,10.667 11.281,10.343Z"
android:fillColor="#E64646"/>
<path
android:pathData="M20.003,9.795C19.923,10.655 19.608,11.326 19.058,11.809C18.507,12.289 17.776,12.529 16.863,12.529C16.225,12.529 15.662,12.377 15.175,12.075C14.691,11.769 14.316,11.335 14.052,10.774C13.788,10.214 13.651,9.563 13.64,8.821V8.068C13.64,7.308 13.774,6.639 14.042,6.06C14.309,5.48 14.692,5.034 15.191,4.72C15.693,4.407 16.273,4.25 16.929,4.25C17.813,4.25 18.524,4.492 19.063,4.975C19.602,5.458 19.916,6.141 20.003,7.022H18.618C18.552,6.443 18.383,6.026 18.111,5.772C17.844,5.514 17.45,5.384 16.929,5.384C16.324,5.384 15.858,5.608 15.532,6.054C15.209,6.497 15.044,7.148 15.037,8.007V8.721C15.037,9.592 15.191,10.256 15.499,10.714C15.811,11.171 16.265,11.4 16.863,11.4C17.409,11.4 17.82,11.276 18.095,11.029C18.37,10.782 18.544,10.37 18.618,9.795H20.003Z"
android:fillColor="#E64646"/>
<path
android:pathData="M25.735,10.542H22.632L21.983,12.418H20.537L23.562,4.361H24.81L27.841,12.418H26.389L25.735,10.542ZM23.023,9.413H25.344L24.184,6.071L23.023,9.413Z"
android:fillColor="#E64646"/>
<path
android:pathData="M30.558,4.361L32.868,10.536L35.173,4.361H36.971V12.418H35.585V9.762L35.722,6.209L33.357,12.418H32.362L30.003,6.215L30.14,9.762V12.418H28.754V4.361H30.558Z"
android:fillColor="#E64646"/>
<path
android:pathData="M10.906,9.524C11.156,9.716 11.281,9.989 11.281,10.343C11.281,10.667 11.158,10.929 10.912,11.129C10.67,11.324 10.307,11.422 9.823,11.422C9.262,11.422 8.831,11.296 8.531,11.046C8.23,10.795 8.08,10.441 8.08,9.983H6.688C6.688,10.488 6.822,10.931 7.089,11.311C7.361,11.691 7.739,11.99 8.222,12.208C8.71,12.422 9.244,12.529 9.823,12.529C10.699,12.529 11.392,12.331 11.902,11.936C12.415,11.538 12.672,11.003 12.672,10.332C12.672,9.919 12.584,9.559 12.408,9.253C12.232,8.943 11.955,8.67 11.578,8.434C11.2,8.194 10.699,7.982 10.076,7.797C9.453,7.609 9.005,7.417 8.734,7.222C8.463,7.022 8.327,6.775 8.327,6.48C8.327,6.13 8.452,5.857 8.701,5.661C8.954,5.466 9.308,5.368 9.762,5.368C10.25,5.368 10.624,5.488 10.884,5.728C11.149,5.964 11.281,6.292 11.281,6.713H12.667C12.667,6.248 12.542,5.825 12.292,5.445C12.043,5.062 11.7,4.766 11.264,4.56C10.828,4.353 10.331,4.25 9.774,4.25C8.934,4.25 8.25,4.46 7.722,4.881C7.198,5.301 6.936,5.836 6.936,6.486C6.936,7.227 7.3,7.829 8.03,8.29C8.411,8.53 8.925,8.747 9.57,8.943C10.215,9.138 10.661,9.332 10.906,9.524ZM19.058,11.809C19.608,11.326 19.923,10.655 20.003,9.795H18.618C18.544,10.37 18.37,10.782 18.095,11.029C17.82,11.276 17.409,11.4 16.863,11.4C16.265,11.4 15.811,11.171 15.499,10.714C15.191,10.256 15.037,9.592 15.037,8.721V8.007C15.044,7.148 15.209,6.497 15.532,6.054C15.858,5.608 16.324,5.384 16.929,5.384C17.45,5.384 17.844,5.514 18.111,5.772C18.383,6.026 18.552,6.443 18.618,7.022H20.003C19.916,6.141 19.602,5.458 19.063,4.975C18.524,4.492 17.813,4.25 16.929,4.25C16.273,4.25 15.693,4.407 15.191,4.72C14.692,5.034 14.309,5.48 14.042,6.06C13.774,6.639 13.64,7.308 13.64,8.068V8.821C13.651,9.563 13.788,10.214 14.052,10.774C14.316,11.335 14.691,11.769 15.175,12.075C15.662,12.377 16.225,12.529 16.863,12.529C17.776,12.529 18.507,12.289 19.058,11.809ZM21.983,12.418L22.632,10.542H25.735L26.389,12.418H27.841L24.81,4.361H23.562L20.537,12.418H21.983ZM32.868,10.536L30.558,4.361H28.754V12.418H30.14V9.762L30.003,6.215L32.362,12.418H33.357L35.722,6.209L35.585,9.762V12.418H36.971V4.361H35.173L32.868,10.536ZM25.344,9.413H23.023L24.184,6.071L25.344,9.413Z"
android:fillColor="#E64646"
android:fillType="evenOdd"/>
<path
android:pathData="M0,2.125C0,0.951 0.946,0 2.112,0H41.888C43.054,0 44,0.951 44,2.125V14.875C44,16.049 43.054,17 41.888,17H2.112C0.946,17 0,16.049 0,14.875V2.125ZM2.112,0.708H41.888C42.666,0.708 43.296,1.343 43.296,2.125V14.875C43.296,15.657 42.666,16.292 41.888,16.292H2.112C1.334,16.292 0.704,15.657 0.704,14.875V2.125C0.704,1.343 1.334,0.708 2.112,0.708ZM10.906,9.524C11.156,9.716 11.281,9.989 11.281,10.343C11.281,10.667 11.158,10.929 10.912,11.129C10.67,11.324 10.307,11.422 9.823,11.422C9.262,11.422 8.831,11.296 8.531,11.046C8.23,10.795 8.08,10.441 8.08,9.983H6.688C6.688,10.488 6.822,10.931 7.089,11.311C7.361,11.691 7.739,11.99 8.222,12.208C8.71,12.422 9.244,12.529 9.823,12.529C10.699,12.529 11.392,12.331 11.902,11.936C12.415,11.538 12.672,11.003 12.672,10.332C12.672,9.919 12.584,9.559 12.408,9.253C12.232,8.943 11.955,8.67 11.578,8.434C11.2,8.194 10.699,7.982 10.076,7.797C9.453,7.609 9.005,7.417 8.734,7.222C8.463,7.022 8.327,6.775 8.327,6.48C8.327,6.13 8.452,5.857 8.701,5.661C8.954,5.466 9.308,5.368 9.762,5.368C10.25,5.368 10.624,5.488 10.884,5.728C11.149,5.964 11.281,6.292 11.281,6.713H12.667C12.667,6.248 12.542,5.825 12.292,5.445C12.043,5.062 11.7,4.766 11.264,4.56C10.828,4.353 10.331,4.25 9.774,4.25C8.934,4.25 8.25,4.46 7.722,4.881C7.198,5.301 6.936,5.836 6.936,6.486C6.936,7.227 7.3,7.829 8.03,8.29C8.411,8.53 8.925,8.747 9.57,8.943C10.215,9.138 10.661,9.332 10.906,9.524ZM19.058,11.809C19.608,11.326 19.923,10.655 20.003,9.795H18.618C18.544,10.37 18.37,10.782 18.095,11.029C17.82,11.276 17.409,11.4 16.863,11.4C16.265,11.4 15.811,11.171 15.499,10.714C15.191,10.256 15.037,9.592 15.037,8.721V8.007C15.044,7.148 15.209,6.497 15.532,6.054C15.858,5.608 16.324,5.384 16.929,5.384C17.45,5.384 17.844,5.514 18.111,5.772C18.383,6.026 18.552,6.443 18.618,7.022H20.003C19.916,6.141 19.602,5.458 19.063,4.975C18.524,4.492 17.813,4.25 16.929,4.25C16.273,4.25 15.693,4.407 15.191,4.72C14.692,5.034 14.309,5.48 14.042,6.06C13.774,6.639 13.64,7.308 13.64,8.068V8.821C13.651,9.563 13.788,10.214 14.052,10.774C14.316,11.335 14.691,11.769 15.175,12.075C15.662,12.377 16.225,12.529 16.863,12.529C17.776,12.529 18.507,12.289 19.058,11.809ZM21.983,12.418L22.632,10.542H25.735L26.389,12.418H27.841L24.81,4.361H23.562L20.537,12.418H21.983ZM32.868,10.536L30.558,4.361H28.754V12.418H30.14V9.762L30.003,6.215L32.362,12.418H33.357L35.722,6.209L35.585,9.762V12.418H36.971V4.361H35.173L32.868,10.536ZM25.344,9.413H23.023L24.184,6.071L25.344,9.413Z"
android:fillColor="#E64646"
android:fillType="evenOdd"/>
</vector>
6 changes: 5 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".MainActivity">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/chat_item" />

</androidx.constraintlayout.widget.ConstraintLayout>
Loading