Android Wrap TextView to width of ImageButton?

You should at least try to find a solution yourself Or give some explanation why (and what) your own findings were Something like this should do the trick: LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical.

You should at least try to find a solution yourself. Or give some explanation why (and what) your own findings were. Something like this should do the trick.

Sorry, I meant to add the code I was using. I was in a hurry to get the question asked before I left. – s73v3r Dec 1 '10 at 7:03 That doesn't work, as the text doesn't wrap to a second line if it is wider than the button.

– s73v3r Dec 1 '10 at 7:03.

I have a LinearLayout which contains an ImageButton, and underneath that, a TextView as a label. I would like to have the TextView to be centered, and to have it wrapped to the width of the ImageButton it is underneath. EDIT: I should probably put the code I'm currently using.

What I want is for the ImageButton to be on top of the LinearLayout, with the TextView acting as a label underneath, and wrapping its text to a second line if it would be wider than the button.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions