如何更改按钮,动态的机器人的大小机器人、按钮、如何更改、大小

由网友(别跟我讲二手情话)分享简介:我尝试setWidth(),并自动调用setHeight()方法,但它不能正常工作I try setWidth() and setheight() method but it not work 推荐答案尝试使用的LayoutParams。例如Try using LayoutParams. For example...

我尝试setWidth(),并自动调用setHeight()方法,但它不能正常工作

I try setWidth() and setheight() method but it not work

推荐答案

尝试使用的LayoutParams。例如

Try using LayoutParams. For example

button.setLayoutParams(新的LayoutParams(50,LayoutParams.WRAP_CONTENT)

阅读全文

相关推荐

最新文章