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

The Archive Base Latest Questions

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

I am finding a tough time setting the textview with vertical scrolling text. In

  • 0

I am finding a tough time setting the textview with vertical scrolling text. In my dialog I have a textview with large text, since dialog is small window I want the textview text to scroll the vertically so that dialog looks good. Below is my xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#FFFFFF" >

    <ImageView
        android:id="@+id/fbcancel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:src="@drawable/fbcancel" />

    <EditText
        android:id="@+id/fbedittext"
        android:layout_width="230dp"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/imageView1"
        android:layout_marginLeft="5dp"
        android:layout_marginTop="33dp"
        android:background="@drawable/roundcorners"
        android:ems="10"
        android:gravity="center"
        android:hint="@string/fbhint"
        android:lines="6"
        android:paddingRight="5dp"
        android:scrollHorizontally="true" />
    <RelativeLayout
        android:id="@+id/relativeLayout1"
        android:layout_width="80dp"
        android:layout_height="250dp"
        android:layout_alignParentRight="true"
        android:layout_toRightOf="@+id/fbedittext" >

        <Spinner
            android:id="@+id/spinner"
            android:layout_width="50dp"
            android:layout_height="30dp"
            android:layout_alignLeft="@+id/fbshare"
            android:layout_alignRight="@+id/fbshare"
            android:layout_below="@+id/fbshare"
            android:layout_marginTop="16dp"
            android:drawSelectorOnTop="true"
            android:entries="@array/fblist" 

            android:visibility="gone"/>

        <ImageView
            android:id="@+id/fbpeople"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@+id/fbshare"
            android:layout_alignRight="@+id/fbshare"
            android:layout_below="@+id/fbshare"
            android:layout_marginTop="16dp"
            android:background="@drawable/people"
            android:drawSelectorOnTop="true" />

        <ImageView
            android:id="@+id/fbshare"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="65dp"
            android:src="@drawable/newfb" />
    </RelativeLayout>



<ScrollView android:id="@+id/textAreaScroller" 
    android:layout_width="fill_parent" 
        android:layout_height="173px" 
        android:layout_x="0px" 
        android:layout_y="25px" 

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/fbedittext"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/fbedittext"
        android:layout_marginTop="22dp"
        android:lines="7"
        android:scrollbars="vertical"
        android:text="@string/fbtext" />
</ScrollView> 
    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/fbcancel"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:paddingRight="2dp"
        android:src="@drawable/askabud" />

</RelativeLayout>

I tried placing the scroll view but the textview is going in wrong position. Any help is appreciated.

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

    1. Via XML

    <ScrollView android:id="@+id/textAreaScroller" 
        android:layout_width="fill_parent" 
        android:layout_height="173px" 
        android:layout_x="0px" 
        android:layout_y="25px" 
        android:scrollbars="vertical">
    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/fbedittext"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/fbedittext"
        android:layout_marginTop="22dp"
        android:lines="7"        
        android:text="@string/fbtext" />
    </ScrollView>
    

    2.Via Code

    ScrollView scroller = new ScrollView(this);
    TextView tv=(TextView)findViewById(R.id.textView1);
    scroller.addView(tv);
    

    OR

    Putting following properties inside your <TextView>

    android:scrollbars = "vertical"
    

    In the Code

    tv.setMovementMethod(new ScrollingMovementMethod());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reaching a bottleneck on my application and having a tough time finding
I'm without my Java reference book and I'm having a tough time finding an
I've seen a lot of text based Assembly tutorials but finding it tough to
I was having a tough time finding an answer to this on google: I
I'm having a tough time finding some basic information on the accepted way to
I'm having a tough time even finding a point to start debugging this. Basically,
I'm having a hard time finding this out from the documentation. I have some
I am having tough time finding out what CSS property to change to get
I'm having a tough time in finding a solution for following effect. Imagine having
I'm having a tough time finding the difference between the PHP functions posix_getuid and

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.