Search in sources :

Example 1 with WebFragment

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());
    }
}
Also used : Bundle(android.os.Bundle) WebFragment(io.github.hidroh.materialistic.WebFragment) WebItem(io.github.hidroh.materialistic.data.WebItem)

Aggregations

Bundle (android.os.Bundle)1 WebFragment (io.github.hidroh.materialistic.WebFragment)1 WebItem (io.github.hidroh.materialistic.data.WebItem)1