I have a TableLayout and a row with a couple TextViews. I want to find the layout_weight of the TextView but I cant figure out how. I've tried the following:
TableRow.LayoutParams lp = tv1.getLayoutParams();
and:
ViewGroup.LayoutParams lp = tv1.getLayoutParams();
In the first case I get a type mismatch: "Cannot convert from ViewGroup.LayoutParams to TableRow.LayoutParams", and the second case works fine, however ViewGroup.LayoutParams doesn't have a weight field.
All the different types of LayoutParams are confusing, I'm never sure which to use where.