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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:23:54+00:00 2026-06-10T10:23:54+00:00

just a simple question here. I have a edittext inside a scrollview. Here is

  • 0

just a simple question here. I have a edittext inside a scrollview. Here is my code regarding edittext

 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
 >

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="899dp" >

<LinearLayout
    android:id="@+id/LL1"
    android:layout_width="match_parent"
    android:layout_height="320dp"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="50dp"
    android:orientation="vertical" >

    <ImageView
        android:id="@+id/ivMainPic"
        android:layout_width="match_parent"
        android:layout_height="320dp"
         />

</LinearLayout>

<TextView
    android:id="@+id/tvDescription"
    android:layout_width="match_parent"
    android:layout_height="50dip"
    android:layout_below="@+id/LL1"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="25dp"
    android:text="@string/strDescription"
    android:textSize="14dp" 
    android:layout_marginLeft="30dip"
    android:layout_marginRight="30dip"/>

<TextView
    android:id="@+id/tvCondition"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/tvDescription"
    android:layout_marginTop="20dp"
    android:layout_marginLeft="20dip"
    android:text="@string/strCondition"
    android:textStyle="bold"
    android:textAppearance="?android:attr/textAppearanceMedium" />



<Button
    android:id="@+id/btnGetOffer"
    style="?android:attr/buttonStyleSmall"
    android:layout_width="match_parent"
    android:layout_height="40dip"
    android:layout_below="@+id/etConditionBody"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="18dp"
    android:text="@string/strGetOffer"
    android:layout_marginLeft="20dip"
    android:layout_marginRight="20dip" 
    android:background="@drawable/roundedcorner"
    android:textStyle="bold" />

<TextView
    android:id="@+id/etConditionBody"
    android:layout_width="match_parent"
    android:layout_height="300dp"
    android:layout_below="@+id/tvCondition"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="26dp" 
    android:layout_marginLeft="20dip"
    android:layout_marginRight="20dip"
    android:gravity="top"
    android:paddingBottom="20dip"
    android:paddingLeft="20dip"
    android:paddingRight="20dip"
    android:paddingTop="20dip"
    android:scrollbars="vertical" 
    android:background="@drawable/edittextborder"/>

</RelativeLayout>
</ScrollView>

Now what I am doing is making it scrollable and a not editable edittext because I am feching its text on my db.
I tried using this code

etConditionBody= (EditText) findViewById(R.id.etConditionBody);
etConditionBody.setScroller(new Scroller(getBaseContext())); 
etConditionBody.setMaxLines(8); 
etConditionBody.setVerticalScrollBarEnabled(true); 
etConditionBody.setMovementMethod(new ScrollingMovementMethod());
etConditionBody.setText("wew \n wew2 \n wew3 \n wew4 \n wew \n wew2 \n wew3 \n wew4 \n wew \n wew2 \n wew3 \n wew4 \n wew3 \n wew4 \n wew \n wew2 \n wew3 \n taena");

but it is not scrolling, it just limit my lines to 8

i used that code based on this links
how to enable vertical scrollbar of an edittext programmatically
How to make edittext in Android scrollable?
but it isnt working

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

    Use a TextView instead of an edittext for this. You can use a scrollview for for the scrolling Such as

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="300dp">
    
    <TextView
        android:id="@+id/tvConditionBody"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
    />
    
    </ScrollView>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just a simple question. I am looking at some javascript code here: <script class=brush:
I just have one simple question here is the desc: I'm working on news
very simple question here but I don't have the answer... ;-) I just need
I have a really simple question here, but I just can't find an answer
i have a pretty simple question and i'm just not sure why the code
Simple question, I just want to select the text from the <Template> tag. Here's
im struggling with syntax here: hopefully this question is v simple, im just miising
Mercurial newbie here, I have a simple question. I deleted one of my files
here is a simple question. I have a 'ul' which i have made sortable
So I am just trying out the Jsoup API and have a simple question.

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.