Pattabi Raman
Pattabi Raman

Reputation: 5854

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

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....

Upvotes: 1

Views: 999

Answers (2)

Niranj Patel
Niranj Patel

Reputation: 33258

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

Upvotes: 1

Pa.M
Pa.M

Reputation: 1402

have you tried

editTextObject.setHeight(30);

Upvotes: 0

Related Questions