title: Use Toolbar.OnClickListener instead of ActionBar.TabListener?
body: <p>I am new to android and recently used a android template (Tabbed activity - with ViewPager and fragments) and noticed that the ActionBar and ActionBar.TabListener are deprecated. So I replaced the ActionBar with AppCompatActivity as it is recommended, but Now I am wondering what should I use instead of the TabListener. Can I use onClickListener nested class in the Toolbar class ? </p>
  
  <p>Node: The app works fine with the deprecated interface, but I want to use an interface that is not.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity implements ActionBar.TabListener {
  </code></pre>
  
  <p>This is a screenshot of my app
  <img src="https://i.stack.imgur.com/Bc8AB.png" alt="enter image description here"></p>