Lock the View position that is in the list by scrolling through the same list programmatically

Suppose I have ImageViewand a TextViewone by one. These two representations are the first two elements of mine RecyclerView. The remaining elements RecyclerVieware of the same type.

ImageView (element 0 from RecyclerView)

TextView (RecyclerView element 1)

element2

element3

...

So, usually in this scenario , if you scroll down, ImageViewand TextViewwill go up and disappear from view when I continue to scroll. I want it to ImageViewdisappear TextViewwhen I exit the screen, but to stay at the top of the screen, even if I scroll further, the remaining elements RecyclerViewwill grow and TextViewwill be in a fixed position at the top of the screen.

--- TextView (FIXED) ---

element6

element7

... (scroll)

I thought about it and could not find a good software solution, but I realized that I could do it with a little change.

RecyclerView , , . TextView , TextView RecyclerView, TextView , clone TextView .

. , . , .

, , ..

+4
1

, this? , , .

+3

All Articles