當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。