android studio一旦使用Viewpage則無法正常去除標題欄,解決方案:http://blog.chinaunix.net/uid-29532371-id-4935560.html
2015-04-04
講師回答 / hyman
你好,一般在自定義控件的時候getMeasuredWidth/getMeasuredHeight它的賦值在View的setMeasuredDimension中,所以有時可以在onMeasure方法中看到利用getMeasuredWidth/getMeasuredHeight初始化別的參數(shù)。而getWidth/getHeight一直在onLayout完成后才會被賦值。一般情況下,如果都完成了賦值,兩者值是相同的,你可以測試下。
2015-03-12