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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:42:18+00:00 2026-05-24T22:42:18+00:00

I have used given tutorial on the androids guide and done what all is

  • 0

I have used given tutorial on the androids guide and done what all is needed still after pressing search button on device or menu item. its doesn’t open up the search dialog.
I got tutorial from here http://developer.android.com/guide/topics/search/search-dialog.html

I must post my sample codes here so you guys can look into it and help if possible so i can know where I’m going wrong.
Activity in which dialog should appear

<activity android:name=".testAndroid"
                  android:theme="@android:style/Theme.NoTitleBar">
                  <meta-data android:name="android.app.default_searchable"
                   android:value="com.tester.android.Search" />
        </activity>

Activity which returns results for search

<activity android:name=".Search" android:label="Search">
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="android.app.searchable" android:resource="@xml/searchable"/>
        </activity>

my searchable file in res/xml folder

<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
    android:label="XYZ.com"
    android:hint="Search XYZ.com" >
</searchable>

Activity which shows results

public class Search extends ListActivity {

    private Vector<?> loadedArticles;

    @Override
    protected void onCreate(Bundle icicle) {
        super.onCreate(icicle);

        setContentView(R.layout.articles);
        Intent intent = getIntent();
        String query="";
        if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
            query = intent.getStringExtra(SearchManager.QUERY);
        }

        boolean articlesLoaded = findArticles(query); // it shows results and renders it.

    }
}

Can someone help me please, Why I can’t see search dialog after pressing search hardware button.

  • 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-24T22:42:19+00:00Added an answer on May 24, 2026 at 10:42 pm

    Finally I myself found the solution to the problem

    <searchable xmlns:android="http://schemas.android.com/apk/res/android"
        android:label="XYZ.com"
        android:hint="Search XYZ.com" >
    </searchable>
    

    Here I have used lablel and hint as direct string. Instead we need to use, @string/label
    I mean our string should be in strings.xml and then use them.
    This is bug in Android.

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

Sidebar

Related Questions

I have used a code given in tutorial http://mylifewithandroid.blogspot.com/2010/12/expandable-list-and-checkboxes.html I have attached an image
I have used the crypt function in c to encrypt the given string. I
I have used the tutorial on here but for some reason it didn't work.
I have the following regular expression which is used to give me the tags
What would a developer used to working in Visual Studio have to give up
I have a variable $link_item , it's used with echo and gives the strings
I have used traditional version control systems to maintain source code repositories on past
I have used IPC in Win32 code a while ago - critical sections, events,
I have used the XML Parser before, and even though it worked OK, I
I have used Photoshop CS2's Save for Web feature to create a table of

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.