Android笔记之在onCreate中执行View.getWidth()和View.getHeight()得到的结果均为0的解决方案 方案有多种,只记一种 使用View.post(Runnable) 示例如下 Log如下 由log可知,View.post(Runnable)是异步的