In my code I have an Image View
in my XML layout and I keep changing the source image for this in my code. Now I want to know the width and height of the generated image each time.
I tried using getWidth()
, getHeight(),
getMeasuredWidth(),
and getMeasuredHeight()
, but they all return 0.
How can I get this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…