练习的demo
http://download.csdn.net/download/jingerlovexiaojie/10164877
http://download.csdn.net/download/jingerlovexiaojie/10164877
2017-12-19
应该再加入
ViewGroup.LayoutParams thislp=getLayoutParams();
if(thislp.width>0)
sizeWidth=thislp.width;
if(thislp.height>0)
sizeHeight=thislp.height;
ViewGroup.LayoutParams thislp=getLayoutParams();
if(thislp.width>0)
sizeWidth=thislp.width;
if(thislp.height>0)
sizeHeight=thislp.height;
2017-06-16
API 24中,MarginLayoutParams已经不能直接写入(Wrap_Content,Wrap_Content),无耐之下,使用了以下二传手法:
LayoutParams lp=new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
ViewGroup.MarginLayoutParams lp2=new ViewGroup.MarginLayoutParams(lp);
LayoutParams lp=new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
ViewGroup.MarginLayoutParams lp2=new ViewGroup.MarginLayoutParams(lp);
2017-01-06
感觉// 重置我们的行宽和行高 lineWidth = 0;有问题,换行时没有把当前child的宽加入到lineWidth
2016-09-02