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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:19:08+00:00 2026-06-06T17:19:08+00:00

For Example, I have a layout like this: <ScrollView> <LinearLayout> <LinearLayout> … </LinearLayout> <LinearLayout>

  • 0

For Example, I have a layout like this:

<ScrollView>
  <LinearLayout>
    <LinearLayout>
         ...
    </LinearLayout>
    <LinearLayout>
         ...
    </LinearLayout>
    <LinearLayout>
         <TextView>
         </TextView>
    </LinearLayout>
  </LinearLayout>
</ScrollView> 

My TextView have long content. Now I can scroll the ScrollView manually to the end of TextView content. In the code, I write: scrview.scrollTo(0, 800);, with scrview is my ScrollView. It supposed to scroll to the middle of the TextView content. But when running, it only scrolled to the start of the TextView and can’t scroll through the TextView content.

Does anybody know what causing this problems?

EDIT: I found it. Seems like I call scrollTo too soon. Using

scrview.post(new Runnable() {
                public void run() {
                    scrview.scrollTo(0, 800);
                }
            }); 

instead and it works. Posted the answer for anyone getting same problem.

  • 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-06T17:19:10+00:00Added an answer on June 6, 2026 at 5:19 pm

    First of all, if all your LinearLayouts have the same orientation, why you don’t simply create it only once?
    If I’m not wrong, ScrollView can only have 1 child (1 direct child). Maybe that’s probably the reason of your problems.
    However, if you still want those 3 LinearLayouts, you can create a FrameLayout as a parent to hold them and make that FrameLayout the child of the ScrollView

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

Sidebar

Related Questions

For example,I want to make a layout like this: The 'header' can have a
I have a ScrollView layout like this, for example: <ScrollView> <Component1> <Component2> <Component3> <Component4>
If I have a table like this very very simple example: table { table-layout:fixed;
Example: I have a selector like this, which I give to another method as
I have a repository whose layout is like this: trunk/ projectA projectB branches/ projectA-1.0
The spark panel component for example can be written like this <Panel title=Skinny> <child
I have three ListView widgets in the same LinearLayout . Something like this (I'm
I have a custom listView. The main layout xml is something like this: <?xml
Stuck using a table layout like this below with a lot of content in
In my layout xml file I have several buttons like this which share 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.