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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:55:56+00:00 2026-05-27T14:55:56+00:00

I want to be able to scroll through a list using my finger on

  • 0

I want to be able to scroll through a list using my finger on the screen, but right now I need to use the track ball at the bottom of the phone. Is there something that I need to implement or something that I am doing wrong? Here is my XML with the ScrollView:

<ScrollView android:layout_height="250dip"
    android:layout_width="fill_parent">
    <LinearLayout android:layout_height="fill_parent"
        android:layout_width="fill_parent" android:orientation="vertical"
        android:id="@+id/linearLayout1">
        <ListView android:layout_width="fill_parent" android:id="@+id/android:list"
            android:layout_height="250dip"></ListView>
            <TextView android:id="@+id/android:empty"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/no_user_names" />
    </LinearLayout>
</ScrollView>

And below is from my class:

The list is populated using this method:

private void populateList(){
String[] projection = new String[]{NameProviderMetaData.NameTableMetaData._ID,      NameProviderMetaData.NameTableMetaData.NAME};
Cursor c = managedQuery(NAMES_URI,projection,null,null,NameProviderMetaData.NameTableMetaData.NAME);
String[] cols = new String[] {NameProviderMetaData.NameTableMetaData.NAME};
int[] views = new int[] {android.R.id.text1};
adapter = new     SimpleCursorAdapter(this,android.R.layout.simple_list_item_1,c,cols,views);
setListAdapter(adapter);
}

I have an onTouchEvent method elsewhere in the class:

@Override
public boolean onTouchEvent(MotionEvent event) {
    if (mGestureDetector.onTouchEvent(event))
    return true;
    else
return false;
}
  • 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-27T14:55:56+00:00Added an answer on May 27, 2026 at 2:55 pm

    You cannot use a ListView inside a ScrollView (any two views that have same orientation scrolling). You should reconsider your layout!

    You could do this for example:

    <LinearLayout android:orientation="vertical" android:layout_height="fill_parent"
        android:layout_width="fill_parent">
            <ListView android:layout_width="fill_parent" android:id="@+id/android:list"
                android:layout_height="250dip" android:background="@null"
            android:cacheColorHint="@android:color/transparent"></ListView>
            <TextView android:id="@+id/android:empty"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/no_user_names" />
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a site using jquery lazyload its working fine, but now i want
I'm using LaTeX and BibTeX for an article, and I want to able to
I have a custom UITableView header which I want to be able to scroll
I want to hide scrollbar to appear on a long div,but still able to
i want to be able to scroll around a gallery of images by clicking
I want user to be able to scroll in a div to see all
Want to be able to provide a search interface for a collection of objects
I want to be able to capture the exception that is thrown when a
I want to be able to do: For Each thing In things End For
I want to be able to play sound files in my program. Where should

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.