Last active
December 16, 2015 15:59
-
-
Save Broich/5459814 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyTabsListener implements ActionBar.TabListener { | |
private Fragment fragment; | |
public MyTabsListener(Fragment fragment) { | |
this.fragment = fragment; | |
} | |
@Override | |
public void onTabSelected(Tab tab, FragmentTransaction ft) { | |
ft.replace(android.R.id.content, this.fragment); | |
} | |
@Override | |
public void onTabUnselected(Tab tab, FragmentTransaction ft) { | |
} | |
@Override | |
public void onTabReselected(Tab tab, FragmentTransaction ft) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment