Hello, I want to add a RelativeLayout and set its height according to size of a font. I added this code:
Rect rect = new Rect(); paint.getTextBounds("A", 0, 1, rect); ViewGroup.LayoutParams params1 = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, rect.right - rect.left); RelativeLayout rl = new RelativeLayout(context); rl.setLayoutParams(params1); Than I add a new TextView to this RelativeLayout. But I can see only small part of the text. How can I measure the height I will need to this layout before the onMeasure or onLayout. Thanks, Sharon -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en