android-search

Android Google Voice Search changed language automatically sometimes

耗尽温柔 提交于 2019-12-11 05:37:41
问题 I have successfully added Google Voice Search Activity using following code: Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, "en-US"); try { startActivityForResult(intent, 1); } catch (ActivityNotFoundException a) { Toast t = Toast.makeText(context, "Oops! Your device doesn't support Speech to Text",Toast.LENGTH_SHORT); t.show(); } I searched in "en-US" and its worked perfectly but sometimes it is searching like

Listview filter adapter.getFilter().filter(by more than one value)

亡梦爱人 提交于 2019-12-11 01:03:12
问题 I have created a list view in android and I already implement search filter by using searchview and charsequence as parameter like this searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { @Override public boolean onQueryTextSubmit(String query) { return false; } @Override public boolean onQueryTextChange(String query) { adapter.getFilter().filter(query); return false; } }); now how can I get the filter result by more than one value? adapter.getFilter().filter("example" ||

Content provider query() not being called (Android TV)

…衆ロ難τιáo~ 提交于 2019-12-10 23:44:35
问题 I'm trying to include my app into the Android TV global search, according to the documentation I have to create the following: ContentProvider Searchable.xml And of course include them into the manifest. So that's what I did, my contentprovider is extemely simple. It doesn't return any data, but when it gets the query() call it will print some lines in the log, which it has not done yet. public class VideoContentProvider extends ContentProvider { private static String TAG =

Search view close icon appearing disabled rather than white

99封情书 提交于 2019-12-10 12:53:48
问题 Whenever I type into my search view the close button (X) appears to be disabled for some reason rather than appearing in the colour white. How can this error be resolved so that it appears white? @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.menu_search_list, menu); MenuItem item = menu.findItem(R.id.action_search); SearchView searchView = (SearchView) MenuItemCompat.getActionView(item); searchView.setOnQueryTextListener(this);

android.support.v4.widget.SearchViewCompat example?

[亡魂溺海] 提交于 2019-12-10 01:06:56
问题 I am trying to use SearchViewCompat with ActionBarSherlock in an API 8 app. public boolean onCreateOptionsMenu(Menu menu) { MenuItem item = menu.add("Search") .setIcon(isLight ? R.drawable.ic_search_inverse : R.drawable.ic_search) .setActionView(R.layout.collapsible_edittext); item.setShowAsAction( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW); // To use SearchViewCompat, I need to add it to the Menu item as well: View searchView = SearchViewCompat

Custom SearchView whole clickable in android

烂漫一生 提交于 2019-12-10 00:51:08
问题 I have a SearchView widget in my app, and I want to ask some questions about making it custom. First of all, you can start search only by clicking on search icon, is there any way to make whole SearchView clickable? Also, is there a way to make SearchView appear something like this when it is clicked? It is now in this state: Here is my code: citySearch = (SearchView) findViewById(R.id.city_search_bar); citySearch.setBackgroundResource(R.drawable.search_background); citySearch

How to handle back button of Search View in android

╄→гoц情女王★ 提交于 2019-12-08 15:27:09
问题 I have Develop an application that have search view in action bar and i got issue when i am do search its filter perfectly but when i am press back button its still showing filter data so my question is what is event of back button of Action Bar Search view.? My Code of Search View is SearchView searchView = (SearchView) MenuItemCompat.getActionView(menu.findItem(Menus.SEARCH)); searchView.setQueryHint(this.getString(R.string.search)); editSearch = (EditText) searchView.findViewById(android

How to maintain same DataSource for List,Filter and Search in Android Paging Library

喜夏-厌秋 提交于 2019-12-08 07:45:03
问题 I am having activity that displays list of items and also having filter and search option. I am displaying the items using android paging library. First time the List of items will be loaded its working fine when I am Scrolling to bottom next set of items getting loaded. But I also want to filter the items and Search the items. On Filtering or Searching item I am invalidating the existing source.if am not invalidate the Data Source the filter and Search api is not firing.I want to load list

Elements in Relative Layout showing differently when the app runs

无人久伴 提交于 2019-12-07 18:38:06
问题 I have a ListView created inside a fragment, and it has a search filter, the problem is XML layout showing fine in android studio but when running in the emulator or phone it's showing differently (not properly as I aligned) and also when I click the SearchView it goes under the tab navigation. Can anyone tell how to fix this? This is the fragment: import android.content.Context; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View;

Android Search Interface not submitting query

会有一股神秘感。 提交于 2019-12-07 16:11:57
问题 I've implemented a Search Interface (the Search Widget) by following the official tutorial for Search Interface closely. It all looks good but I can't submit the search query. When I click the "Send" button on the keyboard nothing happens. Here is what I did: AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="18" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android