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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:42:30+00:00 2026-06-03T03:42:30+00:00

I have a layout that uses a scroll view. The first part of the

  • 0

I have a layout that uses a scroll view. The first part of the text in the scroll view is cut off in the emulator and on an HTC phone the scroll view scrolls way past the end of the text and it takes a lot of scrolling to get back to the text.

Eclipse complains that “This ScrollView layout or its LinearLayout parent is useless” and I suspect that this message is the main culprit for my woes but am happy to be corrected

The layout

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    style="@style/Container"
    android:id="@+id/about">
        <ScrollView style="@style/Content">
                <TextView style="@style/Content"
                    android:id="@+id/about_content"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/about_text" />
        </ScrollView>
</LinearLayout>

The styles

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="MainTheme">
        <item name="android:textColor">@color/txtColor</item>
    </style>
    <style name="ApplicationTheme" parent="android:Theme">
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_width">wrap_content</item>
        <item name="android:colorBackground">@color/mnuColor</item>
        <item name="android:textColor">@color/txtColor</item>
    </style>
    <style name="Container" parent="ApplicationTheme">
        <item name="android:textColor">@color/txtColor</item>
        <item name="android:layout_height">fill_parent</item>
        <item name="android:layout_width">fill_parent</item>
        <item name="android:colorBackground">@color/mnuColor</item>
    </style>
    <style name="Webview" parent="Container">
        <item name="android:background">@drawable/web_background_image</item>
        <item name="android:windowBackground">@drawable/background_image</item>
        <item name="android:colorBackground">@color/mnuColor</item>
    </style>
    <style name="MyPlaceDialog" parent="@android:style/Theme.Dialog">
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_width">fill_parent</item>
        <item name="android:orientation">vertical</item>
        <item name="android:stretchColumns">*</item>   
    </style>
    <style name="Content">
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_width">fill_parent</item>
        <item name="android:layout_gravity">center</item>
    </style>

    <style name="button" parent="@android:style/Widget.Button">
        <item name="android:background">@drawable/button</item>
        <item name="android:layout_marginTop">2dp</item>
        <item name="android:layout_marginBottom">3dp</item>
        <item name="android:layout_marginLeft">4dp</item>
        <item name="android:layout_marginRight">4dp</item>
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
    </style>    
</resources>

Androids documentation is utterly appallingly useless in helping to explain why a layout might be useless and eclipse is no better so any ideas on what I need to do to fix this problem are greatly 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-03T03:42:31+00:00Added an answer on June 3, 2026 at 3:42 am

    Your linear layout is housing only a single view. Because of this, your LinearLayout can be eliminated and the ScrollView can be made the root element for your layout.

    <?xml version="1.0" encoding="utf-8"?>
    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" style="@style/Content">
        <TextView style="@style/Content"
           android:id="@+id/about_content"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="@string/about_text" />
    </ScrollView>
    

    Note that lint isn’t always 100% accurate. While its correct that you can remove the view, its not always something you desire or need to do.

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

Sidebar

Related Questions

I have this layout that works correctly, a relative layout with a text view
I have a layout that uses navigation with two lines of text. These are
I have a ListView that uses a custom layout that has 5 child View
I have layout page and the page that uses layout. How can I add
The scenario is the following: I have an activity RunTrainingWorkoutsView that uses XML layout
I have a site layout that uses floats to achieve the desired columns/rows. On
I have a layout that uses an EditText to let users search a database
I have an Android App that uses a TabHost layout. Every tab calls the
Hey guys, I have a listactivity that uses a custom row layout. The layout
I have a form panel that uses a table layout to display a form.

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.