如何使从当前位置到在列表视图Android其它用户选择的位置移动动画,如何使从当前位置到列表视图中的其他选定位置移动动画?
在我的列表视图,我想在其中用户选择的位置的动画(currentPosition = 5)。 以后如果用户将改变选择的位置(currentPosition = 8,一位置= 5)
我需要动画等:从一位置(5)〜currentPosition(8)的ImageView的拖动(从第五位置到第八位置移动或者(如果用户改变位置的ImageView从第八位置移动到第10位) 请问有什么可以做呢?
我没有发现正是我要找的,从这个
但除此之外,我发现从谷歌的链接(Zooming in a view),这将从currentPosition中缩放imageView,但它不是我正在寻找的。
请帮忙。
这将是**简单得多**如果你使用'RecyclerView'和'(如,它在默认情况下做到这一点) DiffCallback'。如果你正在尝试做一个非常简单的列表,不要使用ListView。 – CommonsWare
@CommonsWare你能解释一些更多。究竟如何? 是的,我正在使用recyclerView。 – Dhiren
“是的,我正在使用recyclerView” - 不是根据你的问题。我很抱歉,班级是'DiffUtil',而不是'DiffCallback'。请参阅[JavaDocs](https://developer.android.com/reference/android/support/v7/util/DiffUtil.html),[此Caster.IO介绍](https://caster.io/lessons/recyclerview -animate-complex-content-changes-with-diffutil /),[this Medium post](https://medium.com/@gabornovak/use-diffutil-for-out-of-the-box-animations-d932a28d6229)等 – CommonsWare