Remove RecyclerView padding when floating action button is disabled
This commit is contained in:
parent
1c6bb9d6f0
commit
7963c3562d
1 changed files with 5 additions and 0 deletions
|
@ -16,6 +16,7 @@ import androidx.appcompat.view.ActionMode
|
|||
import androidx.core.os.bundleOf
|
||||
import androidx.core.view.isGone
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.view.setPadding
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -300,6 +301,10 @@ class MessageListFragment :
|
|||
private fun initializeRecyclerView(view: View) {
|
||||
val recyclerView = view.findViewById<RecyclerView>(R.id.message_list)
|
||||
|
||||
if (!isShowFloatingActionButton) {
|
||||
recyclerView.setPadding(0)
|
||||
}
|
||||
|
||||
val itemDecoration = MessageListItemDecoration(requireContext())
|
||||
recyclerView.addItemDecoration(itemDecoration)
|
||||
|
||||
|
|
Loading…
Reference in a new issue