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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:22:18+00:00 2026-05-15T10:22:18+00:00

He is an example of my TextView, which goes off the right side of

  • 0

He is an example of my TextView, which goes off the right side of the screen. I tried setting paddings and stuff, but nothing seemed to work. Any ideas? Here is my hierarchy,
ScrollView,TableLayout

  <TableRow>
   <TextView
    android:layout_column="1"
       android:id="@+id/text_price"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:inputType="textCapCharacters"
       android:padding="2dip"
       android:text="@string/game_price"
   />
   <EditText
       android:id="@+id/gameprice"
       android:inputType="textCapCharacters"
       android:gravity="right"
       android:minWidth="120dip"
   />
  </TableRow>
  • 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-15T10:22:18+00:00Added an answer on May 15, 2026 at 10:22 am

    Try setting the width of the textview to wrap_content, remove the layout_column=1 (not necessary, afaik), and set the height and width of the edittext to wrap_content.

    Anyway it’s weird to have a textview filling the screen and an edittext to its right with a width of at least 120dip. If you stick to a TableLayout maybe you’ll have to play with the weights of the elements, tho I’m not too sure of how this works in a tableLayout. To fill the width of the screen, define that in the TableLayout with fill_parent.

    If what you want is a TextView taking all the space left by the EditText placed to the right, a RelativeLayout would do the work

       <RelativeLayout>
           <EditText
               android:id="@+id/gameprice"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:inputType="textCapCharacters"
               android:gravity="right"
               android:minWidth="120dip"/>
            <TextView
               android:id="@+id/text_price"
               android:layout_width="fill_parent"
               android:layout_height="wrap_content"
               android:inputType="textCapCharacters"
               android:padding="2dip"
               android:text="@string/game_price"
    
               android:layout_toLeftOf="@id/gameprice"/>
        </RelativeLayout>
    

    You’ll need to play with the placement of the EditText, the TextView will stick to its left.

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

Sidebar

Related Questions

I tried following the following example to make an HTTP link in my TextView
How can we integrate UIScrollview,UIView,Textview under TableviewCell.for example if we press button which is
if i add string in a TextView for example, this is my string and
I have a question. How Can I set font for example: Harrington in textview.
Occasionally a TextView with dynamic content will show a price. For example, as part
What is meant by Ems (related to a TextView)? For example in android:ems setEms(int)
How can I display HTML text in textview? For example, string &lt;h1&gt;Krupal testing &lt;span
Is there an example or maybe an already implemented ListPreference for Android, which has
I have a layout which specifies sizes of widgets in relative dimension, for example:
I have a ListView, which has a TextView and a RadioGroup with 4 RadioButtons

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.