Skip to content

Commit

Permalink
Add hasFixed size to RecyclerViews (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuberen authored Apr 2, 2020
1 parent 930f009 commit a209c1e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ internal class ThrowableListFragment : Fragment(), ThrowableAdapter.ThrowableCli
with(errorsBinding) {
tutorialLink.movementMethod = LinkMovementMethod.getInstance()
errorsRecyclerView.apply {
setHasFixedSize(true)
addItemDecoration(DividerItemDecoration(context, DividerItemDecoration.VERTICAL))
adapter = errorsAdapter
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ internal class TransactionListFragment :
with(transactionsBinding) {
tutorialLink.movementMethod = LinkMovementMethod.getInstance()
transactionsRecyclerView.apply {
setHasFixedSize(true)
addItemDecoration(DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL))
adapter = transactionsAdapter
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ internal class TransactionPayloadFragment :
showProgress()
val result = processPayload(type, transaction)
payloadBinding.responseRecyclerView.adapter = TransactionBodyAdapter(result)
payloadBinding.responseRecyclerView.setHasFixedSize(true)
hideProgress()
}
}
Expand Down

0 comments on commit a209c1e

Please sign in to comment.