XML : Android: Text stretches to button?

Is there a way this could be done? The functionality should be like an image which stretches and compresses with the change of dimension. I just don't want results like "tex.." on buttons.

If this is not possible in the XML, can you do it in programmaticly using Java? I formatted text to fit buttons perfectly, but when I tried it on a smaller device (even using "sp" units) the text couldn't fit the buttons.

What I tried is multiplying the text size by the ratio of the devices' screen widths, but it overshot with the results...

Any ideas?

No comments:

Post a Comment