title: Filter for SearchView in Kotlin
body: <p><strong>Android environment</strong> <br><br>
  <strong>kotlin_version</strong> = '1.3.20' <br>
  <strong>compileSdkVersion</strong> 28</p>
  
  <p>I have an <strong>adapter</strong> of type <strong>ArrayAdapter&lt;String></strong> which is represented as <strong>ListView</strong> in the app activity. How to get the filter for SearchView to work?</p>
  
  <p><strong>Activity.xml</strong> <br></p>
  
  <pre><code>&lt;android.support.v7.widget.SearchView
          android:id="@+id/searchView"&gt;
          ...
  
  &lt;/android.support.v7.widget.SearchView&gt;
  
  
  &lt;ListView
          android:id="@+id/listView"
          ...
   /&gt;
  </code></pre>
  
  <p><strong>Activity.kt</strong> <br></p>
  
  <pre><code>   ...
  
           searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener {
  
                      override fun onQueryTextChange(newText: String): Boolean {
  
                          adapter.filter.filter(newText)
  
                          return true
                      }
  
                      override fun onQueryTextSubmit(query: String): Boolean {
                          // task HERE
                          return false
                      }
  
                  })
  
      ...
  </code></pre>
  
  <p>So the <strong>setOnQueryTextListener</strong>() is working and even the <strong>adapter</strong> is working properly, but I'm unable to get the filter working.</p>