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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:17:06+00:00 2026-05-27T06:17:06+00:00

I have a activity in Android TextView followed ListView again TextView. The content of

  • 0

I have a activity in Android TextView followed ListView again TextView. The content of first TextView fills the whole screen and in order to see the ListView and second TextView the user has to scrolldown. Now I wish to show the second TextView when activity start instead of first TextView.

TextView1 when activity starts

when user scrolldown ListView and TextView2 are visible

Instead I want TextView2 to be visible when activity starts.

EDITED

Sample code as per advice of @Urban

public class FocusTestActivity extends Activity {
private static final String TAG = "FocusTestActivity";
ScrollView scroll;
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    TextView text1 = (TextView) findViewById(R.id.text1);
    TextView text2 = (TextView) findViewById(R.id.text2);
    TextView text3 = (TextView) findViewById(R.id.text3);
    String hello = "We provide services to K-12 education sector."
            + "Our services include Feasibility report, Marketing, Curriculum design"
            + "Teachers planning, Design and Technology, Parents expectation"
            + "management, Transport planning, Day-to-day operations and Statutory"
            + "compliances. Please find a brief introduction attached with mail. Also visit"
            + "www.wissenways.com We can help you with overall process of setting-up school. We have"
            + "experience include establishing International, pre-school and CBSE"
            + "schools from scratch. Please feel free to contact if you need some help in your school venture."
            + "Best of Luck!<br/><br/>";

    text1.setText(Html.fromHtml(hello));
    text2.setText(Html.fromHtml(hello));
    text3.setText(Html.fromHtml(hello));
    ScrollView scroll = (ScrollView) findViewById(R.id.scrollcontainer);
}

public void onStart() {
    super.onStart();
    Log.d(TAG,"Inside onStart");
    scroll.post(new Runnable() {

        @Override
        public void run() {
            scroll.fullScroll(ScrollView.FOCUS_DOWN);
        }
    });
}

}

XML Code

<?xml version="1.0" encoding="utf-8"?>
<ScrollView
   xmlns:android="http://schemas.android.com/apk/res/android"
   android:id="@+id/scrollcontainer"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent">
   <LinearLayout android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<TextView  
    android:id="@+id/text1"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    android:textSize="17sp"/>
<TextView  
    android:id="@+id/text2"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    android:textSize="17sp"/>
<TextView  
    android:id="@+id/text3"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    android:textSize="17sp"/>
</LinearLayout>
</ScrollView>

LOGCAT output:

LogCat Output

another LogCat OutPut

  • 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-05-27T06:17:06+00:00Added an answer on May 27, 2026 at 6:17 am
    getScrollView().post(new Runnable() {
    
        @Override
        public void run() {
            getScrollView().fullScroll(ScrollView.FOCUS_DOWN);
        }
    });
    

    Using this code in the onCreate should start the scrollview (in which your list and two text views are) at the bottom position. I dont know why you would want to do that, and im guessing there could be a better way to do what you want rather than forcing the scroll position to the bottom, but anyways…
    This is the question from where the above code is taken from, you couldve searched for it.

    Hope this helped.

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

Sidebar

Related Questions

I have a login screen in the first activity of my android application. When
I have an Activity in Android, with two elements: EditText ListView When my Activity
I have a layout for an Android activity in which the second button is
I am new to Android development. I have created an Activity with the ListView
I have developed a basic UI activity page in android with a TextView and
I have this activity, package org.dewsworld.ui; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class
I have an activity which contains 2 textviews and an imageview. First textview contains
I'm writing my first Android application and I have one activity that I'd like
I have Activity A with android:launchMode=singleTop in the manifest. If I go to Activity
So I have a very simple android activity that starts a timer when you

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.