1. Download our Official Android App: Forums for Android!

Apps showing cursor data in a listview

Discussion in 'Android Development' started by kitty, Feb 4, 2010.

  1. kitty

    kitty Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    3
    Joined:
    Jan 22, 2010

    Jan 22, 2010
    3
    0
    5
    I have a SQLite database with two tables- BOOK and AUTHOR. I execute a
    query on the DB that uses a join and results in a cursor that looks
    like this:
    _id | book | author
    ===================
    0 book A JAME
    1 book B JAME
    2 book C CHRIS
    3 book D JAME
    4 book N JILL
    5 book K JILL
    Now, I want to show this data in a ListView where each author has a
    subheading row prior to listing their books:
    ===================
    JAME
    ===================
    [ ] book A
    [ ] book B
    [ ] book D
    ===================
    CHRIS
    ===================
    [ ] book C
    ===================
    JILL
    ===================
    [ ] book N
    [ ] book K

    is it possible to do it. Please help me

    Thanks in advance
     

    Advertisement

Share This Page

Loading...