Today in the study of custom ListView drop-down refresh effect, want to migrate to the project requirements, and then see the custom source code found a problem is getwidth and getmeasuredwidth two methods have what difference, ask the almighty Baidu, after investigation found that the difference between the two methods is , GetWidth obtained is the current view of the visible width, but pull down to refresh the demand, the head hint of the view is hidden so that the getwidth can not get the width of the view, so take the getmeasuredwidth way to get. The Getmeasuredwidth method represents the width of the visible width of the view + the hidden place. In this demand, our headview is always hidden, so only through this getmeasuredwidth method can get to the desired width, a picture represents the principle I said, so more intuitive.
Special Thanks post address: http://blog.sina.com.cn/s/blog_6e519585010152s5.html
The difference between view forms GetWidth and Getmeasuredwidth in Android