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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:22:45+00:00 2026-06-12T03:22:45+00:00

i am begginer in android. In my app i am having textview which has

  • 0

i am begginer in android. In my app i am having textview which has multiple lines of text , it may have 15-20 lines. i want vertical auto scroll of text within that textview. so what can be the solution?

here is my xml code :

<LinearLayout 
    android:id="@+id/Thumbnail"
    android:layout_width="fill_parent"
    android:layout_height="200dp"
    android:paddingTop="10dp"
    android:paddingBottom="10dp"
    android:gravity="center"
    android:background="@drawable/imgres">
    <ScrollView      
        android:id="@+id/sv"     
        android:layout_width="fill_parent"     
        android:layout_height="fill_parent"    
        android:fillViewport="true" >

    <TextView 
    android:id="@+id/tv"
    android:layout_width="fill_parent"
    android:layout_height="200dp"
    android:background="#80000000"
    android:width="200dp"
    android:textStyle="bold"
    android:textColor="#ffffff"
    android:gravity="center"
    android:layout_alignParentTop="true" 
    android:focusable="true"
    android:focusableInTouchMode="true" 
    android:scrollbars = "vertical"
    android:maxLines="10"
    />    
   </ScrollView>
</LinearLayout>

In function i have set the text of my textview using code below :

tv.setText(textArray);
  • 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-12T03:22:46+00:00Added an answer on June 12, 2026 at 3:22 am

    You don’t need to use a ScrollView actually.

    Just set the

    android:maxLines = "AN_INTEGER_NUMBER"
    
    android:scrollbars = "vertical"
    

    properties of your TextView in your layout’s xml file.

    Then use:

    yourTextView.setMovementMethod(new ScrollingMovementMethod())
    

    in your code.

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

Sidebar

Related Questions

i have a basic function which requires serializing in my android app. The user
Begginer to Android development. I am developing a application, which have three different tabs.
I am a begginer in android,here I have activity that use web service: SoapObject
I'm writing an android App which is basically finished and functions well on a
i am begginer to jquery and have a simple problem.. I want to make
I am begginer in Android App and using Java as when I add this
I am absolute begginer in android devlopment and i want to make a camera
I'am begginer in android programming and I'am trying to create app that is logging
Begginer android programer, I want add and remove item from String list when user
I am a begginer in android. I have a simple code, where I am

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.