Closed AnotherJack closed 5 years ago
Don't reinvent the wheel
SearchSuggestionsAdapter.OnBindSuggestionCallback { view, leftIcon, textView, item, _ ->
val rightIcon = view?.findViewById<ImageView>(R.id.right_icon) // you have access to it here...
}
you can create in your project layout an new item that is called the same name that the one used in the libs. THis way, it will override the layout provided by your implementation.
example for me : search_suggestion_item.xml
`<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/suggestion_item_background" android:orientation="vertical">
`