Skip to content

homework_05#6

Open
IvanToropygin wants to merge 2 commits into
Otus-Android:masterfrom
IvanToropygin:master
Open

homework_05#6
IvanToropygin wants to merge 2 commits into
Otus-Android:masterfrom
IvanToropygin:master

Conversation

@IvanToropygin
Copy link
Copy Markdown

Screen_recording_20260215_145333.mp4

android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" /> No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

это можно не писать, задается в менеджере

}

fun bind(coins: List<CoinState>, payloads: List<Any>) {
val carouselPayload = payloads.firstOrNull { it is CoinsAdapter.CoinDiff.CarouselPayload }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

тут лучше не опираться на первый элемент, он может поменяться

import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.RecyclerView

class ItemAnimator : DefaultItemAnimator() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

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