I got a ListView with items in it. When the user clicks an item it's height should scale to zero and all items below should scroll up. My code below doesnt work. With my code the item which was clicked scales right, but the items below dont scroll up, they stay at the same position. I've also tried it with an LinearLayout but there is the same problem.
There is an app which does this right. It's called Tasks.
My current implementation looks like this:
@Override
public void onItemClick(AdapterView<?> arg0, View v, final int index,
long id) {
Animation anim = AnimationUtils.loadAnimation(getActivity(),
R.anim.scaleup);
v.startAnimation(anim);
}
<set android:shareInterpolator="false" >
<scale
android:duration="700"
android:fillAfter="false"
android:fillBefore="false"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:pivotY="0%"
android:toXScale="1.0"
android:toYScale="0.0" />
</set>