Search in sources :

Example 1 with ArticleListFragment

use of cn.feng.skin.demo.fragment.ArticleListFragment in project Android-Skin-Loader by fengjundev.

the class MainActivity method initFragment.

private void initFragment() {
    FragmentManager fm = getSupportFragmentManager();
    Fragment fragment = fm.findFragmentById(R.id.fragment_container);
    if (fragment == null) {
        fragment = new ArticleListFragment();
        fm.beginTransaction().add(R.id.fragment_container, fragment).commit();
    }
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) Fragment(android.support.v4.app.Fragment) ArticleListFragment(cn.feng.skin.demo.fragment.ArticleListFragment) ArticleListFragment(cn.feng.skin.demo.fragment.ArticleListFragment)

Aggregations

Fragment (android.support.v4.app.Fragment)1 FragmentManager (android.support.v4.app.FragmentManager)1 ArticleListFragment (cn.feng.skin.demo.fragment.ArticleListFragment)1