@Override public void onWindowFocusChanged(boolean hasWindowFocus) { driveLayout.setImageViewHeight(imageView.getMeasuredHeight()); driveLayout.setImageViewWidth(imageView.getMeasuredWidth()); }
/** * Sets the custom height of the whole figure. This recalculates the text-sizes inside the Canvas. * * @param customHeight the desired height in dp. */ public void setCustomHeight(float customHeight) { driveLayout.setCustomHeight(customHeight); driveLayout.setImageViewHeight(imageView.getMeasuredHeight()); driveLayout.setImageViewWidth(imageView.getMeasuredWidth()); }