ordice

博客园 首页 新随笔 联系 订阅 管理

2019年1月23日 #

摘要: 重写onMeasure(): 为什么要重写onMeasure()? 我们通过MeasureSpec类来测量view,他是一个32位的int值,其中高2位为测量的模式,低30位为测量的大小,如果不重写onMeasure(),当在xml中使用wrap_content时,android会将控件铺满屏幕,所 阅读全文
posted @ 2019-01-23 12:23 ordice 阅读(86) 评论(0) 推荐(0) 编辑