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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:13:13+00:00 2026-06-15T11:13:13+00:00

I have a large number of strings used in my Android application that are

  • 0

I have a large number of strings used in my Android application that are broken down into three categories: 1 word strings, 2 word strings, 3 word strings. I need to be able to search through these three lists of strings quickly looking for matches to a given key and returning a third value associated to these strings.

For instance if I’m looking for the key "New York" and my list is:

New York, test1
New Jersey, test2
Colorado, test3
Arkansas, test4
New York, test5

A search would return the strings: test1 and test5

What is the best way to store these strings that searching for matches is fastest on an android phone?

The options I thought of so far were: database, xml, csv. Are there any other options and what would be the best choice for this situation?

Edit:
What if I wanted to preserve an order of the items so they could be moved up or down on the list, i know Hashmap is un-ordered. Would an arraylist work?

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

    Why don’t you store them as a Map between key and list of values, and use the inbuilt SQLLite database within Android to persist them permanently there?

    So essentially, instead of your list, you would have:

    New York: [test1, test5]
    New Jersey: test2
    Colorado: test3
    Arkansas: test4
    

    Keeping New York unique, you will get the results much faster. In traditional DB sense, it will be the foreign key to your values.

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

Sidebar

Related Questions

I have a large number of strings that I need to store in a
I have a large number of objects which are identified by names (strings). So,
I have a large number of records (10,000, increasing every day) that essentially is
I have a large number of documents (mainly PDFs) that I want to index
I have a large number of csv files that look like this below: xxxxxxxx
I have a large number of C# WCF services that are being called by
We have a large number of data in many categories with many properties, e.g.
In my Android application I need to read a large amount of data from
I have an IConfig object that contains settings used throughout my application. At the
Basically I have a bunch of large strings that I want to remove spaces/punctuation/numbers

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.