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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:38:22+00:00 2026-06-13T10:38:22+00:00

Sorry if I’m asking such a basic question. I have tried to google all

  • 0

Sorry if I’m asking such a basic question. I have tried to google all morning, and read through the documentations at developer.android.com, but I couldn’t find a solution.

In short, I would like to make an interface that looks like this:

enter image description here

This is what I have so far:

enter image description here

Now, I’m trying to bring the 2 buttons to the next line, but I still have no luck with that. If I change the android:orientation=”horizontal” to “vertical”, everything was aligned vertically. I tried to bring the line android:orientation=”vertical” inside the Button tag, but that didn’t seem to work.

What else can I try? Would somebody give me a few pointers? (I’m new at Android development and all these XML stuff).


Below is my XML code:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
>

<EditText android:id="@+id/txt_Input"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"

        android:hint="@string/txt_Input"

        android:layout_weight="4"                      
/>
<Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/btn_Send" 

        android:layout_weight="1"

        android:onClick="sendMessage"
/>

<Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/btn_Send" 

        android:layout_weight="1"

        android:onClick="sendMessage"
/>

</LinearLayout>
  • 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-13T10:38:23+00:00Added an answer on June 13, 2026 at 10:38 am

    Just use RelativeLayout, and your buttons should look something like this:

    <Button
        android:id="@+id/send"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/btn_Send" 
        android:onClick="sendMessage"
        android:layout_below="@+id/txt_Input"
        android:layout_alignParentLeft="true"/>
    
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/btn_Send" 
        android:onClick="sendMessage"
        android:layout_below="@+id/txt_Input"
        android:layout_toRightOf="@+id/send"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry for the basic question - I'm a .NET developer and don't have much
Sorry for such a basic question. After using MS Visual Studio for 15 years,
Sorry to interrupt all of you. I have a question about session. In my
sorry for asking a really amateurish question, but I am only beginning to learn
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Sorry if this is stupid question, but I'm new to MATLAB. I have a
Sorry if you are thinking this as Basic question. I am Having shell scripts
Sorry this is such a long question. Ive been doing lots of research lately
Sorry, I'm sure this is a stupid question. I have successfully installed python 2.6
Sorry if this is a noob question, but All my code is error-free and

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.