开发者

How to increase the height of EditText through code in java?

开发者 https://www.devze.com 2023-04-06 14:26 出处:网络
I am trying to make the editText with increased height through android java c开发者_运维问答ode. How to achieve it? Any help is highly appreciated and thanks in advance....try this code...

I am trying to make the editText with increased height through android java c开发者_运维问答ode. How to achieve it? Any help is highly appreciated and thanks in advance....


try this code...

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

where EditText is your EditText..

and you can also set Width , margin..etc


have you tried

editTextObject.setHeight(30);
0

精彩评论

暂无评论...
验证码 换一张
取 消