0

Possible Duplicate:
What is the difference between getWidth/heigth() and getMeasuredWidth/Heigth() in Android SDK?

Which function will retrieve the actual width of a view in all cases? What is the difference between these two? Thanks.

Community
  • 1
  • 1
Eldhose M Babu
  • 14,382
  • 8
  • 39
  • 44

1 Answers1

4

gewidth() is used to get width of view that has drawn like (view.getwidth() or view.getheight()). but, getMeasureWidth() is used to get width of view that not drawn yet. like getmeasuredwidth() and getmeasureheight(). example : First call measure view.measure(0,0) and then u can use it with getmeasuredwidth() and getmeasureheight()

Jal Sq
  • 91
  • 5