Android 调整listview页边距动画的大小

Android 调整listview页边距动画的大小,android,listview,animation,Android,Listview,Animation,布局如下: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cube_ptr="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/backgroun

布局如下:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cube_ptr="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background">

    <!-- Header -->
    <customheader
        android:id="@+id/header"
        android:layout_width="match_parent"
        android:layout_height="@dimen/header_height" />

    <!-- List-->
    <se.emilsjolander.stickylistheaders.StickyListHeadersListView
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:animationCache="false"
        android:scrollingCache="false"
        android:layout_below="@+id/header"  />


</RelativeLayout>
动画工作正常,标题动画平滑,但ListView(StickyHeader)非常滞后:(解决方案是什么?Thx

我找到了解决方案:

...
getView().setY((int) (-headerHeight  * interpolatedTime);
...
它就像一个符咒:)

...
getView().setY((int) (-headerHeight  * interpolatedTime);
...