3

We are getting crash reports in play store about an inflate exception with the androidx.appcompat.widget.SearchView, in the OnCreateView method where we inflate the layout this way.

val binding = DataBindingUtil.inflate(inflater, R.layout.layout_class_groups, container, false)

The SearchView implementation in the xml is as follows.

   <androidx.appcompat.widget.SearchView
            android:id="@+id/classGroupsSearchView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/white"
            android:theme="@style/SearchViewStyle"
            app:iconifiedByDefault="false" />

I have used custom style for the SearchView as well.

<style name="SearchViewStyle" parent="Widget.AppCompat.Light.SearchView">
    <item name="android:textSize">16sp</item>
</style>

We are unable to replicate this crash while testing, so how do i fix it?

Jai
  • 217
  • 1
  • 4
  • 15

0 Answers0