Hi all.
When we override method in subclass, we call in this method the superclass method, for example
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
width = w ;
height = h ;
Log.d(TAG, "onSizeChanged: width " + width + ", height "+ height);
super.onSizeChanged(w, h, oldw, oldh);
}
so why we need to call super.onSizeChanged().
I delete the line super.onSizeChanged(), and the result is the same as with it.
or the same in onCreate method, we call super.onCreate.
sorry for bad english, and thaks for replays))
When we override method in subclass, we call in this method the superclass method, for example
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
width = w ;
height = h ;
Log.d(TAG, "onSizeChanged: width " + width + ", height "+ height);
super.onSizeChanged(w, h, oldw, oldh);
}
so why we need to call super.onSizeChanged().
I delete the line super.onSizeChanged(), and the result is the same as with it.
or the same in onCreate method, we call super.onCreate.
sorry for bad english, and thaks for replays))
