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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:25:09+00:00 2026-06-07T07:25:09+00:00

I’ve searched how can I align the app to the right side and the

  • 0

I’ve searched how can I align the app to the right side and the text to be written from right to left.
The only thing I’ve found and succeeded to do is to make the text be written from right to left by adding android:gravity="right"
in the EditText and the Button, but still their sort in the line if from the left to the right.
The activity_main.xml file –

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:gravity="right"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal" >

    <EditText android:id="@+id/text_message"
     android:gravity="right"
     android:layout_weight="1.0"
     android:layout_width="0dp"
     android:layout_height="wrap_content"
     android:hint="@string/text_message" />

    <Button android:layout_height="wrap_content"
     android:gravity="right"
     android:layout_width="wrap_content"
     android:text="@string/send_button"
     android:onClick="ButtonClicked" />

    <Button android:layout_height="wrap_content"
     android:gravity="right"
     android:layout_width="wrap_content"
     android:text="@string/delete_button"
     android:onClick="DeleteClicked" />

</LinearLayout>

What I meant in “the sort is from the left to the right” is that the EditText is written before the “Send” button, and the “Send” button id written before the “Delete” button – so what’s shown is
“[____x] [Send][Delete]” and not “[Delete][Send][_____]”, as I would want to.

  • 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-07T07:25:11+00:00Added an answer on June 7, 2026 at 7:25 am

    You can use instead of LinearLayout, RelativeLayout and give your buttons some ids using

    android:id="@+id/your_button_id
    

    and then use the tags android:layout_toRightOf and android:layout_toLeftOf. In your case, something like this:

    <?xml version="1.0" encoding="utf-8"?> 
    <RelativeLayout 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" >
    
    <Button android:id="@+id/delete_button" 
     android:layout_height="wrap_content"
     android:layout_width="wrap_content"
     android:text="@string/delete_button"
     android:onClick="DeleteClicked" />
    
    <Button android:id="@+id/send_button" 
     android:layout_height="wrap_content"
     android:layout_width="wrap_content"
     android:layout_toRightOf="@+id/delete_button"
     android:text="@string/send_button"
     android:onClick="ButtonClicked" />
    
    <EditText android:id="@+id/text_message"
     android:layout_weight="1.0"
     android:layout_width="0dp"
     android:layout_toRightOf="@+id/send_button"
     android:layout_height="wrap_content"
     android:hint="@string/text_message" />
    
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I have a bunch of posts stored in text files formatted in yaml/textile (from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.