本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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
}
示例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);
}
示例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);
}
示例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);
}
示例12: FragmentStatePagerAdapter
import com.actionbarsherlock.app.SherlockFragmentActivity; //導入方法依賴的package包/類
/**
* @param activity
*/
public FragmentStatePagerAdapter(final SherlockFragmentActivity activity) {
super(activity.getSupportFragmentManager());
this.activity = activity;
}
示例13: FragmentPagerAdapter
import com.actionbarsherlock.app.SherlockFragmentActivity; //導入方法依賴的package包/類
/**
* @param activity
*/
public FragmentPagerAdapter(SherlockFragmentActivity activity) {
super(activity.getSupportFragmentManager());
this.activity = activity;
}
示例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;
}