Android layout alignment issues

Posted by Jake Schwartz on Stack Overflow See other posts from Stack Overflow or by Jake Schwartz
Published on 2011-01-17T17:32:09Z Indexed on 2011/01/17 17:53 UTC
Read the original article Hit count: 464

Filed under:
|

So I am trying to get my layout to look like this:

| button       text       button |

So that the text is centered between my two buttons. I first tried using LinearLayouts and layout_gravity tags, but that would give me something like:

|        buttontextbutton        |

and now I have a relative layout with alignParentLeft/Right and centerInParent tags but the layout now looks like

| button text buttonnnnnnnnnnnnn |

Is there a way to get my layout right with text that changes lengths?

Thanks, Jake

© Stack Overflow or respective owner

Related posts about android

Related posts about android-layout