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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:11:08+00:00 2026-06-04T15:11:08+00:00

In my app I six edit texts. I’ve grouped them in two linear layouts,

  • 0

In my app I six edit texts. I’ve grouped them in two linear layouts, 3 in on linear layout.
It should look something like this:

|EditText1|EditText4|

|EditText2|EditText5|

|EditText3|EditText6|

I want to edit texts are always the same size.
The problem occurs when users start to type something in field. If texts is too long…edit are texts are resizing. The one with focus gets biggers, and the one in the same horizontal row gets smaller.

How to prevent this?
I want to edit text stays the same size…if text is too long…i simple need to scroll it and follow text cursor.

How to do that? TNX!

Here some code:

 <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical"
        android:weightSum="3" >

        <EditText
            android:id="@+id/blackPlayerName"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="5dp"
            android:layout_marginTop="5dp"
            android:layout_weight="1"
            android:background="@drawable/black_name_selector"
            android:hint="@string/black"
            android:inputType="textPersonName"
            android:maxLength="12"
            android:singleLine="true"
            android:textColor="@drawable/player_name_textcolor"
            android:textColorHint="@drawable/player_name_textcolor" />

        <EditText
            android:id="@+id/redPlayerName"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="5dp"
            android:layout_marginTop="5dp"
            android:layout_weight="1"
            android:background="@drawable/red_name_selector"
            android:hint="@string/red"
            android:inputType="textPersonName"
            android:maxLength="12"
            android:singleLine="true"
            android:textColor="@drawable/player_name_textcolor"
            android:textColorHint="@drawable/player_name_textcolor" />

        <EditText
            android:id="@+id/whitePlayerName"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="5dp"
            android:layout_marginTop="5dp"
            android:layout_weight="1"
            android:background="@drawable/white_name_selector"
            android:hint="@string/white"
            android:inputType="textPersonName"
            android:maxLength="12"
            android:singleLine="true"
            android:textColor="@color/black"
            android:textColorHint="@color/black" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical"
        android:weightSum="3" >

        <EditText
            android:id="@+id/bluePlayerName"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"
            android:layout_marginRight="10dp"
            android:layout_marginTop="5dp"
            android:layout_weight="1"
            android:background="@drawable/blue_name_selector"
            android:hint="@string/blue"
            android:inputType="textPersonName"
            android:maxLength="12"
            android:singleLine="true"
            android:textColor="@drawable/player_name_textcolor"
            android:textColorHint="@drawable/player_name_textcolor" />

        <EditText
            android:id="@+id/greenPlayerName"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"
            android:layout_marginRight="10dp"
            android:layout_marginTop="5dp"
            android:layout_weight="1"
            android:background="@drawable/green_name_selector"
            android:hint="@string/green"
            android:inputType="textPersonName"
            android:maxLength="12"
            android:singleLine="true"
            android:textColor="@drawable/player_name_textcolor"
            android:textColorHint="@drawable/player_name_textcolor" />

        <EditText
            android:id="@+id/yellowPlayerName"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"
            android:layout_marginRight="10dp"
            android:layout_marginTop="5dp"
            android:layout_weight="1"
            android:background="@drawable/yellow_name_selector"
            android:hint="@string/yellow"
            android:inputType="textPersonName"
            android:maxLength="12"
            android:singleLine="true"
            android:textColor="@color/black"
            android:textColorHint="@color/black" />
    </LinearLayout>
</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-04T15:11:09+00:00Added an answer on June 4, 2026 at 3:11 pm

    For each of your edit texts set their layout_width to 0dp and layout_weight to 1

    <EditText
        android:layout_width="0dp"
        android:layout_weight="1"
        ... />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just inherited an old WinForms app with a UI layout like this: I'm
My app is expanding, but the reqs dictate that there should be only one
My app has several buttons which trigger different events. The user should NOT be
I need that my app will send some data to server every six hours
What does invalidate method do in winform app? Invalidate() method comes with six overloaded
In my App I have 7 buttons aligned using relative layout. The order I
i have a dashboard layout that has several images. When i run the app
App Engine only allows you to use these formats for XMPP addresses: app-id@appspot.com anything@app-id.appspotchat.com
app.get('/', function (req, res) { res.render('home.jade', { results: req.session.value }); }); What i would
Our app uses a component that requires a license file in the directory with

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.