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

  • Home
  • SEARCH
  • 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 3797318
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:23:06+00:00 2026-05-19T13:23:06+00:00

Hi all, I have a activity which have a listview. I need to refine

  • 0

Hi all,

I have a activity which have a listview. I need to refine the listview by people’s inputs.

I have tried to implement it by following the topic http://developer.android.com/guide/topics/search/search-dialog.html. but the problem is that I can only get the default searchbar (which can search contacts or any words in browser) from system after press the search button.

So my question is how to implement a search locally?

Thank you in advance.


In the searchable activity ListActivity:

@Override
public boolean onSearchRequested(){
    Bundle bundle=new Bundle();
    bundle.putString("data", "data");
    startSearch(null, false, bundle, false);
    return true;
}

In the manifest:

<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="DiseaseListActivity"
android:hint="Search Diseases..." 
android:searchMode="showSearchLabelAsBadge"
android:voiceSearchMode="showVoiceSearchButton|launchRecognizer"
android:voiceLanguageModel="free_form"
android:voicePromptText="Please Speak"

/>

The searchable.xml:

<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="DiseaseListActivity"
android:hint="Search Diseases..." 
android:searchMode="showSearchLabelAsBadge"
android:voiceSearchMode="showVoiceSearchButton|launchRecognizer"
android:voiceLanguageModel="free_form"
android:voicePromptText="Please Speak"/>
  • 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-19T13:23:07+00:00Added an answer on May 19, 2026 at 1:23 pm

    Problem solved, in searchable.xml, we cannot use static string, instead, we should use reference like

    android:label="@string/app_name"
    

    Thank you all.

    Chris

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

Sidebar

Related Questions

I have a list activity which display all running applications in the device. it's
I have a need to do auditing all database activity regardless of whether it
I am developing an app in which I need a ListView whose rows have
I have 50 newsletters which all have different email accouts, hex colour codes and
I have a series of tables which I want to all have an order
I have created a bunch of movie clips which all have similar names and
I have an Activity which lets the user input names and the save them.
I am having a problem in searching a ListView. In my activity I have
In my application, I have ListView which is set by my CustomAdapter (i.e. ArrayAdapter).
Hi I have created an activity which pulls data from json format text and

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.