当前位置: 首页>>代码示例>>Java>>正文


Java FragmentManager.putFragment方法代码示例

本文整理汇总了Java中android.support.v4.app.FragmentManager.putFragment方法的典型用法代码示例。如果您正苦于以下问题:Java FragmentManager.putFragment方法的具体用法?Java FragmentManager.putFragment怎么用?Java FragmentManager.putFragment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v4.app.FragmentManager的用法示例。


在下文中一共展示了FragmentManager.putFragment方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onSaveInstanceState

import android.support.v4.app.FragmentManager; //导入方法依赖的package包/类
@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    FragmentManager manager = getSupportFragmentManager();
    if (chooseFragment.isAdded()) {
        manager.putFragment(outState, "chooseFragment", chooseFragment);
    }
}
 
开发者ID:qiu-yongheng,项目名称:hefengweather,代码行数:9,代码来源:MainActivity.java

示例2: onSaveInstanceState

import android.support.v4.app.FragmentManager; //导入方法依赖的package包/类
@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    FragmentManager fragmentManager = getSupportFragmentManager();
    if(fragmentManager != null)
        fragmentManager.putFragment(outState, FRAGMENT_KEY , mFragment);
}
 
开发者ID:quiin,项目名称:UnifiedContactPicker,代码行数:8,代码来源:ContactPickerActivity.java

示例3: onSaveInstanceState

import android.support.v4.app.FragmentManager; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    FragmentManager manager = getChildFragmentManager();
    manager.putFragment(outState, "zhihu", zhihuDailyFragment);
    manager.putFragment(outState, "guokr", guokrFragment);
    manager.putFragment(outState, "douban", doubanMomentFragment);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:MainFragment.java

示例4: onSaveInstanceState

import android.support.v4.app.FragmentManager; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    FragmentManager fm = getSupportFragmentManager();
    fm.putFragment(outState, BOOKMARK_FRAGMENT, mBookmarkFragment);
    fm.putFragment(outState, TAGS_FRAGMENT, mTagsFragment);
}
 
开发者ID:theScrabi,项目名称:OCBookmarks,代码行数:8,代码来源:MainActivity.java

示例5: onSaveInstanceState

import android.support.v4.app.FragmentManager; //导入方法依赖的package包/类
@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putInt(KEY_DRAWER_NAV_VIEW_SELECTED_ID, resideMenu.getId());
    FragmentManager fm = getSupportFragmentManager();
    if(mReadFragment.isAdded()){
        fm.putFragment(outState, ReadFragment.class.getSimpleName(), mReadFragment);
    }
}
 
开发者ID:SpeedPromise,项目名称:L-Assistant,代码行数:10,代码来源:MainActivity.java

示例6: onSaveInstanceState

import android.support.v4.app.FragmentManager; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    FragmentManager fm = getChildFragmentManager();
    if (mZhihuFragment.isAdded()) {
        fm.putFragment(outState, ZhihuDailyFragment.class.getSimpleName(), mZhihuFragment);
    }
    if (mGuokrFragment.isAdded()) {
        fm.putFragment(outState, DoubanMomentFragment.class.getSimpleName(), mDoubanFragment);
    }
    if (mDoubanFragment.isAdded()) {
        fm.putFragment(outState, GuokrHandpickFragment.class.getSimpleName(), mGuokrFragment);
    }
}
 
开发者ID:SpeedPromise,项目名称:L-Assistant,代码行数:15,代码来源:TimelineFragment.java

示例7: onSaveInstanceState

import android.support.v4.app.FragmentManager; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putInt(KEY_BOTTOM_NAV_VIEW_SELECTED_ID, mBottomNavigationView.getSelectedItemId());
    FragmentManager fm = getChildFragmentManager();
    if (mTimelineFragment.isAdded()) {
        fm.putFragment(outState, TimelineFragment.class.getSimpleName(), mTimelineFragment);
    }
    if (mFavoritesFragment.isAdded()) {
        fm.putFragment(outState, FavoritesFragment.class.getSimpleName(), mFavoritesFragment);
    }
    if (mInfoFragment.isAdded()) {
        fm.putFragment(outState, InfoReadFragment.class.getSimpleName(), mInfoFragment);
    }
}
 
开发者ID:SpeedPromise,项目名称:L-Assistant,代码行数:16,代码来源:ReadFragment.java

示例8: onSaveInstanceState

import android.support.v4.app.FragmentManager; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    FragmentManager manager = getChildFragmentManager();
    manager.putFragment(outState, "zhihu", zhihuDailyFragment);
    //manager.putFragment(outState, "guokr", guokrFragment);
    manager.putFragment(outState, "douban", doubanMomentFragment);
}
 
开发者ID:makezhao,项目名称:LianXiZhihu,代码行数:9,代码来源:MainFragment.java


注:本文中的android.support.v4.app.FragmentManager.putFragment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。