title: Kotlin: how to get searchView submit
body: <p>I have a <a href="https://developer.android.com/reference/android/widget/SearchView" rel="nofollow noreferrer">SearchView</a>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;SearchView
      android:id="@+id/searchBar"
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:visibility="visible"/&gt;
  </code></pre>
  
  <p>I want to add a custom action when the submit button is pressed.</p>
  
  <p>This is what I have so far:</p>
  
  <pre class="lang-kotlin prettyprint-override"><code>searchBar.setOnSearchClickListener {
    //do some stuff
  }
  </code></pre>
  
  <p>All the information I found is old and not in kotlin.</p>
  
  <p>How can I get trigger an action when the search icon on the keyboard is tapped?</p>