因为获取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
本文标题:关于Android在Fragment中获取控件布局信息
本文链接:https://www.haomeiwen.com/subject/xrrfgxtx.html
网友评论