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 8899151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:47:26+00:00 2026-06-15T00:47:26+00:00

I need to align a set of text fields in an absolute layout. Here

  • 0

I need to align a set of text fields in an absolute layout. Here I’m posting an image. I want to make these text fields vertically and horizontally align. I showed only three sets but in my real app want to add up to 10 sets. To me it is very difficult to align them.

enter image description here

I’m a beginner Android developer so I don’t have proper idea how to do this. Please explain me what is the best way to do this.

Here is my layout code:

<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<EditText
    android:id="@+id/editText1"
    android:layout_width="78dp"
    android:layout_height="wrap_content"
    android:layout_x="81dp"
    android:layout_y="56dp" />

<EditText
    android:id="@+id/EditText01"
    android:layout_width="78dp"
    android:layout_height="wrap_content"
    android:layout_x="202dp"
    android:layout_y="58dp" />

<EditText
    android:id="@+id/EditText02"
    android:layout_width="78dp"
    android:layout_height="wrap_content"
    android:layout_x="82dp"
    android:layout_y="130dp" />

<EditText
    android:id="@+id/EditText03"
    android:layout_width="78dp"
    android:layout_height="wrap_content"
    android:layout_x="205dp"
    android:layout_y="127dp" />

<EditText
    android:id="@+id/EditText04"
    android:layout_width="78dp"
    android:layout_height="wrap_content"
    android:layout_x="82dp"
    android:layout_y="197dp" />

<EditText
    android:id="@+id/EditText05"
    android:layout_width="78dp"
    android:layout_height="wrap_content"
    android:layout_x="205dp"
    android:layout_y="196dp" />

</AbsoluteLayout>
  • 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-15T00:47:27+00:00Added an answer on June 15, 2026 at 12:47 am

    use like this in Tablelayout

    <?xml version="1.0" encoding="utf-8"?>
     <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent"
       android:orientation="vertical" >
    
    <TableLayout
        android:id="@+id/tableLayout1"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    
        <TableRow
            android:id="@+id/tableRow1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >
    
            <EditText
                android:id="@+id/editText1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
    
            <EditText
                android:id="@+id/editText2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
        </TableRow>
    
        <TableRow
            android:id="@+id/tableRow2"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >
    
            <EditText
                android:id="@+id/editText21"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
    
            <EditText
                android:id="@+id/editText22"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
        </TableRow>
    
        <TableRow
            android:id="@+id/tableRow3"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >
    
            <EditText
                android:id="@+id/editText31"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1" />
    
            <EditText
                android:id="@+id/editText32"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:padding="10dp" />
        </TableRow>
    </TableLayout>
    

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

Sidebar

Related Questions

I need to align the text inside the p tag to vertically middle. Since
I need to align multiple lines of text to the middle. Here is a
I need to center some text inside a <div> or <span> tag. I've set
I'm trying to simply align a set of text and <input> elements to the
I need to align two divs next to each other, so that each contains
This is my markup, I need to align gray label under the blue label
I need help to align CSS buttons. I tried many different variations and I
How does one set the alignment of text within a chart legend object? I've
I need to set a template for mailing using a table, I looks fine:
I have a form with a set of fieldsets. These fieldsets will be conditionally

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.