Setting height of TableRow

coffee picture coffee · Jun 20, 2011 · Viewed 13.9k times · Source

I have two types of content for TableRow. One has two lines and the other one. I wish everyone had the same height. I'm trying something like this:

tr.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, 80));

Any other ideas? And, how can I transform "80" in dp?

Answer