本文整理汇总了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;
}