在重写View的时候,会遇到这两个方法 protected void onAttachedToWindow() Description copied from class: View This is called when the view is attached to a window. At this point it has a Surface and will start drawing. Note that this function is guaranteed to be calle…