Android,页面设计时listview上方会有一些介绍文字,上划时textview随着一起滚动上去,
可以将listview改成全部铺开的样式和其他控件嵌套到scrollview中实现同时滚动, 多个view嵌套到scrollview中还要套上个这层数有点多。。。
下面是展开的listview
public class UnScrollListView extends ListView {
private OnScrollChangedListener onScrollChangedListener;
public UnScrollListView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
// TODO Auto-generated constructor stub
}
public UnScrollListView(Context context, AttributeSet attrs) {
super(context, attrs);
// TODO Auto-generated constructor stub
}
public UnScrollListView(Context context) {
super(context);
// TODO Auto-generated constructor stub
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
}