如何增加的EditText的高度,通过code在java中? [英] How to increase the height of EditText through code in java?

查看:124
本文介绍了如何增加的EditText的高度,通过code在java中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图与利用Android的Java code增加高度EDITTEXT。如何实现呢?任何帮助是非常AP preciated和感谢提前....

I am trying to make the editText with increased height through android java code. How to achieve it? Any help is highly appreciated and thanks in advance....

推荐答案

试试这个code ...

try this code...

ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams)EditText.getLayoutParams();
mlp.height=100;
mlp.width=150; 

其中,的EditText 的EditText ..

和您还可以设置宽度,margin..etc

and you can also set Width , margin..etc

这篇关于如何增加的EditText的高度,通过code在java中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