Created
April 24, 2015 07:07
-
-
Save d9j/0c5bfc1f04374ff9b885 to your computer and use it in GitHub Desktop.
HomeActivity
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
public class HomeActivity extends ActionBarActivity { | |
SlidingTabLayout mSlidingTabLayout; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_home); | |
mSlidingTabLayout = (SlidingTabLayout)findViewById(R.id.sliding_tabs); | |
ViewPager viewPager = (ViewPager) findViewById(R.id.pagerFragments); | |
viewPager.setAdapter(new MyPagerAdapter(getSupportFragmentManager())); | |
mSlidingTabLayout.setViewPager(viewPager); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment