手机
当前位置:查字典教程网 >编程开发 >安卓软件开发 >不可滑动ListView、GridView
不可滑动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实现上下滚动的TextView

Android音频可视化开发案例说明

android下拉刷新ListView的介绍和实现代码

Android实现长按back键退出应用程序的方法

Android开发:优化ListView实践解析

Android GridView的使用

Android下拉刷新ListView——RTPullListView(demo)

android中处理各种触摸事件的方法浅谈

深入探讨Unit Testing in Android

Android UI开发专题(二) 之绘图基础

精品推荐
分类导航