阅读背景:

在Android中创建动态大小的正方形(相等的高度和宽度)UI元素

来源:互联网 

As the title states, I am trying to set the width of a layout element to be equal to the height (which is set to match the parent). I've tried setting the width parameter programatically from the height parameter, but this shows up as -1 rather than the actual height (since it matches the parent). Anyone know how I can create square layout elements whose size is dynamic? Thanks.As the title states, I am trying to set the wid




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: