0
I have two Editext fields, name and age I need the name field to be 70% of the line and the age to 30%, in xml it’s easy to solve this, but in Java code I’m not getting, does anyone know how to do? Thank you in advance!
I’m using this code to set the parameters.
LayoutParams param5 = new LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.WRAP_CONTENT, X);
nome_edit.setLayoutParams(param5);
Note: I tried to leave the first parameter of Layoutparams at 0 and put a value in place of X but it didn’t work.