title: TabsListener not working as it should be
body: <p><strong>I am new to Android so please explain in detail</strong></p>
  
  <p>I want to build a basic Android app which uses Tabs. 
  I have built a TabListener.</p>
  
  <p>But it is showing me an error. How can i fix it?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>package com.adhish.tabs1;
  
  import android.annotation.SuppressLint;
  import android.app.Fragment;
  import android.app.FragmentTransaction;
  import android.support.v7.app.ActionBar.TabListener;
  import android.support.v7.app.ActionBar.Tab;
  import android.widget.Toast;
  
  @SuppressLint("NewApi")
  public class MyTabsListener implements TabListener {
  
  public Fragment fragment;
  
  //Create fragment for Activity
  public MyTabsListener(Fragment fragment)
  {
      this.fragment = fragment;
  }
  
  public void onTabReselected(Tab tab, FragmentTransaction transaction)
  {
      Toast.makeText(ActionBarImpl.myContext, "You have clicked again !", Toast.LENGTH_SHORT).show();
  }
  
  public void onTabSelected(Tab tab, FragmentTransaction transaction)
  {
      transaction.replace(R.id.actionbar, fragment);
  }
  
  public void onTabUnselected(Tab tab, FragmentTransaction transaction)
  {
      transaction.remove(fragment);
  }
  }
  </code></pre>
  
  <p>The error is in the declaration of this class:</p>
  
  <pre><code>Class MyTabsListener must be declared either Abstract or implement Abstract method
  'onTabSelected(Tab, FragmentTransaction)' in 'TabListener'.
  </code></pre>
  
  <p>Please help me to workaround this issue.</p>