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

  • Home
  • SEARCH
  • 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 8375129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:05:38+00:00 2026-06-09T15:05:38+00:00

I am making a layout in which I am using a Scrollview to put

  • 0

I am making a layout in which I am using a Scrollview to put the stuff in the view. But when in the view, I moved the scrollbar down and then moved to next view, the scrollbar remained at the same position, meaning, at the bottom part of the view. I want to make sure that the scrollbar remains at the top of the view always, by default. This is the XML:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_centerHorizontal="true"
    android:orientation="vertical" >

    <ScrollView
            android:id="@+id/scrollView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="90.0dip"
            android:layout_marginLeft="1.0dip"
            android:layout_marginRight="1.0dip"
            android:layout_marginTop="1.0dip"
            android:fadeScrollbars="true"
            android:fadingEdge="none"
            android:fillViewport="true" >

    <FrameLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" >

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:visibility="visible" >

            <ImageView
                android:id="@+id/explain_QuestionImageView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="visible" />


                <TextView
                    android:id="@+id/explain_question"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_below="@id/explain_QuestionImageView"
                    android:fadingEdge="vertical"
                    android:scrollbars="vertical"
                    android:text=""
                    android:textColor="@color/question_text"
                    android:textColorHighlight="@color/question_text1" />

            <TextView
                android:id="@+id/explain_separator"
                android:layout_width="match_parent"
                android:layout_height="5.0dip"
                android:layout_alignParentRight="true"
                android:layout_below="@id/explain_question"
                android:background="@drawable/blue_gradient"
                android:fadingEdge="vertical"
                android:padding="10dp"
                android:scrollbars="vertical"
                android:text="" />

                <TextView
                    android:id="@+id/explain_explaination"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:layout_below="@id/explain_separator"
                    android:fadingEdge="vertical"
                    android:padding="10dp"
                    android:scrollbars="vertical"
                    android:text=""
                    android:textColor="@color/dark_green" />

        </LinearLayout>
        </FrameLayout>
        </ScrollView>
    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
       >

        <com.google.ads.AdView
            android:id="@+id/ad"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:keepScreenOn="true"
            ads:adSize="BANNER"
            ads:adUnitId="a1501e5633125fb"
            ads:loadAdOnCreate="true"
            ads:testDevices="TEST_EMULATOR, 123456789ABCDEF" >
        </com.google.ads.AdView>

        <LinearLayout
            android:id="@+id/LL_Buttons1"
            android:layout_width="fill_parent"
            android:layout_height="40.0dip"
            android:layout_above="@id/ad"
            android:layout_gravity="bottom"
            android:background="#ff777777"
            android:orientation="horizontal" >

            <Button
                android:id="@+id/PrevExplainationButton"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_centerInParent="true"
                android:layout_marginLeft="2.0dip"
                android:layout_weight="1.0"
                android:background="@drawable/ibtn"
                android:onClick="onPrevExplainationButtonClick"
                android:text="Previous" />

            <Button
                android:id="@+id/NextExplainationButton"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_centerInParent="true"
                android:layout_marginLeft="5.0dip"
                android:layout_marginRight="2.0dp"
                android:layout_weight="1.0"
                android:background="@drawable/ibtn"
                android:onClick="onNextExplainationButtonClick"
                android:text="Next" />
        </LinearLayout>
    </RelativeLayout>
</RelativeLayout>

Please tell me how to do that.

  • 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-09T15:05:39+00:00Added an answer on June 9, 2026 at 3:05 pm

    Please tell me how to do that.

    Your question is ambiguous. If the ScrollView remains where you scroll after you go to the next/previous question simply use the the method scrollTo on the ScrollView like this when you switch questions:

    ((ScrollView)findViewById(R.id.scrollView1)).scrollTo(0, 0);
    

    If you go to a new activity and want the ScrollView at the start position then simple place the above line in the onResume method of the Activity.

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

Sidebar

Related Questions

i am making android UI (using Relative Layout)in which, i need to set one
Hi im making a Gui programme using a null layout and a setBounds() method
I'm making a widget for a Yii application. The main layout view registers all
I am making an app in which i am using google map and my
I am making an application in which i am changing the the layout background
I'm making a timeline view in html but I ran into the following problem:
I'm making a web page using CGI scripting which has a form users need
I am making an app in which i am using ViewPAger and my code
I am making listview which data fill by json parsing,I am using Customadapter in
I'm making a fully-flex, percentage based layout. It has a Nav bar on 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.