Finally got it!
Yet another stupid mistake, it's not complicated at all, I kept thinking, why I'm having this problem only on this activity, but not my previous one, and I suddenly realized that the layout in the two activities are different, turns out I set the RecyclerView's height to wrap_content, so I suppose what happened is that, the layout told the system to wrap the content in the RecyclerView, and when you delete an item, it's technically not there anymore, so, even though I have animations for the deleted item, the item is removed immediately from the layout's level, that's why it seems like Android adjusted the RecyclerView's height first, and then delete the item, what actually happened is, since RecyclerView is set to wrap_content, it removes the position of the view(item) immediately after delete, not after the animation, and that's why it looks like a blink.
Anyways, the solution is just simply to change the RecyclerView's height from wrap_contentto any other value, if you are using ConstraintLayout like I did, just change the height to 0dp, then constraint the RecyclerView to something else, or the edge.
Thanks to everyone who tried to help me solve my problem though, I admit this is one of the stupidest yet frustrating problems I ever had.
I believe there're others who also encountered the same problem, so just go and check if the height is set to wrap_content.
Constraint Layout에서 recyclerview를 사용할떄 보통 height 0dp를 주는데 item이 변경될때 마지막 divider가 깜빡 거리는 현상이 발생된다. (마지막 아이템일때 divider안보이게 세팅)
단순히 0dp를 wrap_content으로 변경해주면 해결된다.
참고 사이트 :
'Android' 카테고리의 다른 글
Compose Box Basic Style (0) | 2024.06.03 |
---|---|
RoomDatabase Hilt Error -> AppDatabase. AppDatabase_Impl does not exist at androidx.room.Room.getGeneratedImplementation(Room.kt:58) .. (0) | 2024.04.14 |
Android constraint layout id 중복으로 사용하기 (0) | 2024.02.27 |
Android Room DB 간단한 메모DB 만들어보기 + 주의할점 (0) | 2024.01.05 |
Android Room Database Map 저장하기 (0) | 2023.12.20 |
댓글