Category : searchview

I have a working searchview in a fragment and decided to add voice to it. I followed the guide and created a separate activity to hold the result. This all works fine with the code private fun handleIntent(intent: Intent) { if (Intent.ACTION_SEARCH == intent.action) { intent.getStringExtra(SearchManager.QUERY)?.also { query -> // blahh blahh `blahhh` } } ..

Read more

I want to filter recycle View by using search View which under the fragment and fragment is under the view pager, i try this but my search view not filtering the data i don’t know what I done wrong and where and here is my search_option under menu <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item ..

Read more

Based on the fact that Cloud Firestore does not support Full-Text Search to date, I decided to ask this question some time ago. Inspired by this write-up by Alex Mamo I was able to simulate a full-text search scenario on Cloud Firestore by implementation the following from the write-up. Now my question is: How can ..

Read more

i get really confused, why my search bar is not automatically displaying the result, it will display the result after im turn off the screen and turn it back on. screenshot here’s my code : @Override protected void onStart() { super.onStart(); adapter.startListening(); } @Override protected void onStop() { super.onStop(); } @Override protected void onCreate(Bundle savedInstanceState) ..

Read more

This is my theme: <style name="Theme.Cinemates" parent="Theme.AppCompat.NoActionBar"> <item name="colorPrimary">@color/yellow</item> <item name="colorPrimaryVariant">@color/black</item> <item name="colorOnPrimarySurface">@color/black</item> <item name="colorSecondary">@color/teal_200</item> <item name="colorSecondaryVariant">@color/teal_700</item> <item name="colorOnSecondary">@color/black</item> <item name="android:textColor">@color/black</item> <item name="editTextColor">@color/black</item> <item name="hintTextColor">@color/black</item> <item name="iconTint">@color/black</item> <item name="android:actionMenuTextColor">@color/black</item> </style> This is my toolbar: <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" app:logo="@drawable/clapboard" app:titleTextColor="@color/black" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" app:titleMarginStart="35dp"/> This is my menu: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/ricerca_film" ..

Read more

I want the length of searchview to occupy full width of action bar when clicked but instead it shows the others items as well. This is xml file of the view <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/action_settings" android:title="Settings" app:showAsAction="never"/> <item android:id="@+id/about" android:title="About" app:showAsAction="never" /> <item android:id="@+id/edit" android:icon="@drawable/ic_baseline_sort_24" app:showAsAction="always" android:title="Edit"/> <item android:id="@+id/search" android:title="search_title" android:icon="@drawable/ic_search" app:showAsAction="always|collapseActionView" app:actionViewClass="androidx.appcompat.widget.SearchView" /> ..

Read more

I implemented RxJava/RxBinding in the SearchView that I created. here is the code val queryStream = RxSearchView.queryTextChanges(searchView) .observeOn(AndroidSchedulers.mainThread()) .debounce(400, TimeUnit.MILLISECONDS) queryStream.subscribe({ if (it.isNotEmpty()) { Log.e("queryStream", "ini querynya ${it}") getSearchUser(it.toString()) } }, { // Exception Log.e("Exception", "${it.message}") }) and here is the code for getSearchUser() function private fun getSearchUser(q: String) { viewModel.getSearchUser(q).observe(this, { user -> if ..

Read more