分类分类
大小:656.84 KB更新:2014/09/04
类别:列表系统:Android
类似时光网IOS城市列表(ListView)效果,基本已开启坐等放假模式,闲来无事发个帖子水下经验。demo写的比较粗糙,偷懒直接把数据结构改成了2个String数组。结构是listview嵌套gridview,需要注意的是gridview需要重写onMeasure方法:
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
搜索功能其实没写进demo里面,从项目里整理出来太麻烦了。但其实比较简单,用TextWatcher就行了