コード例 #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.yaya_main_aty);

    ym_toolbar = (Toolbar) findViewById(R.id.ym_toolbar);
    initTitle(ym_toolbar);

    setUpDrawerToggle();

    //        yaya_main_rv = (RecyclerView) findViewById(R.id.yaya_main_rv);
    //        YaYaMainRecyclerAdapter adapter = new YaYaMainRecyclerAdapter();
    //        yaya_main_rv.setAdapter(adapter);
    //        yaya_main_rv.setLayoutManager(new LinearLayoutManager(this));

    ym_view_pager = (ViewPager) findViewById(R.id.ym_viewpager);

    YMPagerAdapter pagerAdapter = new YMPagerAdapter(getSupportFragmentManager());
    pagerAdapter.addFragment(new YaYaTravelNoteFg(), "游记");
    pagerAdapter.addFragment(new YaYaTravelNoteFg(), "音乐");
    pagerAdapter.addFragment(new YaYaTravelNoteFg(), "英语");
    ym_view_pager.setAdapter(pagerAdapter);
    ym_tablayout = (TabLayout) findViewById(R.id.ym_tablayout);
    ym_tablayout.setupWithViewPager(ym_view_pager);
  }
コード例 #2
0
 @Override
 protected void onResume() {
   super.onResume();
 }
コード例 #3
0
 @Override
 protected void onPause() {
   super.onPause();
 }
コード例 #4
0
 @Override
 protected void onPostCreate(@Nullable Bundle savedInstanceState) {
   super.onPostCreate(savedInstanceState);
   mDrawerToggle.syncState();
 }
コード例 #5
0
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   mDrawerToggle.onConfigurationChanged(newConfig);
 }