0
In the application has Toolbar and 2 tabs through the Tablayout with 1 fragment in each tab.
I want to put the Materialsearchview library to implement the searchview that will be done by searching the recyclerview items that is in TAB Phones .
But I put Materialsearchview in activity_main.xml
<com.mancj.materialsearchbar.MaterialSearchBar
style="@style/MaterialSearchBarLight"
app:mt_speechMode="false"
app:mt_hint="Pesquisar telefones"
app:mt_maxSuggestionsCount="10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/searchBar" />
When I try to use Materialsearchbar for the null point Exception fragment.
I have to put Materialsearchbar in the xml of Fragment or have some way to use in Activity xml?