2012-02-01 53 views

回答

0

我在这次Google小组讨论的帮助下设法解决了这个问题。 https://groups.google.com/forum/?fromgroups#!topic/android-developers/F7_zE_k9KO8

我最终创建一个自定义视图并重载getAnimation()女巫返回null。

public class HeaderSearchNoAnimationVIew extends LinearLayout { 
public HeaderSearchNoAnimationVIew(Context context) { 
    super(context); 
    LayoutInflater i = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
    i.inflate(R.layout.list_header_search, this); 
} 
@Override 
public Animation getAnimation() { 
    return null; 
} 
} 
0

如果它是一个始终存在的静态视图,是否考虑过使用单独的视图而不是列表视图的标题部分?

+0

不幸的是,标题视图必须与列表的其余部分一起滚动。 – pzagor2 2012-02-02 22:27:09