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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:17:06+00:00 2026-06-08T09:17:06+00:00

The question is: I have a TextView and an EditText, how can I place

  • 0

The question is: I have a TextView and an EditText, how can I place them on the same “level”?

http://postimage.org/image/o9l17a3zv/

As you can see, I want to put “Username” on the same level of the EditText…

Here my code:

<TextView
    android:id="@+id/account_creation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/account_creation"
    android:textSize="20sp"
    android:textStyle="bold" />

<!-- Username -->

<TextView
    android:id="@+id/username_registration"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@id/account_creation"
    android:layout_toLeftOf="@+id/username_new_account"
    android:text="@string/user_text"
    android:textSize="15sp" />

<EditText
    android:id="@+id/username_new_account"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@id/account_creation"
    android:layout_alignParentRight="true"
    android:ems="10"
    android:hint="@string/user_editext" >

    <requestFocus />
</EditText>

I was thinking to put the same value of “height” on both of them, but i don’t know if it’s the right/better way…

  • 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-08T09:17:09+00:00Added an answer on June 8, 2026 at 9:17 am

    TEXT VIEW AND EDIT TEXT ARE ON THE SAME LINE TOUCHING THE BOTTOM LINE OF PARENT LAYOUT
    Try this one.

    android:layout_alignBottom="@+id/editText1"
    

    This will surely help you.

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/parentView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
    
        <TextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBottom="@+id/editText1"
            android:text="TextView" />
    
        <EditText
            android:id="@+id/editText1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/textView1"
            android:ems="10" >
    
            <requestFocus />
        </EditText>
    
    </RelativeLayout>
    

    Thanks.

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

Sidebar

Related Questions

I have a question. How Can I set font for example: Harrington in textview.
I have a question about EditText.setError() . I have an EditText : <TextView android:id=@+id/sc_num
I have seen the following links before posting this question http://www.devx.com/wireless/Article/40792/1954 Saving Android Activity
I have a timepicker class and can show the time after picked. My question
Just a basic question: If I have several dozen EditText fields that are part
I have a question: I have a link: http://wap.nastabuss.se/its4wap/QueryForm.aspx?hpl=Teleborg+C+(V%C3%A4xj%C3%B6 ) and I wanna take
So i have this test Activity with 3 elements: TextView, EditText, Button. When user
No doubt elements of this question have been asked before, but I'm having trouble
I know variants of this question have been asked before (even by me), but
I want to show pop up of question with it's options. Each question have

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.