Android ScrollView 嵌套 ListView 问题
Android ListView 大约 857 字自定义ListView,重写onMeasure方法
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
public class MyListView extends ListView {
public MyListView(Context context) {
super(context);
}
public MyListView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public MyListView(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);
}
}
阅读 1269 · 发布于 2019-04-09
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
OpenResty 使用 cjson 操作 JSON 数据阅读 5581
-
IDEA ESLint: Delete `␍` (prettier/prettier) 解决办法阅读 879
-
设计模式之桥接模式阅读 2213
-
Kubernetes 搭建之 Docker 安装阅读 691
-
Golang 操作 MySQL 数据库阅读 1854
-
软考-系统架构设计师:联邦数据库阅读 1033
-
Elasticsearch 插入数据 PUT阅读 2645
-
Prometheus+Grafana+elasticsearch_exporter 监控 Elasticsearch阅读 919
-
设计模式之原型模式 - 深拷贝和浅拷贝阅读 1710
-
软考-系统架构设计师:软件测试阅读 2028