This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener { | |
override fun onQueryTextChange(newText: String): Boolean { | |
adapter.filter.filter(newText) | |
return false | |
} | |
override fun onQueryTextSubmit(query: String): Boolean { | |
return false | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<androidx.recyclerview.widget.RecyclerView | |
android:id="@+id/recyclerview" | |
android:layout_width="0dp" | |
android:layout_height="0dp" | |
------ | |
android:layout_marginBottom="40dp" | |
android:clipToPadding="false" | |
------ | |
android:paddingBottom="56dp" | |
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val layoutManager = FlexboxLayoutManager(this) | |
layoutManager.flexDirection = FlexDirection.ROW | |
layoutManager.justifyContent = JustifyContent.FLEX_START | |
recyclerview.layoutManager = layoutManager | |
//TODO TO KNOW MORE ABOUT FLEXBOX CHECK https://github.com/google/flexbox-layout |