I have set TextViews in a linear layout using layout weights.
linearLayout.setWeightSum(7f);
for(int i=0;i<7;i++){
TextView tv= new TextView(this);
tv.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, 0, 1f));
tv.setText("sometext");
linearLayout.addView(tv);
}
How do I get the width and height of these TextViews after the layout is drawn?
tv.getWidth() and tv.getHeight() return 0;