不可滚动的ListView
来源:互联网 发布:windows管道通信 编辑:程序博客网 时间:2024/05/01 12:46
不可滚动的ListView
方法一:继承ListView,重写onMeasure
import android.content.Context;import android.util.AttributeSet;import android.widget.ListView;public class ListViewForScrollView extends ListView { public ListViewForScrollView(Context context) { super(context); } public ListViewForScrollView(Context context, AttributeSet attrs) { super(context, attrs); } public ListViewForScrollView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); super.onMeasure(widthMeasureSpec, expandSpec); }}
方法二:直接用for循环,往LinearLayout中添加view
0 0
- 不可滚动的ListView
- Android 设置ListView不可滚动 及在ScrollView中不可滚动的设置
- 不可滚动的GridView
- Android 实现ListView不可滚动效果
- android listview 的滚动
- Listview的滚动方式
- 横向滚动的ListView
- ListView不可滚动 并解决嵌套scrollView问题
- JTable example2 不可滚动的表格
- java 创建 不可以滚动的 表格
- 遮罩层以下内容不可滚动的实现
- 控制ListView的自动滚动
- 实现ListView的弹性滚动
- 横向ListView的自动滚动
- 水平方向滚动的listview
- 监听ListView的滚动事件
- Android - 滚动ListView的适配器
- 获取ListView的滚动高度
- 1011. World Cup Betting (20)
- javascript之传智播客
- DOS系统下控制串口(1)
- linux调度器源码分析 - 初始化(二)
- Linux下字节对齐准则
- 不可滚动的ListView
- ConnectivityManager源码分析
- 黑马程序员--面向对象(Java)
- java网络编程基础夯实03-为什么不能直接通过IP访问网站
- 集合的表示及其运算
- opencv进行图像复原
- 回调函数
- socket阻塞与非阻塞,同步与异步、I/O模型
- [LeetCode] 031. Next Permutation (Medium) (C++/Python)