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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:22:19+00:00 2026-06-05T05:22:19+00:00

I am having problem with my listview, the data is perfectly working but when

  • 0

I am having problem with my listview, the data is perfectly working but when im scrolling it down the title keeps repeating but the content when i click it is working.

this is the image in the emulator.

enter image description here

this is the data in my database

here is the code I use in the listview

dataset_cursor = helper.getBooksByTitle2();   
startManagingCursor(dataset_cursor);        
adapter = new ContentAdapter(dataset_cursor);
list.setAdapter(adapter);`

class ContentAdapter extends CursorAdapter{
    ContentAdapter(Cursor c)
    {
        super(LEGALe.this, c);
    }
    public void bindView(View row, Context ctxt, Cursor c)
    {
        ContentHolder holder = (ContentHolder)row.getTag();
        holder.populateFrom(c, helper);
    }
    public View newView (Context ctxt, Cursor c, ViewGroup parent)
    {
        LayoutInflater inflater = getLayoutInflater();
        View row = inflater.inflate(R.layout.row2, parent, false);
        ContentHolder holder = new ContentHolder(row);
        row.setTag(holder);
        return(row);
    }
}

public Cursor getBooksByTitle2()
{
    return (getReadableDatabase().rawQuery("SELECT _id,table_of_content FROM tblContent WHERE title_id='"+ LEGALe.passedVar.toString() +"' ORDER BY table_of_content" , null));
}
  • 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-05T05:22:20+00:00Added an answer on June 5, 2026 at 5:22 am

    It has something to do with view item’s recycling. I think you are not managing getView correctly.

    However, my suggestion is to set your title as a view in list’s header using addHeaderView.
    Or, perhaps take it totally out from ListView (so it is constantly visible) and set separately as TextView above of your ListView.

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

Sidebar

Related Questions

I am having a listview inside a scrollview , but the problem is that
I'm having a very strange problem with my custom listview. This Listview shows a
I've been having a lot of trouble with this problem. I have a listview
All, The problem I am having is that I created a ListView and set
I'm having problem selecting an element with an id like this <li =0f:Bactidol_Recorder.mp4>. I
Hi I'm having problem refreshing my listview after Async operation. I have a simplecursoradapter,
I am having a problem in searching a ListView. In my activity I have
I have a listview and also a DataGrid having records with images. My problem
I'm working in Jquery Mobile and I'm having problems refreshing the listview after Ajax
I'm having the following problem: I have a ListActivity, its ListView is composed by

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.