title: SearchView that shows items related to the search term
body: <p>How can I have a search function in android that will show items similar to what the user typed in? For example:</p>
  <p>I have the items Distance, Tax, and Color.
  If the user types Kilometer, Mi, or distance, show &quot;distance&quot;;
  If the user types Tax, Money, or Bill, show &quot;tax&quot;;
  If the user types HEX, RGB, or Color, show &quot;color&quot;</p>
  <p>For now, I have this:</p>
  <pre class="lang-kotlin prettyprint-override"><code>val applets = arrayOf(&quot;distance&quot;,&quot;tax&quot;,&quot;color&quot;)
  val conversionsLength = this.resources.getStringArray(R.array.conversionsLength)
  
  val appletAdapter : ArrayAdapter&lt;String&gt; = ArrayAdapter(this, android.R.layout.simple_list_item_1, applets)
  
  binding.appletList.adapter = appletAdapter
  binding.searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener {
      override fun onQueryTextSubmit(query: String): Boolean { binding.searchView.clearFocus(); return false }
      
      override fun onQueryTextChange(newText: String): Boolean {
          if (applets.joinToString(&quot;\n&quot;).contains(newText))
          {
              appletAdapter.filter.filter(newText)
          }
          if (conversionsLength.joinToString(&quot;\n&quot;).contains(newText))
          {
              //TODO appletAdapter.add(&quot;distance&quot;) didn't work
          }
          else appletAdapter.filter.filter(applets.joinToString(&quot;\n&quot;))
          return false
      }
  })
  </code></pre>
  <p>What can I do in <code>//TODO</code> to so that apart from the items that were filtered with the first <code>contains()</code>, it <em>also</em> shows the string I want it to show</p>