关于Android在Fragment中获取控件布局信息
2017-12-23 本文已影响0人
evilgiven
因为获取Fragment中动态加载的控件位置信息的时候,控件可能还没绘制好,所以用getLocationOnScreen得到的坐标为(0, 0)
https://stackoverflow.com/questions/16936494/fragments-what-is-the-best-place-to-measure-views
因为获取Fragment中动态加载的控件位置信息的时候,控件可能还没绘制好,所以用getLocationOnScreen得到的坐标为(0, 0)
https://stackoverflow.com/questions/16936494/fragments-what-is-the-best-place-to-measure-views