2012-07-19 81 views
0

我做了一个listview,当我滚动列表视图时,在下一个列表项目之前,加载圆正在页脚上工作。 装载的圈子设置和列表视图加载列表视图中的动画

public void setLoadingView(View listFooter) { 
    this.listFooter = listFooter; 
} 

public View getLoadingView() { 
    return listFooter; 
} 

得到这是圆

<LinearLayout 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_marginLeft="10dip" 
    android:layout_marginRight="10dip" 
    android:layout_marginTop="5dip" 
    android:layout_marginBottom="5dip" 

    android:baselineAligned="true" 
    android:gravity="center" 
    android:orientation="horizontal" > 

    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:background="@drawable/pencil" 
     android:textColor="#B36000" /> 
</LinearLayout> 

XML,然后将该布局列表视图。 现在我要做的是我需要更换一支笔,在加载圆的地方,笔是动画的,它的动画就像写笔一样(当有人用skype写时,在屏幕上显示一支笔写)。其实我不明白该怎么办:(... 我是新来的android

回答

1

看看Frame Animation。好像,所有你需要的是创建动画资源并提供它作为背景为ImageView。结账this question为一些代码片段和如何开始动画的细节。