Can't call void android.view.View.setElevation(float) on null object in lapism/SearchView
To fix this problem you have to update your XML file which contains SearchView
and AppBarLayout
. Add android:stateListAnimator="@null"
to your AppBarLayout
as shown below.
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stateListAnimator="@null">
It shows warning that android:stateListAnimator="@null"
attribute stateListAnimator is only used in API level 21. But I've checked source code of the library and it crashes in the SearchBehavior
class when it tries to set mAppBarLayout.setStateListAnimator(null);
EDIT
As was mention in comments below this issue is related more to the android components native crash on scrolling in RecyclerView+CollapsingToolbarLayout