Here's github rep example of the issue and the RecyclerView
adapter for your convenience.
I am scaling RecyclerView
item on click
imageView.setOnClickListener {
val pivotType = Animation.RELATIVE_TO_SELF
val scaleAnime = ScaleAnimation(1f,2f,1f,2f,
pivotType, 0.5f, pivotType, 0.5f )
scaleAnime.duration = 400
scaleAnime.fillAfter = true
ViewCompat.setElevation(it,1f)
it.startAnimation(scaleAnime)
}
However, I'm struggling with the following issues:
The RecyclerView itself doesn't react to the clicked item new size although it's height is
android:layout_height="wrap_content"
.I might use
android:clipChildren="false" android:clipToPadding="false"
and avoid the cutting of the view but that would reveal the overflow items which isn't desired option as well so I'm struggling to find a way for the
RecyclerView
to grow with the scale, too.The scaled item overlaps over it's neighbor items instead of pushing them away
I have tried changing the height of the RV but it grows downward only compare to scale effect which grows top and bottom.
Anybody who has idea how to resolve these issues please share or even suggest an alternative.