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


Java SherlockFragmentActivity.getSupportFragmentManager方法代码示例

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


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

示例1: startWithTestLoaderManager

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
/**
     * Starts the interaction and optionally set up a {@link TestLoaderManager}.
     *
     * @param activity the activity within which to start the interaction
     * @param contactUri the URI of the contact to delete
     * @param finishActivityWhenDone whether to finish the activity upon completion of the
     *        interaction
     * @param testLoaderManager the {@link TestLoaderManager} to use to load the data, may be null
     *        in which case the default {@link LoaderManager} is used
     * @return the newly created interaction
     */
//    @VisibleForTesting
    static ContactDeletionInteraction startWithTestLoaderManager(SherlockFragmentActivity activity, Uri contactUri, 
            boolean finishActivityWhenDone,
            /* TestLoaderManager*/ Object testLoaderManager) {
        if (contactUri == null) {
            return null;
        }

        FragmentManager fragmentManager = activity.getSupportFragmentManager();
        ContactDeletionInteraction fragment = (ContactDeletionInteraction) fragmentManager.findFragmentByTag(FRAGMENT_TAG);
        if (fragment == null) {
            fragment = new ContactDeletionInteraction();
//            fragment.setTestLoaderManager(testLoaderManager);
            fragment.setContactUri(contactUri);
            fragment.setFinishActivityWhenDone(finishActivityWhenDone);
            fragmentManager.beginTransaction().add(fragment, FRAGMENT_TAG)
                .commitAllowingStateLoss();
        }
        else {
//            fragment.setTestLoaderManager(testLoaderManager);
            fragment.setContactUri(contactUri);
            fragment.setFinishActivityWhenDone(finishActivityWhenDone);
        }
        return fragment;
    }
 
开发者ID:SilentCircle,项目名称:silent-contacts-android,代码行数:37,代码来源:ContactDeletionInteraction.java

示例2: FragmentAdapter

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
public FragmentAdapter(SherlockFragmentActivity activity, ViewPager pager) {
    super(activity.getSupportFragmentManager());
    mViewPager = pager;
    mViewPager.setAdapter(this);
    mViewPager.setOnPageChangeListener(this);
    mParent = activity;
}
 
开发者ID:hzsweers,项目名称:SUREwalk_android,代码行数:8,代码来源:FragmentAdapter.java

示例3: HomePagerAdapter

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
/**
 * @param activity
 * @param defaultUser
 */
public HomePagerAdapter(final SherlockFragmentActivity activity,
        final boolean defaultUser) {
    super(activity);

    fragmentManager = activity.getSupportFragmentManager();
    resources = activity.getResources();
    this.defaultUser = defaultUser;
}
 
开发者ID:huibinfeng0810,项目名称:github-v2,代码行数:13,代码来源:HomePagerAdapter.java

