private void getPicDetails() {
            targetW = img_cow.getWidth();
            targetH = img_cow.getHeight();
            Log.e("targetW: ", "" + targetW);
            Log.e("targetH: ", "" + targetH); 
        }
I have an image view and the method above gets the height and width to print the values of height and width. Now when I call getPicDetails() in onCreate, the values are 0, same as when I put it in OnStart and onResume.
My question is: where should I put my method such that the imageview is initialized and exists?
 
     
     
     
    