-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting CustomSuggestionAdapter #152
Comments
I managed to get it working using the following code. Still not quite sure why, if anyone could explain that would be very helpful.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I am trying to define a customsuggestionadapter using the method MaterialSearchBar.setCustomSuggestionAdapter
searchBar.setCustomSuggestionAdapter(suggestionsAdapter)
I am trying to implement my own callbacklisteners for the custom suggestion adapter which implements com.mancj.materialsearchbar.adapter.SuggestionsAdapter
suggestionsAdapter = DefaultSuggestionsAdapter(LayoutInflater.from(context)) .setListener(object: SuggestionsAdapter.OnItemViewClickListener{ override fun OnItemClickListener(position: Int, v: View?) { TODO("Not yet implemented") } override fun OnItemDeleteListener(position: Int, v: View?) { TODO("Not yet implemented") } })
When I do this however I get an error saying Type mismatch: inferred type is Unit but SuggestionsAdapter<*, *>? was expected
I'm somewhat new to Android programming, so I suspect I'm missing something simple. What could be a good way to fix this?
The text was updated successfully, but these errors were encountered: