title: Android MenuItemCompat.getActionView is Deprecated
body: <p>I am implementing a SearchView like this:</p>
  <pre><code>    MenuItem search = menu.findItem(R.id.search);
  SearchView searchView = (SearchView) MenuItemCompat.getActionView(search);
  </code></pre>
  <p>But this gives me an inspection report</p>
  <blockquote>
  <p>'getActionView(android.view.MenuItem)' is deprecated</p>
  </blockquote>
  <p>Now in the docs, it is mentioned:</p>
  <blockquote>
  <p>This method was deprecated in API level 26.0.0</p>
  <p>Use getActionView() directly.</p>
  </blockquote>
  <p>So I tried this:</p>
  <pre><code>    MenuItem search = menu.findItem(R.id.search);
      SearchView searchView = (SearchView) getActionView(search);
  </code></pre>
  <p>But it still gives me the deprecated message. So what is the best practice?</p>