Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9000753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:20:59+00:00 2026-06-16T00:20:59+00:00

I have 2 columns with 10 buttons with a bit longer names and i

  • 0

I have 2 columns with 10 buttons with a bit longer names and i dont know how to align them.. here is my code.. so please if anyone have an idea how to make it straight?
I have 2 columns with 10 buttons with a bit longer names and i dont know how to align them.. here is my code.. so please if anyone have an idea how to make it straight?

`<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/futuratheme"
android:gravity="center"
android:paddingBottom="25dip" >

<TableRow android:id="@+id/tableRow1" >



    <Button
        android:id="@+id/bPapir"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dip"
        android:layout_marginRight="5dip"
        android:layout_weight="50"
        android:text="@string/papir" />

    <Button
        android:id="@+id/bInformaticki"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_marginRight="15dip"
        android:layout_weight="50"
        android:text="@string/informaticki" />
</TableRow>

<TableRow android:id="@+id/tableRow5" >

    <Button
        android:id="@+id/bUredski"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dip"
        android:layout_marginRight="5dip"
        android:layout_weight="50"
        android:text="@string/uredski" />

    <Button
        android:id="@+id/bPisaci"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_marginRight="15dip"
        android:layout_weight="50"
        android:text="@string/pisaci_pribor" />
</TableRow>

<TableRow android:id="@+id/tableRow4" >

    <Button
        android:id="@+id/bOdlaganje"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dip"
        android:layout_marginRight="5dip"
        android:layout_weight="50"
        android:text="@string/odlaganje" />

    <Button
        android:id="@+id/bPrezentacija"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_marginRight="15dip"
        android:layout_weight="50"
        android:text="@string/prezentacija" />
</TableRow>

<TableRow android:id="@+id/tableRow3" >

    <Button
        android:id="@+id/button5"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dip"
        android:layout_marginRight="5dip"
        android:layout_weight="50"
        android:text="Button" />

    <Button
        android:id="@+id/button6"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_marginRight="15dip"
        android:layout_weight="50"
        android:text="Button" />
</TableRow>

<TableRow android:id="@+id/tableRow2" >

    <Button
        android:id="@+id/button3"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dip"
        android:layout_marginRight="5dip"
        android:layout_weight="50"
        android:text="Button" />

    <Button
        android:id="@+id/button4"
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_marginRight="15dip"
        android:layout_weight="50"
        android:text="Button" />
</TableRow>

`

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:20:59+00:00Added an answer on June 16, 2026 at 12:20 am

    Apply this to each tablerow

    android:layout_width="fill_parent" 
    android:layout_height="wrap_content".  
    

    Also you may want to add

    android:gravity="aGravityType" 
    

    (example “left|center”, “right|center”) to your buttons, that way it will align the text.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have four columns and four buttons I got them to all line up
Lets say I have one row with three columns - some buttons on left
I have multiple radio buttons columns in my gridview, I want to select one
I have a wpf datagrid that has it's columns generated dynamically in code and
I have 2 columns of radio buttons. Select one on the left, the corresponding
I have two columns of radio buttons and a dropdown for additional selection. Both
I have four columns of buttons in my program. Buttons move between columns when
I have created an array of buttons consisting of 6 rows and 7 columns.Now
I have a GridView control whose first two columns have buttons. When the row
I have a RadioGroup and I want to align buttons next to each other

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.