第三章:
1.Activity
phoneView
decorView
titleView
contentView
requestWindowFeature(Window.Feature_no_title)設置全屏,必須在setContent方法前面設置。
2.自定義View的onMeasure方法
ModeType--exactly,指定的大小或者match-parent。
--at_most,wrapcontent,如果不設置默認值的話,填充父容器(matchparent)
3.onMeasure中不用調用父類。自己setDimen
4.View中比較重要的回調
一.onFinishInflate()重XML加載組件後回調
二.onSIzeChanged()組件大小改變時回調
三.onMeasure()
四.onTouchEvent()
五.onLayout()
5.動畫渲染還不是很清楚。
6.自定義--Paint p
p.setAntiAlias(true) 設置反鋸齒
p.setStrokeWidth() 設置邊框線的寬度
p.setStyle(Paint.Style.xxx) 設置畫筆樣式,三種
p.setTextAlign() 設置字體對其方式
7.自定義--Canvas c
c.drawCiecle() 畫圓
c.drawArc() 畫圓弧