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....
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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
回答2:
have you tried
editTextObject.setHeight(30);