Skip to content

RecyclerView (NEW ДЗ)#7

Open
DTPelopones wants to merge 3 commits into
Otus-Android:masterfrom
DTPelopones:master
Open

RecyclerView (NEW ДЗ)#7
DTPelopones wants to merge 3 commits into
Otus-Android:masterfrom
DTPelopones:master

Conversation

@DTPelopones
Copy link
Copy Markdown

No description provided.

category.coins.forEach { coin ->
adapterItems.add(CoinsAdapterItem.CoinItem(coin))
adapterItems.add(CoinsAdapterItem.CategoryHeader(category.id, category.name))
if (category.coins.size > 10 && !showAll) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут неправильная логика, showAll используется для показа всех элементов или только 4, это остается в вм и не правится в ДЗ

горизонтальный список делаем, если оказалось в категории больше 10

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Исправлено.

}

dispatchAddFinished(holder)
return false
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут должно возвращаться true

.start()
}

dispatchAddFinished(holder)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это нужно вызывать внутри

                .withEndAction {
                    dispatchAddFinished(holder)
                }


override fun animateAdd(holder: RecyclerView.ViewHolder): Boolean {

holder.itemView.apply {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужно добавить перед стартом dispatchAddStarting

}

override fun animateRemove(holder: RecyclerView.ViewHolder): Boolean {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужно добавить dispatchRemoveStarting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants