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

  • Home
  • SEARCH
  • 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 1095017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:03:31+00:00 2026-05-17T00:03:31+00:00

I want to have some layout a bit like this [text tabel][edittext] i cant

  • 0

I want to have some layout a bit like this

[text tabel][edittext]

i cant find an attribute like html esque label. It seems to be the case that i need to use

[TextView][EditText]

but i cant get them to go on the same line this is my xml file.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">"
<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/boat_1"/>
<EditText
    android:id="@+id/entry"
    android:hint="@string/IRC"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@android:drawable/editbox_background"/>
<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/boat_2"/>
<EditText
    android:id="@+id/entry"
    android:hint="@string/IRC"
    android:minWidth="100dip"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@android:drawable/editbox_background"/>
<Button android:id="@+id/close"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:text="@string/title_close" />

  • 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-05-17T00:03:32+00:00Added an answer on May 17, 2026 at 12:03 am

    You have basically two options:

    Option 1: Use nested LinearLayouts:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"> 
    <LinearLayout
    android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content">
    <TextView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="@string/boat_1"/> 
    <EditText 
        android:id="@+id/entry" 
        android:hint="@string/IRC" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:background="@android:drawable/editbox_background"/> 
    </LinearLayout>
    <LinearLayout
    android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content">
    <TextView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="@string/boat_2"/> 
    <EditText 
        android:id="@+id/entry" 
        android:hint="@string/IRC" 
        android:minWidth="100dip" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:background="@android:drawable/editbox_background"/> 
    </LinearLayout>
    <Button android:id="@+id/close" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:layout_alignParentBottom="true" 
        android:text="@string/title_close" /> 
    

    Notice that I’m using android:orientation="horizontal" for those nested layouts.

    Option 2: you can use another content manager, like RelativeLayout.

    The advantage of this, is that you can avoid nesting, thus your layout will be easier to read/maintain/inflate. This is a brief example:

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
        android:orientation="vertical" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content">
        <TextView 
            android:id="@+id/text_view_boat1"
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:text="@string/boat_1"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"/> 
        <EditText 
            android:id="@+id/entry" 
            android:hint="@string/IRC" 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:background="@android:drawable/editbox_background"
            android:layout_toRightOf="@+id/text_view_boat1"
            android:layout_alignParentTop="true"/> 
        <TextView 
            android:id="@+id/text_view_boat2"
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:text="@string/boat_2"
            android:layout_alignParentLeft="true"
            android:layout_below="@id/text_view_boat1"/> 
        <EditText 
            android:id="@+id/entry2" 
            android:hint="@string/IRC" 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:background="@android:drawable/editbox_background"
            android:layout_toRightOf="@+id/text_view_boat2"
            android:layout_below="@id/entry"/> 
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have some controllers, i want to put categories names into layout, like menu,
I have some unicode text that I want to clean up using regular expressions.
I have some action and I don't want to use usual layout for it.
I have some layout with image, I want that layout fit in screen automatically
I want to make Activity like this using GridView. And this Activity have only
I have some nested tables that I want to hide/show upon a click on
I have some data that I want to store somewhere in my Rails app
Hi have some forms that I want to use some basic php validation (regular
I have some kind of test data and want to create a unit test
I have some simple shell scripting tasks that I want to do For example:

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.