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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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()