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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:11:51+00:00 2026-06-14T11:11:51+00:00

I am creating an Android app to help actors rehearse from a script. The

  • 0

I am creating an Android app to help actors rehearse from a script. The user can select a character from the script to rehearse as. The script will then be shown to the user up until his selected character’s first line. When the user decides to proceed, their current line will appear, as well as the rest of the script up to their next line. The user can proceed again and so on.

I have the whole play stored in an SQLite database and I populate custom ListViews by executing queries on the database.

My question is how can we execute a query on the database, but stop returning items once we have found a certain item (e.g. the character’s name)? I store the results into a Cursor then populate the ListView with the following method:

    private void fillData() {

    mFrom = new String[] { PlayDbAdapter.KEY_CHARACTER,
            PlayDbAdapter.KEY_LINE };
    mTo = new int[] { R.id.textCharacter, R.id.textLine };

    // Now create an array adapter and set it to display using our row
    SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
            R.layout.play_list_layout, mCursor, mFrom, mTo);

    setListAdapter(adapter);
}

If you require anymore information or code, please let me know.

Thank you!

  • 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-14T11:11:52+00:00Added an answer on June 14, 2026 at 11:11 am

    It’s far more efficient to return chunks of the script in a Cursor and then search the Cursor for the actor’s first line.

    Another way to do it would be to return line “context” for a character. Have the database store an index into the lines. Return a Cursor containing only the character’s lines, then do a second query that returns 10 lines before and after the character’s lines.

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

Sidebar

Related Questions

I'm creating an Android app utilising OpenGL ES, and need some help with the
I am working on an Android app that has multiple screens the user will
I am creating an Android app that will download and cache PDF files (the
I am creating an app for android which will be used by gym members.
Steps: User starts app from Android Market application User clicks Start child stack: ActivityMain
In my Android app I'm creating new WebViews from Java code; however after I
I'm creating an Android app which must do some web surfing in the background
I am creating an android app myself (min sdk version 7 or 2.1 and
I am creating an Android app based on The Legend of Zelda, I wanted
so here is the problem. I am currently creating an Android app that is

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.