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);
}
}
阅读 1566 · 发布于 2019-04-09
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
Win10 激活码密钥阅读 3074
-
Linux 升级 OpenSSL 版本阅读 5196
-
Linux 下编译安装 PHP 时报 libxml2 configure: error阅读 2076
-
惊群效应是什么?如何避免惊群效应?阅读 6149
-
Linux Shell 脚本监控进程状态阅读 4692
-
免责声明阅读 4072
-
IDEA ESLint: Delete `␍` (prettier/prettier) 解决办法阅读 2361
-
Spring Boot 3 使用 Spring Native 构建二进制可执行文件阅读 1221
-
WebSocket Sec Key 加密规则阅读 3394
-
Java 11 默认垃圾回收器竟然不是 G1阅读 1574