在DraggableGridView里面的这一句代码
getChildAt(i).layout(xy.x, xy.y, xy.x + childSize, xy.y + childSize);
的前面加上一句
getChildAt(i).measure(MeasureSpec.makeMeasureSpec(childSize, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(childSize, MeasureSpec.EXACTLY));
附上链接
http://stackoverflow.com/questions/13699426/imageview-and-textview-not-displaying-in-view
还有另一种解决方案
http://stackoverflow.com/questions/18002475/inflated-layouts-children-not-showing
getChildAt(i).layout(xy.x, xy.y, xy.x + childSize, xy.y + childSize);
的前面加上一句
getChildAt(i).measure(MeasureSpec.makeMeasureSpec(childSize, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(childSize, MeasureSpec.EXACTLY));
附上链接
http://stackoverflow.com/questions/13699426/imageview-and-textview-not-displaying-in-view
还有另一种解决方案
http://stackoverflow.com/questions/18002475/inflated-layouts-children-not-showing