A call after the view added in the parent view, otherwise you would be releasing java.lang.NullPointerException: trying to call the virtual method 'int android.view.View.getHeight ()'
int height = ((View) view.getParent()).getHeight(); int width = ((View) view.getParent()).getWidth(); int mHeight = ((View) view.getParent()).getMeasuredHeight(); int mWidth = ((View) view.getParent()).getMeasuredWidth();
Vahe gharibyan
source share