1
在列表項目中使用動畫時,列表視圖會變慢。我已經在android xml列表中添加了一些屬性。我在列表視圖適配器類中添加了動畫。我已經使用以下代碼ListView中的動畫問題
holder.footerRow.setVisibility(View.VISIBLE);
Animation a = AnimationUtils.loadAnimation(context, R.animator.slide_down);
if(a != null){
a.reset();
if(holder.footerRow != null){
holder.footerRow.clearAnimation();
holder.footerRow.startAnimation(a);
}
// ...
XML:
<ListView
android:id="@+id/list_view_id"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animationCache="false"
android:cacheColorHint="#00000000"
android:animateLayoutChanges="true"
android:choiceMode="none"
android:divider="@android:color/darker_gray"
android:dividerHeight="1dp"
android:drawSelectorOnTop="false"
android:fastScrollEnabled="false"
android:listSelector="@android:color/transparent"
android:scrollbars="none"
android:scrollingCache="false"
android:smoothScrollbar="true"
android:visibility="visible" >
</ListView>
你的問題到底是什麼?請看看:http://stackoverflow.com/help/how-to-ask看看有什麼問題。 – Sobrique 2015-02-09 11:42:57