示例4: FragmentTabPager

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
FragmentTabPager(SherlockFragmentActivity activity, ViewPager pager) {
    super(activity.getSupportFragmentManager());
    mContext = activity;
    mActionBar = activity.getSupportActionBar();

    mViewPager = pager;
    mViewPager.setAdapter(this);
    mViewPager.setOnPageChangeListener(this);
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:10,代码来源:FragmentTabPager.java

示例5: TabsAdapter

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
public TabsAdapter(SherlockFragmentActivity activity, ViewPager pager) {
	super(activity.getSupportFragmentManager());
	mContext = activity;
	mActionBar = activity.getSupportActionBar();
	mFragmentManager = activity.getSupportFragmentManager();
	mTabs = new ArrayList<TabInfo>();
	mFragmentTags = new SparseArray<String>();
	mViewPager = pager;
	mViewPager.setAdapter(this);
	mViewPager.setOnPageChangeListener(this);
}
 
开发者ID:EnteriseToolkit,项目名称:codetalk,代码行数:12,代码来源:MessageViewerActivity.java

示例6: TabsAdapter

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
public TabsAdapter(SherlockFragmentActivity fa, ViewPager pager) {
	super(fa.getSupportFragmentManager());
	mContext = fa;
	mActionBar = fa.getSupportActionBar();
	mViewPager = pager;
	mViewPager.setAdapter(this);
	mViewPager.setOnPageChangeListener(this);
}
 
开发者ID:bhavyanshu,项目名称:CheckIt_Android,代码行数:9,代码来源:TabsAdapter.java

示例7: TabsAdapter

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
public TabsAdapter(SherlockFragmentActivity activity, ViewPager pager) {
	super(activity.getSupportFragmentManager());
	mContext = activity;
	mActionBar = activity.getSupportActionBar();
	mViewPager = pager;
	mViewPager.setAdapter(this);
	mViewPager.setOnPageChangeListener(this);
}
 
开发者ID:razielsarafan,项目名称:lastfm-for-android,代码行数:9,代码来源:TabsAdapter.java

示例8: TabsAdapter

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
public TabsAdapter(SherlockFragmentActivity activity, ViewPager pager) {
	super(activity.getSupportFragmentManager());
	mContext = activity;
	mActionBar = activity.getSupportActionBar();
	mViewPager = pager;
	mViewPager.setAdapter(this);
	mViewPager.setOnPageChangeListener(this);
	mViewPager.setOffscreenPageLimit(2);    //Access the behind page
}
 
开发者ID:YuanLiou,项目名称:FoodBookBeta,代码行数:10,代码来源:AddItem_tab.java

示例9: TabsAdapter

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
public TabsAdapter(SherlockFragmentActivity activity, ActionBar actionBar, ReportViewPager pager) {
    super(activity.getSupportFragmentManager());
    mContext = activity;
    mActionBar = actionBar;
    mViewPager = pager;
    mViewPager.setAdapter(this);
    mViewPager.setOffscreenPageLimit(3);
    mViewPager.setPagingEnabled(false);
    mViewPager.setOnPageChangeListener(this);
}
 
开发者ID:ais-albania,项目名称:ZalartAndroid,代码行数:11,代码来源:TabsAdapter.java

示例10: TabListener

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
public TabListener(SherlockFragmentActivity activity, String tag, Class<T> cls) {
    mActivity = activity;
    mTag = tag;
    mClass = cls;

    FragmentManager fm = activity.getSupportFragmentManager();
    mFragment = fm.findFragmentByTag(tag);
}
 
开发者ID:cketti,项目名称:HoloColorPicker_demo,代码行数:9,代码来源:TabListener.java

示例11: TabsAdapter

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
public TabsAdapter(SherlockFragmentActivity activity, ViewPager pager) {
	super(activity.getSupportFragmentManager());

	mContext = activity;
	mActionBar = activity.getSupportActionBar();
	mViewPager = pager;
	mViewPager.setAdapter(this);
	mViewPager.setOnPageChangeListener(this);
}
 
开发者ID:cybro,项目名称:PalmCalc,代码行数:10,代码来源:PalmCalcActivity.java

示例12: FragmentStatePagerAdapter

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
/**
 * @param activity
 */
public FragmentStatePagerAdapter(final SherlockFragmentActivity activity) {
    super(activity.getSupportFragmentManager());

    this.activity = activity;
}
 
开发者ID:huibinfeng0810,项目名称:github-v2,代码行数:9,代码来源:FragmentStatePagerAdapter.java

示例13: FragmentPagerAdapter

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
/**
 * @param activity
 */
public FragmentPagerAdapter(SherlockFragmentActivity activity) {
    super(activity.getSupportFragmentManager());

    this.activity = activity;
}
 
开发者ID:huibinfeng0810,项目名称:github-v2,代码行数:9,代码来源:FragmentPagerAdapter.java

示例14: PagerAdapter

import com.actionbarsherlock.app.SherlockFragmentActivity; //导入方法依赖的package包/类
/**
 * Constructor of <code>PagerAdatper<code>
 * 
 * @param fragmentActivity The {@link SherlockFragmentActivity} of the
 *            {@link SherlockFragment}.
 */
public PagerAdapter(final SherlockFragmentActivity fragmentActivity) {
    super(fragmentActivity.getSupportFragmentManager());
    mFragmentActivity = fragmentActivity;
}
 
开发者ID:micromacer,项目名称:Player-by-TweekProject,代码行数:11,代码来源:PagerAdapter.java


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