. . , , onMesure, :
protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
widthView = MeasureSpec.getSize(widthMeasureSpec);
heightView = MeasureSpec.getSize(heightMeasureSpec);
}
However, I cannot lay out the images inside this method (image animation will continue to call this method).
To find out the actual height of the view, I will need to do:
screenHeight - statusBarHeight
so I could use this value in the view constructor.
I cannot believe that it should be so complex as to provide a solution to such a simple requirement.
source
share