android-search

Android Google Search Bar with Drawer

眉间皱痕 提交于 2021-01-28 19:39:47
问题 My app is currently implemented with the Single activity approach (Using navigation architecture component with one main activity and several fragments). I am currently using a toolbar with a drawer. My app currently look like this: However in the modern google apps (Google photos, gmail etc..), Google has implemented a new way of navigating using a search field with an implemented drawer in it as shown below: I want to replace this toolbar with a search bar and the drawer menu exactly like

Android keyboard not appearing, even when explicitly requested

笑着哭i 提交于 2020-02-25 04:27:06
问题 I have an app with two activities, and sometimes, I need to switch activity and at the same time open up the search input in the actionbar of the activity that's just been resumed. Everything works fine, except that I can't get the keyboard to come up. The relevant bits of my code are below (NB: the boolean startsearch is set true as a result of switching activities if the search input is required): public class MyActivity extends Activity { private InputMethodManager imm; public boolean

How to stop Incessant crash on search filter in Android recyclerview

∥☆過路亽.° 提交于 2020-02-09 17:20:29
问题 I have been struggling to stop an index out of bounds exception crash every single time I do a search in a searchview. I tried a couple of things listed online : on search getting array out of index bound exception https://www.codeproject.com/Questions/1040119/Android-app-is-crashing-with-Index-out-of-range-is but nothing helped so far. The issue is something specific to my code, just can't figure out what's the issue. Here's my crash report: E/AndroidRuntime: FATAL EXCEPTION: main Process:

Listview filtering not working - Android

自古美人都是妖i 提交于 2020-01-25 21:10:35
问题 I am tying to implement search functionality in my app. I am using a custom ArrayAdapter<String> for the listview as I have two textViews in a row. My app doesn't force close but the search is not working properly. It is not filtering the listview but when I type something that is not there in the listview, it shows the no item found page properly. What could be wrong? Here is the code. Please guide me to the correct path! MainActivity.java public class MainActivity extends Activity { final

How to display searchview close icon when expanded in android?

大憨熊 提交于 2020-01-03 03:44:08
问题 I have an imageView. When i click image, i am hidding image and enabling searchview in expanded. But problem is close icon is not visible. How to make close icon visible when searchview in expanded form? Here is my piece of code: public class HomeActivity extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); search = (SearchView) findViewById(R.id.search); searchImage=(ImageView)

Android SearchView customisation

空扰寡人 提交于 2020-01-01 10:30:49
问题 im new to android and i got stucked on something that i think it's simple but i got confused.. I need to make a custom searchView not in the actionbar/toolbar but in my Relativelayout. The problem is that i don't know hot to customise the background , textinput color , the search icon color in XML , or just the attributes of them . At the moment im on my phone and can't show my code . Does anyone tell me how i can customise it ? Maybe showing me any tutorial i can follow ? Thanks in advance !

Is global search in android still available for developer?

青春壹個敷衍的年華 提交于 2019-12-29 08:07:49
问题 I'm stuck for adding global search to my app. I did everything that I should do. my question is is global search is still available for developer? I read somewhere that Google replaced it with index. Thank you for your time and help 回答1: While global search (via the searchable.xml includeInGlobalSearch attribute) is available as part of Making Android TV Apps Searchable, the current Google Search app on phones and tablets does not support global search. As you mentioned, Google now strongly

how do I highlight the searched text in my search filter?

时光毁灭记忆、已成空白 提交于 2019-12-28 13:26:50
问题 I am trying to do a search such that all the "visible" search letters should be highlighted. I tried using spannable but that didn't do the trick, maybe I wasnt doing it right? based on this: Highlight searched text in ListView items How do i get to highlight the visible text? here's my filter : private LayoutInflater mInflater; private ValueFilter valueFilter; public MySimpleArrayAdapter(Activity context) { this.context = context; mInflater = LayoutInflater.from(context); } private class

How to programmatically initiate a Google Now voice search?

懵懂的女人 提交于 2019-12-28 11:45:10
问题 I want to start a Google Now voice search when the user presses a button. However, I can't find the Intent to start the search in the docs. Does anybody know how to start activity for Google Now voice Search ? 回答1: Use ACTION_RECOGNIZE_SPEECH: private static final int RECOGNIZER_REQ_CODE = 1234; Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); startActivityForResult(intent, RECOGNIZER_REQ_CODE); Please note that you have to use startActivityForResult() as startActivity()

Android Search not returning results after suggestion chosen

我们两清 提交于 2019-12-25 15:57:21
问题 I have a simple application that just uses the hardware search key to search my database via my content provider. After getting the results from the Suggestions and clicking on one of the choices the listview screen appears and it's blank. I get an error: E/InputQueue-JNI(1137): channel '4150a5d0 PopupWindow:412ccf98 (client)' ~ Publisher closed input channel or an error occurred. events=0x8 I'm new to android development, I did some research, but can't figure out what this even means. Here's