I am trying to upgrade some code from FragmentActivity to AppCompatActivity and ActionBar to android.support.v7.app.ActionBar due to deprecation. I've spent a few hours trying to fix this, but I am sure someone with more experience might be able to solve this very quickly.
So my class looks like this now:
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
//...many other imports here
public class MyClass extends AppCompatActivity implements ActionBar.TabListener{
@Override
public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
}
//other code here...
}
My problem is that I am getting an error because Android Studio does not recognize the onTabSelected method signature in the superclass. Changing the tab paramenter to simply "Tab tab" instead of "ActionBar.Tab tab" doesn't help either.
Does anybody have any ideas?
Like i said, it is deprecated.
See: http://developer.android.com/intl/en/reference/android/support/v7/app/ActionBar.TabListener.html
And about your problem:
Check this link: ActionBarActivity and ActionBar.TabListener is deprecated inside Android Tab Fragment ( Eclipse ApI 22 )