@Override public void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); // 相同的布局文件 和设置页 setContentView(R.layout.content_setting); // 版本更新 updateVersion(); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_container_amuse); mycontext = this; ButterKnife.bind(this); initViews(); amuseDetailFragment = new AmuseDetailFragment(); FragmentManager fm = getSupportFragmentManager(); fm.beginTransaction().replace(R.id.fl_frag_container_amuse, amuseDetailFragment).commit(); // switch case逻辑区别 if (AugurContainerActivity.this.getIntent().getStringExtra(PAGETO) == null) { return; } mPageTo = AugurContainerActivity.this.getIntent().getStringExtra(PAGETO); if (mPageTo == null) { mPageTo = "AmuseDetailFragment"; } switchFragment(mPageTo); }