ScrollView中嵌套GridView,ListView只显示一行的解决办法
2016-05-03 16:45
459 查看
ScrollView中嵌套GridView,ListView只显示一行的解决办法
遇到了这个问题,我到百度了一下,看到了这位大神的解决方案,然后就他他的复制过来了,方便自己以后的学习,具体信息请看这位大神的博客http://blog.csdn.net/luohai859/article/details/39347583,重写GridView:
public class MyGridView extends GridView{ public MyGridView(Context context, AttributeSet attrs) { super(context, attrs); } public MyGridView(Context context) { super(context); } public MyGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); super.onMeasure(widthMeasureSpec, expandSpec); } }
相关文章推荐
- Windows 安装配置 Zabbix Agentd
- Android GridView Item居中(可能是最完美的解决方案)
- Angularjs 基于$timeout延时加载js
- 内存堆和栈的区别
- c#之process类相关整理
- Android 之 OO Principle(面向对象的原则)
- FAST Corner Detection -- Edward Rosten
- Linux 小工具学习之(1)——Wget十例[翻译]
- A server with the specified hostname could not be found.
- 利用nginx实现文档服务器限速
- pluck()取表中一列中所有值组成数组
- hdu 1558 Segment set【并查集+计算几何】
- 使用框架的意义与spring的主要内容
- [从头学声学] 第203节 复合的声波(2)
- UGUI中背景分辨率适应
- HTML——6(表格)
- HTML/JSP实现跳转到页面指定位置
- Requests库的用法
- Python函数/方法装饰器
- Table显示你要显示的边框代码