use of io.github.hidroh.materialistic.WebFragment in project materialistic by hidroh.
the class WebActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(R.style.AppTheme);
super.onCreate(savedInstanceState);
if (savedInstanceState == null) {
WebItem item = getIntent().getParcelableExtra(EXTRA_ITEM);
Bundle args = new Bundle();
args.putParcelable(WebFragment.EXTRA_ITEM, item);
fragment = (WebFragment) Fragment.instantiate(this, WebFragment.class.getName(), args);
getSupportFragmentManager().beginTransaction().add(android.R.id.content, fragment, WebFragment.class.getName()).commit();
} else {
fragment = (WebFragment) getSupportFragmentManager().findFragmentByTag(WebFragment.class.getName());
}
}
Aggregations