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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:05:17+00:00 2026-06-17T13:05:17+00:00

I am having scaling problems when using the 9-patch images for the background of

  • 0

I am having scaling problems when using the 9-patch images for the background of EditText fields. I have a table which stretches the entire width, inside here I have the following tablerow which fills the width of the table.

The problem is that I am using a 9-patch image as the background but the edit text field is not stretching to the entire width, it only stretches to the width of the hint text.

<TableRow
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical|center_horizontal" >

    <EditText
        android:id="@+id/et_username"
        android:contentDescription="@string/hint_enterUsername"
        android:hint="@string/hint_enterUsername"
        android:singleLine="true"
        android:textSize="@dimen/edittext_textsize"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"                    
        android:gravity="center_horizontal|center_vertical"
        android:background="@drawable/background_field_top" />

</TableRow>

I can see in the graphical view that the width of the row does stretch but the EditText field does not, as shown in the attached image

Graphical View

Has anyone any ideas on how to make the edittext stretch to the entire size? The following is the 9-patch image I’m using.

9-patch image

  • 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-17T13:05:18+00:00Added an answer on June 17, 2026 at 1:05 pm

    your is working fine for me ..i am using my own 9 patch… here is my code :

            <LinearLayout
                android:id="@+id/layout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical" >
    
                <TableRow
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical|center_horizontal" >
    
                    <EditText
                        android:id="@+id/et_username"
                        android:layout_width="fill_parent"
                        android:layout_height="wrap_content"
                        android:background="@drawable/areanumber"
                        android:gravity="center_horizontal|center_vertical"
                        android:singleLine="true"
                        android:text="hello" />
                </TableRow>
            </LinearLayout>
    

    here areanumber is my 9 patch image… just try to wrap your code inside linearlayout
    i implemented your 9 patch image and its also working fine

    enter image description here

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

Sidebar

Related Questions

I'm having some trouble with a fluid layout (with images using max-width:100%) in Internet
I'm having some problems with scaling a container to a fixed point. In my
I'm having an odd issue in FF10 using jQuery 1.7.1. I have a gallery
I'm having problems creating a 3D first-person camera in DirectX 11. I have a
Having recently begun working on a project which might need (good) scaling possibilities, I've
I'm having problems using CCMenu with scaled CCMenuItemSprite menu items. I'm trying to scale
I've been having all sorts of problems using media queries on a Desire HD
I'm working on a fluid layout and I'm having trouble with scaling images. I've
I'm having problems generating thumbnails of images with an Alpha channel (transparency). The code
I'm having problems scaling an image in nsimageview correctly. What happens is when the

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.