I have an editText I made in a TableLayout, I want it to have 5 lines but if I press enter a bunch of times it'll expand the editText box on the screen. I can't figure out how to get this to stop.
LayoutParams bigedit = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); //width height
bigedit.weight=1;
bigedit.setMargins(10, 0, 0, 10);//Left Top Right Bottom
EditText testEdit1= new EditText(this);
testEdit1.setBackgroundResource(R.drawable.black_rect_border);
testEdit1.setInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE);
testEdit1.setLines(5);
testEdit1.setMaxLines(5);
testEdit1.setVerticalScrollBarEnabled(true);
testEdit1.setId(unusedid);
testEdit1.setSingleLine(false);
testEdit1.setGravity(Gravity.TOP|Gravity.LEFT);
unusedid++;
testEdit1.setTextSize(16);
testEdit1.setLayoutParams(bigedit);
row1.addView(testEdit1);
tl.addView(row1);
Where tl is the TableLayout in the activity.