不可滑动ListView、GridView
摘要:记录,以前在网上看到的方法,好久了,不记得看的谁的博客了,这里只当作个人记录,勿怪!自定义ListView或GridView,覆写onMea...
记录,以前在网上看到的方法,好久了,不记得看的谁的博客了,这里只当作个人记录,勿怪!
自定义ListView或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);
} 其可以解决和ScrollView嵌套的滑动冲突。
【不可滑动ListView、GridView】相关文章:
★ 解析Android开发优化之:对界面UI的优化详解(二)
★ Android当修改一些代码时使用什么编译命令可以最有效率
★ java,Android:在eclipse中的快捷键(经典收藏)
★ Android SQLite数据库增删改查操作的案例分析